[jdom-interest] re: JDOM & XML-Schema
Dan Douglas
dandoug at skibums.org
Thu May 2 06:11:41 PDT 2002
Emi,
I saw your post on the jdom-interest mail list....I didn't respond there
because it's not really a JDOM question that you're asking. JDOM doesn't
output XML Schema. JDOM doesn't even parse. You can use an XML Schema with
a parser like Xerces to build a JDOM object model, but you have to supply
the schema.
I suppose it's possible to generate a XML Schema from a document instance,
but it'd only be good as a starting point. A document instance can't
demonstrate every feature that a document valid for a given schema would
have. For example, if your document looked like this
<a>
<b/>
<b/>
<b/>
<a/>
Should the schema define a document with an <a> element followed by exactly
3 <b> elements or a sequence of any number of <b> elements. What if you
wanted to allow <c>'s mixed in with the <b>'s?
More information about the jdom-interest
mailing list