[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: David Megginson <david@m...>
  • To: xml-dev <xml-dev@l...>
  • Date: Fri, 22 Dec 2000 14:11:44 -0500 (EST)

data structures serialization
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#" 
           xmlns:foo="http://www.foo.com/ns/">

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

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

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

  </rdf:RDF>

(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

-- 
David Megginson                 david@m...
           http://www.megginson.com/

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.