Jenda has asked for the wisdom of the Perl Monks concerning the following question:
${[scalar localtime()]} monks,
does anyone know of a tool/module that'd either convert a (huge of course) W3C XML Schema to DTD (getting rid of information I'm not interested in anyway) or parse the schema and gave me a reasonably complex datastructure? I'm only interested in things like "this is the root tag(s)", "this tag has these attributes (and possibly ... those are the static ones and have those values)" and "this tag contains text" or "this tag contains these subtags in this order, those are optional, those required and those can be repeated".
I don't mind the allowed values of attributes or tags or anything like that.
If everything else fails does anyone know of a predigested simplified XML Schema description I could peruse to write something like that myself.
This is for a system that exports data in many different formats, not only XML. For XML it has a DTD parser that builds a tree of tags and subtags which is then used to 1) present the system admins with a template into which they map the fields defined within the system and 2) generate the XML. While it might be beneficial to be able to import at least some of the value validations from the Schema it's not something that we would have time and pressing-enough need to do.
As some clients only provide a XML Schema and not DTD or examples we'd like to be able to work with XML Schema. Or rather we'd rather not, but are forced to.
Thanks, Jenda
|
Support Denmark! Defend the free world! |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML Schemata to DTD or simplified datastructure
by planetscape (Chancellor) on Dec 20, 2007 at 12:21 UTC | |
|
Re: XML Schemata to DTD or simplified datastructure
by eserte (Deacon) on Dec 17, 2007 at 20:58 UTC | |
by Jenda (Abbot) on Dec 17, 2007 at 23:44 UTC | |
|
Re: XML Schemata to DTD or simplified datastructure
by pKai (Priest) on Dec 17, 2007 at 22:59 UTC | |
|
Re: XML Schemata to DTD or simplified datastructure
by msbalaji (Chaplain) on Dec 18, 2007 at 07:00 UTC |