[relaxng-user] Converting Relax-NG to Schema and DTD
Daniel Vogelheim
Daniel.Vogelheim at sun.com
Mon Jan 12 20:04:17 ICT 2004
Hello all,
I have a question: How can I get a DTD from a RelaxNG schema, if Trang
refuses to generate one?
A somewhat longer version of the same question is:
I work in the OASIS Open Office Technical Committee, which works on an
standardized XML file format for office applications, which will likely
be supported by at least OpenOffice.org, KOffice and StarOffice. The TC
uses RelaxNG as a working language, which means that the formal part of
the specification is all done in RelaxNG. But we would like to ship
(non-normative) W3C XML Schema as well as DTDs, since many users cannot
freely choose the schema language for the work and hence require either
W3C XML Schema or DTDs.
So... We would of course like to generate .xsd and .dtd files
automatically. Trang does a very nice job on the former: The .xsd is
nicely readable, and mostly validates correctly. The remaining problems
can be fixed easily.
However, we couldn't generate DTDs. Trang refuses to generate them.
We've tried generating DTDs from the generated .xsd files with XML-Spy,
but the resulting DTD was not even valid. Does anyone else have
experience with converting RelaxNG to DTDs? What kind of tools work well
for this task?
Thanks!
Sincerely,
Daniel Vogelheim
More information about the relaxng-user
mailing list