[jdom-interest] XML Schema

Michael Brennan Michael_Brennan at Allegis.com
Mon Feb 12 11:04:24 PST 2001


> From: Boris Mann [mailto:boris_mann at sympatico.ca]
> [...]
> I don't think (from my minimal knowledge) that this is something that
> should/would be handled by JDOM.
> 
> A very interesting project is Castor (http://www.castor.org). A short
> excerpt from the feature list:
> 
> - Castor XML: Java object model to and from XML
>    - Generate source code from an XML Schema

Castor looks very interesting to me. Unfortunately, it seems complex and is
rather sparsely documented (and much of the source code doesn't even include
comments). I haven't had a chance to delve too deeply into it, yet.

Approaches such as Castor are the most useful when you know at development
time the XML structure you need to deal with and how you intend to deal with
it. I think there is still some value, though, in an approach that can model
an XML structure with native datatypes by loading a schema at run time and
binding individual elements/attributes to appropriate types. It would be
particularly interesting to meld such an approach with the MapRecord and
ListRecord classes in the new J2EE Connector architecture. Whether this is
an appropriate role for JDOM is certainly debatable. It might be better
addressed in a different fashion. I could see an approach built atop JDOM,
though, to leverage the functionality it already provides rather than
reinventing the wheel.

> The direction that Microsoft is taking XML -- "extensions" 
> that only work on
> Windows platforms -- scares me.

It should get better. They have pledged to support XML Schema. Supposedly
the Visual Studio .NET beta has XML Schema support (although I haven't
checked it out myself). I think they went the XDR route because they didn't
want to wait for the W3C to produce an official XML Schema language.
CommerceOne did the same thing with SOX.



More information about the jdom-interest mailing list