XML-Schema to (SGML) DTD transcription

  • Thread starter Martin Froehlich
  • Start date
M

Martin Froehlich

Hello!

I'm looking for a method or tool to transcribe a XML-Schema (more
precisely the W3C XML-Schema Schema) to a classic DTD. That
is, I have a xyz.xsd file and want to have a xyz.dtd file. Not the
other way round.

The effect should be that any file which is valid according to
the XML-Schema is also valid according to the generated DTD.

I'm aware of the fact that for instance namespaces and such
constructs will introduce some complexity, but in the end
XML-Schema contains more constraints than the DTD formalism,
therefore -- from a theoretical point of view -- it should be
feasible. But has it already be done?

No search engine or FAQ-file I found on the net contained a
usable pointer, preventing me to reinvent the wheel. But maybe
the experts on this lists may have a hint.

Any help appreciated!
 
K

Kenneth Stephen

Martin said:
Hello!

I'm looking for a method or tool to transcribe a XML-Schema (more
precisely the W3C XML-Schema Schema) to a classic DTD. That
is, I have a xyz.xsd file and want to have a xyz.dtd file. Not the
other way round.
Martin,

I know that the (IBM product) WebSphere Studio Application Developer
can do this. It costs $$$. Since it is based on Eclipse, there exists
the slim possibility that Eclipse itself can do this, and Eclipse is
freely downloadable.

Regards,
Kenneth
 
P

Peter Flynn

Martin said:
Hello!

I'm looking for a method or tool to transcribe a XML-Schema (more
precisely the W3C XML-Schema Schema) to a classic DTD. That
is, I have a xyz.xsd file and want to have a xyz.dtd file. Not the
other way round.

Most of the big DTD/Schema design tools can do this, eg XML Spy.
But you risk losing some constraints.
The effect should be that any file which is valid according to
the XML-Schema is also valid according to the generated DTD.

Not possible to guarantee this.
I'm aware of the fact that for instance namespaces and such
constructs will introduce some complexity, but in the end
XML-Schema contains more constraints than the DTD formalism,
therefore -- from a theoretical point of view -- it should be
feasible. But has it already be done?

No, the opposite is true: W3C Schema allows you to specify constraints
which cannot be specified in a DTD, so converting a W3C Schema to a
DTD means you may have to forego those constraints which cannot be
represented in a DTD.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top