Trang RNG -> DTD issue

This should cover W3C XML Schema, Relax NG and DTD related problems.
mstoef
Posts: 20

Trang RNG -> DTD issue

Wed Apr 28, 2010 11:34 pm

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: 4144

Re: Trang RNG -> DTD issue

Thu Apr 29, 2010 11:30 am

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

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests