Steinar Bang | 22 Nov 2007 09:03
Picon
Picon
Favicon

Problems with DITA RNG schemas

I've generated Relax-NG compact syntax schemas from the DITA DTDs using
trang.  But I have problems with them.  I get messages like eg. this:

File mode specification error: (error "Duplicate definition of task-info-types at position 3505 in ~/workspaces/project/users_guide/schemas/relaxng/task.mod.rnc")

Line 3505 is the last line of task.mod.rnc, it contains only one line
with "element task", and according to grep, that's the only line with
"element task" in the entire directory.

Does anyone know what causes this duplicate message?  Or even better:
does anyone know of a set of DITA RNG/RNC schemas that works?

Thanx!

- Steinar

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
(Continue reading)

Florent Georges | 22 Nov 2007 12:54
Picon
Favicon

Re: Problems with DITA RNG schemas

Steinar Bang wrote:

  Hi Steinar,

> I've generated Relax-NG compact syntax schemas from the
> DITA DTDs using trang.  But I have problems with them.

  Could you please post a link to the original DTDs and the way you
have invoked trang?  And maybe put your generated RNC schemas on the
web (I don't know if the list allows attachments)?

  Just to see if I can reproduce the problem.

  Regards,

--drkm

      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)

Steinar Bang | 22 Nov 2007 13:41
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Florent Georges <darkman_spam <at> yahoo.fr>:

> Steinar Bang wrote:
>   Hi Steinar,

>> I've generated Relax-NG compact syntax schemas from the
>> DITA DTDs using trang.  But I have problems with them.

> Could you please post a link to the original DTDs and the way you have
> invoked trang?

The original DTDs are part of the DITA Open Toolkit
  http://sourceforge.net/project/showfiles.php?group_id=132728
(the topmost file, ie. the one titled "DITA Open Toolkit 1.4")

My conversions were done back in September.  When I tried doing them
today, trang didn't work.  It's this issue:
 https://bugs.launchpad.net/ubuntu/+source/trang/+bug/141447

I'll try finding the upstream java version of trang and running it from
java. 

> And maybe put your generated RNC schemas on the web (I don't know if
> the list allows attachments)?

I'll try attaching it to this message, and we'll see.

>   Just to see if I can reproduce the problem.

Great!  Thanx!
(Continue reading)

Steinar Bang | 22 Nov 2007 13:48
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Steinar Bang <sb <at> dod.no>:

>>>>> Florent Georges <darkman_spam <at> yahoo.fr>:
>> And maybe put your generated RNC schemas on the web (I don't know if
>> the list allows attachments)?

> I'll try attaching it to this message, and we'll see.

They seems to be survive

At least on gmane's version of the message still has the attachment:
 http://permalink.gmane.org/gmane.emacs.nxml.general/1626

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:emacs-nxml-mode-digest <at> yahoogroups.com 
    mailto:emacs-nxml-mode-fullfeatured <at> yahoogroups.com

(Continue reading)

Florent Georges | 22 Nov 2007 19:06
Picon
Favicon

Re: Re: Problems with DITA RNG schemas

Steinar Bang wrote:

  [ sorry for the multi-post on RNG List and nXML List,
    where this question was asked ]

> File mode specification error: (error "Duplicate
> definition of task-info-types at position 3505 in
> ~/workspaces/project/users_guide/schemas/relaxng/task.mod.rnc")

> Line 3505 is the last line of task.mod.rnc, it contains
> only one line with "element task", and according to grep,
> that's the only line with "element task" in the entire
> directory.

  Actually, that's _position_ 3505.  That means the 3505-th
character in the buffer.  That's the position of the first
character after the definition of task-info-types.  Below is
what I thought about your problem:

  1/ the Dita DTD modules use entity calls to modularize the
     DTDs, with a default definition of the entity

  2/ task.mod uses (and defines) the entity task-info-types,
     this entity can be "overriden" by an including DTD

  3/ ditabase.dtd includes task.mod without defining the
     entity, so in the resulting tasl.mod.rnc generated by
     Trang, you have the definition of an identifier named
     task-info-types

(Continue reading)

Steinar Bang | 22 Nov 2007 20:48
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Florent Georges <darkman_spam <at> yahoo.fr>:

[snip!]
> Could you please try to generate again your RNC files with Trang, but
> this time putting each output in a different directory, and modifying
> your schemas.xml in accordance?

Will do.  Thanx for the feedback!

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:emacs-nxml-mode-digest <at> yahoogroups.com 
    mailto:emacs-nxml-mode-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    emacs-nxml-mode-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
(Continue reading)

Steinar Bang | 22 Nov 2007 21:19
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Steinar Bang <sb <at> dod.no>:

>>>>> Florent Georges <darkman_spam <at> yahoo.fr>:
> [snip!]
>> Could you please try to generate again your RNC files with Trang, but
>> this time putting each output in a different directory, and modifying
>> your schemas.xml in accordance?

> Will do.  Thanx for the feedback!

Ok.  I did the following:
 - Downloaded trang-20030619.zip
 - In DITA-OT1.4-src/dtd/ did the following
  - ls *.dtd
  - for each DTD 
   - created a subdirectory of my relaxng directory
   - ran "java -jar trang.jar dtdname.dtd dtdname.dtd"
   - moved all .rnc file to the subdirectory with the same name as the
     dtd
 - In the schemas.xml that actually found the schemas, for each of the
   DTDs, added the subdirectory

Then nxml found the correct schema, and had no load errors on the
schema, at least for the two document types I tried; task and concepts
(those are the ones I'll be editing).

But the results weren't correct.  Instead of <task> or <concept> as the
top directory, both DTDs had <no-topic-nesting> with no children as the
only legal element.

(Continue reading)

Steinar Bang | 23 Nov 2007 11:17
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Steinar Bang <sb <at> dod.no>:

[snip!]
> But the results weren't correct.  Instead of <task> or <concept> as
> the top directory, both DTDs had <no-topic-nesting> with no children
> as the only legal element.

> I'll guess I try that entity expansion script suggested on the other
> list.

I tried the expansion script, and created RNC files from the expanded
DTDs... and ran into the same problem, ie. <no-topic-nesting> as the
only legal element.

Hm...

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
(Continue reading)

Florent Georges | 23 Nov 2007 12:52
Picon
Favicon

Re: Re: Problems with DITA RNG schemas

Steinar Bang wrote:

> I tried the expansion script, and created RNC files from
> the expanded DTDs... and ran into the same problem,
> ie. <no-topic-nesting> as the only legal element.

> Hm...

  I'm affraid I can't help furthemore on this issue.  Maybe
you will find the DITA Architectural Specification interresting:

http://docs.oasis-open.org/dita/v1.1/OS/archspec/archspec.html

in particular:

http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdorganization.html
http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdmod.html

  Good luck!

--drkm

      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/
(Continue reading)

Steinar Bang | 23 Nov 2007 17:16
Picon
Picon
Favicon

Re: Problems with DITA RNG schemas

>>>>> Florent Georges <darkman_spam <at> yahoo.fr>:

> I'm affraid I can't help furthemore on this issue.

I've been pointed to this approach, which I will try out later today: 
	http://tech.groups.yahoo.com/group/dita-users/message/6711

Basically, it's your approach, then manually changing the start
declaration of each generated RNC schema.

Thanx for you assistance in this!

- Steinar

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:emacs-nxml-mode-digest <at> yahoogroups.com 
    mailto:emacs-nxml-mode-fullfeatured <at> yahoogroups.com
(Continue reading)


Gmane