RDF serialization type vs. schemata (was Re: RDF in XHTML)

[please do not Cc me on posts to the list, thx.]

Murray Altheim <altheim@eng.sun.com> writes:

> Without trying to open any arguments here, this has always been my
> difficulty with RDF: its design is such that the mixing of
> namespaces and author-created elements and attributes means that
> validation using conventional tools is either problematic or
> impossible. Why isn't this considered a fault of RDF syntax, not a
> fault the rest of the markup world? Doesn't this sound religious to
> anyone? RDF syntax could have been designed differently, to "play
> well with others" in this sense.

I had a brief article on the "three types of XML marshalling", but
I've since lost it.  I'll try to summarize:

 1) Fixed-schema, arbitrary data.  The elements defined in the schema
    are a small, fixed, set of elements that you use to marshall data.
    Things like <structure>, <list>, <integer>, and <string>.  The
    look-and-feel of the XML structure doesn't match the data, the
    data is merely encoded using the fixed set of elements.  Examples
    include XML-RPC and WDDX.  This type can use generic marshalling
    libraries.

 2) Schema-follows-data, with marshalling rules.  The elements used in
    the XML reflect the data being marshalled (like <purchaseOrder>
    and <price>), but the marshalling rules allow any arbitrary data
    to be serialized as long as they follow the rules.  One example is
    SOAP.  This type, too, can use generic marshalling libraries.

 3) Application-specific-schema.  These schemas are hand-crafted for
    the application they are designed for and do not follow any
    pre-set or regular rules for marshalling.  Nearly all schemas not
    in (1) or (2) fall into this category.  This type must use
    per-application marshalling code to convert from XML into
    application data models, or be accessed through tools lik DOM or
    SAX.

RDF has feet in both (1) and (2), with (2) being called "abbreviated"
or "typed-node" syntax.

In particular to it's part in (2), as long as you follow the RDF
rules, you can have any element names (names including namespaces, of
course) you want, as long as you follow the rules for marshalling, and
a generic RDF library will be able to un/marshal the data for you
using XML element names that look-n-feel like your data.

> In XML Schema we have one of the most involved, complex, and
> well-though out specifications (probably only in competition with
> Hytime), and yet it cannot validate RDF. That seems a real problem,
> and nothing that (as has been noted) is in the realm of XHTML to
> solve.

Where this plays havoc with XML Schema (and other existing schema
languages I'm aware of) is that people still want to use "component
data" (see my previous post).  XML Schema doesn't like co-locating
data from different sources within the same XML instance, unless every
one of the involved XML Schemas are designed to fit together.

RDF, even moreso than SOAP, for example, is intended for co-locating
data from different sources.

  -- Ken

Received on Friday, 20 April 2001 11:00:54 UTC