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
4/ task.dtd includes task.mod and defines the entity.
This is legal with DTD, this is the way to override
default values in DTD composition. Because the
corresponding identifier is already defined in
task.rnc, Trang doesn't define it again in task.mod.rnc
5/ so if you use separated sets of Trang-generated RNC
files (one set per top-level generation: one for
ditabase.dtd, one for task.dtd...), everything's ok
6/ But I guess you generated in the same output directory,
once for task.dtd then once for ditabasse.dtd (for
instance), so the result was a task.rnc including
task.mod.rnc, but this later was overriden by the
subsequent generation and contains now the definition
of task-info-types
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?
Regards,
--drkm
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail