Trang RNG -> DTD issue

This should cover W3C XML Schema, Relax NG and DTD related problems.
mstoef
Posts: 20
Joined: Tue May 23, 2006 11:10 pm

Trang RNG -> DTD issue

Post by mstoef »

I'm attempting to generate an XML DTD from an RNG file created in Oxygen(Trang). The conversion is failing with messages of the sort ...

'sorry, cannot handle this kind of "oneOrMore"'

A typical offending node is ..

<oneOrMore>
<choice>
<text/>
<ref name="given-names"/>
<ref name="surname"/>
</choice>
</oneOrMore>


Can you give advice as to how I might alter my RNG to make the conversion work, or is there an configuration option that will get this to go through?

Thanks.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Trang RNG -> DTD issue

Post by sorin_ristache »

Hello,

You can avoid this limitation of the Relax NG -> DTD converter for such a Relax NG pattern with the following steps:

- generate a W3C XML Schema (XSD file) from the Relax NG schema

- create a new XML file based on the XSD schema from menu File -> New -> XML Document. In the Create an XML Document dialog select the XML Schema tab and select the parent element of the oneOrMore pattern as the root of the XML instance document (the combo box Root Element).

- generate a DTD from the XML document with the actions Learn Structure and Save Structure from menu Document -> XML Document.


Regards,
Sorin
Post Reply