Lists Home |
Date Index |
** Reply to message from Joe English <email@example.com> on Thu, 07 Nov
2002 08:14:08 -0800
> Hayden Marchant wrote:
> > I am looking for an API that will give me a complete view of the whole XMLSch
> > ema [...]
> Just use one of the usual toolkits for plain XML (SAX, DOM,
> jdom, etc.).
> The main reason W3C XML Schema uses XML instance syntax
> instead of something more human-readable is to make this
> sort of thing possible...
Using XML for the syntax reduces the effort of parsing the syntax, but using
plain XML tools for programatically interrogating XML Schemas is nonetheless a
last resort. The problem is that the XML Schema syntax is a particular physical
model of the logical model underlying W3C XML Schema. From the point of view of
your application, you want an API that provides you with a language-specific
physical model of the same underlying logical data model. What the sought after
API should do is handle reading of one physical model and converting it to the
other, preserving the information defined in the logical model.
When you read an XML Schema as XML, you have to separate XML details which mean
something in terms of the logical model from those things that are purely
syntactic requirements of the XML physical model. It is the kind of thing that
is best left to a library if one is available. It's good to have plain XML
tools as a last resort for extracting Schema information, but that is the way it
should be seen.
Hayden already knows all of this, since Unicorn's business involves handling
the mappings between physical & logical data models.
Anthony B. Coates, Information & Software Architect
MDDL Editor (Market Data Definition Language)