Page 1 of 1

Trang RNG -> DTD issue

Posted: Wed Apr 28, 2010 11:34 pm
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 ..

<ref name="given-names"/>
<ref name="surname"/>

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?


Re: Trang RNG -> DTD issue

Posted: Thu Apr 29, 2010 11:30 am
by sorin_ristache

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.