Martin Froehlich wrote:
> 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
--
"The cat in the box is both a wave and a particle"
-- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
|