Re: Using XMLSchema-instance attributes in RDF/XML Syntax

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Subject: Re: Using XMLSchema-instance attributes in RDF/XML Syntax 
Date: Thu, 22 Aug 2002 12:57:25 +0100

> >>>"Thomas G. Habing" said:
> > 
> > Hi all,
> > 
> > I posted the following to www-rdf-comments recently, but it didn't generate
> > any comments or followup, so I am posting here to see what happens :-). 
> > Does what I am proposing make sense, is it too simplistic, or am I just
> > missing something?
> > 
> > ---
> > 
> > I have been trying to figure out how I can use the various
> > XMLSchema-instance attributes (especially xsi:type, but also xsi:nil,
> > xsi:schemaLocation, etc.) in an RDF/XML document.  I want to create valid
> > RDF/XML, but at the same time I want to be able to validate at least
> > portions of the RDF/XML using XML Schema.  Some of my XML Schemas require
> > the use of the xsi:type attribute in the instance documents in order to
> > validate.  However, RDF insists on treating these xsi:attributes as RDF
> > property attributes which causes the RDF to be invalid.
> > 
> > I can understand this in the original RDF M&S since it predates XML Schema
> > by a year or so, but I am surprised to see no mention of this issue in the
> > newest "RDF/XML Syntax Specification."
> 
> Since I'm the editor of the latter, I'll respond.
> 
> Nobody has ever raised it as an issue, that's why it is not there.

The issue of treating xsi:type specially in RDF/XML *has* been raised
several times, including my message 
 http://lists.w3.org/Archives/Public/www-rdf-comments/2002JulSep/0024.html

xsi:type has been mentioned in at least 69 messages on the w3c-rdfcore-wg
mailing list, including 
 http://lists.w3.org/Archives/Public/w3c-rdf-core/2001Oct/0600.html
and
 http://lists.w3.org/Archives/Public/w3c-rdf-core/2002Apr/0476.html


> Using the W3C XML Schema language (henceforth WXS) to validate
> RDF/XML is tricky but possible.  

It is?  Where is the XML Schema schema document for RDF/XML then?  I'm even
interested in an XML Schema schema document for RDF/XML that only uses a
fixed collection of properties.

> I've never heard that there was an
> insistence to scatter xsi:type attributes in RDF/XML data in order to
> make WXS work.  That sounds like a WXS problem, not RDF/XML's
> although I'm surprised you can't separate the schema and the instance
> data.  I've managed to create such things for Dublin Core in RDF/XML
> with WXS.  I won't go into the other problems WXS has with RDF/XML here.

Well, I think that it would be extraordinarily useful to be able to say in
an RDF/XML document that a particular RDF literal had a particular XML
Schema datatype.  This has nothing to do with making XML Schema work, but
has to do instead with providing typing for RDF/XML literals.

> > I have seen some of the discussions in the various lists of using xsi:type
> > for data typing in RDF.  I don't claim to understand most of the issues
> > associated with this, but I would like to humbly suggest that at the very
> > least there should be some language in the "RDF/XML Syntax Specification" to
> > the effect that attributes in the XMLSchema-instance namespace should be
> > ignored by RDF parsers, similar to what is done with the xml* attributes.
> 
> This seems a rather ugly solution to the problem with your schema.
> Why should just that namespace be ignored?  

Perhaps because it is the XML Schema namespace?  RDF/XML treats the XML
namespace specially already.

> What about future updates
> that are bound to happen with WXS?  

That would be the reason to treat the entire namespace specially.

> A good case could be made for
> ignoring say XHTML's namespaces.  And so on.

Well, it might be reasonable to ignore XHTML's namespace, reserving it for
decoration of the document.

> Adding a single ignored namespace seems rather hacky.  If namespace
> ignoring was being added, it would make sense to add a general
> rdf:ignoredNamespaces attribute off <rdf:RDF>.  This is also ugly and
> probably would get complaints from implementors.  I'd complain, since
> I'm one too ;)


> Dave

Peter F. Patel-Schneider
Bell Labs Research

Received on Thursday, 22 August 2002 08:29:23 UTC