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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: RDF vs. SOAP serialization (oh yeah, and XMI and XTM)

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <david@megginson.com>
  • To: xml-dev <xml-dev@lists.xml.org>
  • Date: Fri, 22 Dec 2000 14:11:44 -0500 (EST)

Uche Ogbuji writes:

 > OK, David, so maybe you can help me out here.  Why would any one even
 > suggest RDF qua RDF as a "general-purpose XML data format"?  What does
 > this even mean?  Does this mean that if I don't have a schema in mind,
 > that I wrap my xml in an <rdf:RDF> element and conform to the RDF M&S?
 > Yikes.  even an RDF booster such as I would scarecely suggest such a
 > thing.

No, what I mean is that if you need to represent data structures in
XML, then RDF is a reasonable choice (as is the SOAP serialization
format).  Consider this Java interface

  public interface Person
    public String getId ();
    public String getName ();
    public String getNationality ();
    public Person getMother ();
    public Person getFather ();

and compare these three object instances in RDF following the
interface's pattern:

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 

   <foo:Person rdf:about="urn:xxx:11111">
    <foo:name>David Megginson</foo:name>
    <foo:mother rdf:resource="urn:xxx:22222"/>
    <foo:father rdf:resource="urn:xxx:33333"/>

   <foo:Person rdf:about="urn:xxx:22222">
    <foo:name>Marylil Megginson</foo:name>

   <foo:Person rdf:about="urn:xxx:33333">
    <foo:name>Paul Megginson</foo:name>


(I used fake URNs only to avoid Holy Wars.)  This is fairly concise,
fully normalized, and the only use of abbreviate syntax is my avoiding
rdf:type.  SOAP's serialization stuff will do just as well, of course,
but in the end, they're both just data (vs. document) formats.

 > But for me to seize on RDF would, IMO be making the false assertion
 > that every arbitrary data field is metadata.  Yes one man's data is
 > another's metadata, but trying to have a workable metadata graph is
 > pretty difficult when the whole kitten kaboodle is shoe-horned into
 > the structure.

There's no shoe-horning involved -- note the simplicity (elegance?) of
the above example.  RDF is just an XML data-serialization format with
a lot of metadata examples imposed on the spec to confuse the reader.
The spec mentions that RDF can be used for knowledge representation
but explicitly states that RDF is not a K-R spec itself, and a lot of
the examples in the spec are just plain data structures.

It might be easiest of you think of two separate questions:

1. How do I represent data structures in XML?

2. What data structures do I use for Knowledge Representation?

The RDF spec answers #1 fairly well, but scares people away by doing a
half-hearted job of trying to answer #2 in the same spec (hence the
general belief that RDF is complicated or confusing).  Likewise, for
SOAP, which tries to answer both #1 and #3:

3. How do I use XML to encode RPC requests?

If spec writers would set out to do less, they'd accomplish more, but
we have to try to live with what's available.

All the best,


David Megginson                 david@megginson.com


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS