RE: Alternatives to XML for RDF?

> -----Original Message-----
> From: ext Aredridel [mailto:aredridel@nbtsc.org]
> Sent: 13 August, 2003 21:22
> To: www-rdf-interest@w3.org
> Subject: RE: Alternatives to XML for RDF?
> 
> 
> > I don't think there are many, if any, fans of RDF/XML.
> > It is a means to an end (the graph) and a pretty ugly
> > and problemmatic means at that.
> 
> Interesting.  I am one of those people, then!  I keep thinking that
> RDF/XML is one of the things that makes it integrate with existing
> infrastructure so well.  [Even just being able to store RDF in an XML
> database is useful, as is rudimentary querying with XPath]

My point was not that using XML to serialize RDF graphs
was a bad thing, but that the *particular* RDF/XML serialization
has numerous issues that (for me at least) make dealing
with RDF as RDF/XML more trouble than it's worth.

Specifically:

1. You can't write a DTD to validate arbitrary RDF/XML.
2. There are numerous ways in which the same thing can
   be expressed in RDF/XML so XPaths and XSLT scripts
   become extremely baroque if one wants to work with
   arbitrary RDF/XML.
3. One cannot express constraints in terms of RDF/XML
   which will be meaningful to generic XML tools.
4. One cannot express vocabulary equivalences in terms
   of RDF/XML which will be meaningful to generic XML
   tools.

In short, RDF/XML is the least important part of RDF,
and is nothing more than a means to an end, and operating
directly on RDF/XML misses out on the very point of RDF,
to work with meaning rather than syntax.

As for folks using XML tools to do verious things to
RDF/XML instances not relating to interacting with 
the knowledge itself, but simply syntax fiddling,
for various reasons, such as for presentation, fine.

But whenever I hear someone recommending that folks
consider tools such as XPath, XQuery, etc. for use
with RDF, I have to speak up.

That's not the right way to work with RDF, and will
be both fragile, limited, and fail to exploit the
power of RDF and the Semantic Web.

> What I think is missing is tools for making the XML 
> serialization itself
> useful.  Having well-defined ways to shoehorn a graph into a specific
> XML schema (or subset of schemas) would be very useful, I think --
> Having a schema language that can state "this XML element is 
> an instance
> of rdf:Bag", and similar things, would make it possible to serialize
> useful parts of an RDF graph into a well-formed and valid XML 
> document.

Sure. But you can't do that with the infinite namespace
striping model used by RDF/XML.

If there existed some official XML serialization
for RDF which fully reflected the RDF graph and was
constrained by and true to the RDF MT, my opinion might
change, but for now, for RDF/XML as defined, just don't
do it.

> An easy example of this would be RSS 1.0: I'm not sure if 
> there's a spec
> for how the XML should be formed, exactly, beyond RDF/XML rules, but
> specifying it should be easy:

Defining an XML Schema or DTD for a particular ontology, serialized
as RDF/XML is not only doable, but commonly done. An excellent
example is XPackage (http://www.xpackage.org) which defines a hybrid
model for package definitions which can be interpreted as either XML
or RDF.

But that's a *particular* application, and fine (and needed) for
validation of particular instances conforming to that particular
application. But such things can't be done for RDF/XML in general.

If you want to work with arbitrary RDF, you should work on the graph.

> I agree in that the XML serialization is complex.  I'd like to see
> people introduced using another syntax first, then the full model
> unleashed later when they're ready. 

I think it's fair to say that RDF/XML is intended for interchange
of knowledge between arbitrary systems and tools, and not optimized
for human consumption. Yes, lots of folks (including myself) edit
RDF/XML manually (in vi no less ;-) but the common expectation is
that most users will be shielded from RDF/XML by tools and
higher level languages.

> Making both NTriples and RDF/XML
> standard serializations would be very useful. 

Or rather, making a form of N3 a standard serialization.

NTriples is, in a sense, "kind of" a standard, insofar as the
tests are concerned, and being a subset of N3, would gain
status should N3 be "blessed".

> I'd love to
> see HTTP content negotiation on most RDF available on the web: if the
> User-agent sends Accept: application/ntriples (or whatever 
> ntriples ends
> up being), send that. If it understands rdf+xml, send that.

Agreed. 

Patrick
 

Received on Thursday, 14 August 2003 02:07:10 UTC