Trang RNG -> DTD issue

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

Trang RNG -> DTD issue

Post by mstoef » 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 ..

<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?


Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Trang RNG -> DTD issue

Post by sorin_ristache » Thu Apr 29, 2010 11:30 am


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.


Post Reply