OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building an object model of a XML schema

Sorry about the delay in answering. I've been on vacation.

"Bullard, Claude L (Len)" wrote:
> What if the idea is that the XML Schema is a set of reusable
> types, a toolkit that is then included/imported/redefined/substituted
> into other application languages?  I also haven't
> exported a schema out of UML, but it seems to me it
> may include classes that such a design would not use.

This makes sense to me, but is a restricted use of XML Schemas. That is,
you're likely to use XML Schemas very carefully, in a way that makes
sense to translate them to objects. This is also similar to the point
Jeff Lowery makes in one of his answers -- that you can use XML Schemas
for object modeling.

> This probably turns on what you said:  if one is
> designing objects, design objects.  OTOH, there
> is that intermediate step where one is not quite
> designing documents in the print document or online
> document sense, one is designing reusable data
> sets more like relational tables than objects
> (no explicit operations) and a little less like
> a document (no explicit assembly).

This is a case I noted in my comments -- that it makes sense to generate
object schemas from XML Schemas when the XML defines a common data
model, rather than a common object model. This happens in open systems,
such as when you're using ebXML.

However, I think this requires a big caveat -- that the generated
objects are probably only a starting place for the real objects. As I've
said somewhere (on this list or another), my experience from generating
database schemas from DTDs is that structures that make sense in XML
documents don't always make sense as structures in the database. The
same is undoubtedly true of objects. This is the point that Michael
Brennan and Dave Brownell make in their responses.

Note that I'm not sure if the various data binding products (e.g. JAXB,
Castor) give you enough control to use objects that are substantially
different from the XML. That is, they might rely on a strict mapping
with few choices. In such a case, it might be necessary to transform the
XML document before creating objects and after serializing them. A lot
of people who use my software to transfer data between XML and databases
do this.

By the way, I've added a reference to this discussion to the paper.

-- Ron