Object-oriented serialization (Was Re: Some questions)

David Megginson david at megginson.com
Thu Dec 2 14:40:46 GMT 1999

Matthew Gertner <matthew at praxis.cz> writes:

> A schema gives you this information too. The problem of how to attach a
> schema to an instance is not yet resolved, but it is a purely syntactic
> consideration and a satisfactory solution will be found. This then tells
> you what class a given instance belongs too. The identity can be
> specified using an ID attribute; this is exactly the way it is done in
> RDF. That an element represents a relationship is implicit in the
> content model of the element.

I still don't follow.  Perhaps I need to reread the XML Schema spec,
but given

   <bar id="xxx">

How does the schema tell me that foo represents a container for a
collection of objects, bar represents an object, and hack and flurb
represent the object's properties?

> SAX is great as far as it goes, but we seem to be agreeing that an
> additional layer is needed on top. This layer is not the DOM. 

It can be.  The DOM represents a domain-specific object layer that is
useful for a wide subset of XML operations (especially document- and
browser-oriented work).  There need to be many layers on top of XML,
one for each domain -- it happens that many of those layers will share 
the need to encode objects, so a standard object layer sandwiched
between XML and the domain-specific layers can save a lot of work.

> There are a variety of efforts to create
> domain-specific objects automatically from XML objects. I don't have a
> list at the tips of my fingers, but if anyone does it would be a great
> resource. They are out there because I keep bumping into them.

One example is RDF.

> To be quite blunt it seems ashame that a lot of really great work is
> being put into the RDF effort (including a very valuable vocabulary
> for collection classes, just to name one) instead of being
> integrated more tightly into the overall XML architecture. 

I disagree strongly with the last part of that statement.  I'd argue
the opposite -- higher-level layers should be as independent of XML as
possible.  That's the only way to build good, layered architectures.
XML does one thing (represent a tree structure in a character stream)
very well: it's an excellent layer to build other layers on top of,
but XML itself should stay as simple as possible so that it's
applicable widely to many different fields.

> I think that if the work being done on RDF were refocused to making
> sure that XML Schemas do everything that the RDF advocates are
> rightly claiming is necessary, that we will see a clear win in terms
> of pushing the whole XML effort from a theoretical effort into a
> major paradigm shift with extensive real-world implications.

That would be another serious mistake.  Object exchange, while
important, represents only one of many layers that can be build on top
of XML, and if XML Schemas start trying to solve high-level problems
for every specific domain, it will become an unimplementable mess.
RDF already made a similar mistake by mixing together a spec for
object encoding in XML with a spec for representing knowledge about
Web pages.

All the best,


David Megginson                 david at megginson.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list