W3C home > Mailing lists > Public > www-rdf-interest@w3.org > August 2002

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

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Thu, 22 Aug 2002 12:57:25 +0100
To: thabing@uiuc.edu
cc: www-rdf-interest@w3.org
Message-ID: <884.1030017445@hoth.ilrt.bris.ac.uk>

>>>"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.

Using the W3C XML Schema language (henceforth WXS) to validate
RDF/XML is tricky but possible.  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.

> 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?  What about future updates
that are bound to happen with WXS?  A good case could be made for
ignoring say XHTML's namespaces.  And so on.

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 ;)

Received on Thursday, 22 August 2002 08:00:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:37 UTC