W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2001

Re: XQuery and RDF datatypes was: RDF specifications

From: Jonathan Borden <jborden@mediaone.net>
Date: Wed, 5 Dec 2001 19:22:05 -0500
Message-ID: <023d01c17dec$092184b0$0a2e249b@nemc.org>
To: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>
Cc: <www-rdf-interest@w3.org>
Peter F. Patel-Schneider wrote:

> > I thought we were discussing XML Schema datatypes, if you are instead
> > talking XQuery algebra then I couldn't agree more on that value of
> > incorporating this into RDF for several reasons (read on).
> Nope, I'm talking about XML Schema datatypes.  As far as I know, XML
> datatypes are the only official way of putting datatype information in XML
> documents.

For simple types like "integer" and "float", I agree (XML 1.0 itself defines
defines a set of attribute types derived from SGML types), and for these XML
Schema does specify URI references. On the other hand DAML+OIL suggests that
XML Schema can be used for general datatypes. This poses a problem as I and
others have discussed before:

For example (from a document you are well familiar with
http://www.daml.org/2001/03/daml+oil-walkthru.html#individuals) where it is
suggested that an XML Schema document can be referenced:

<xsd:schema xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#">

<xsd:simpleType name="over12">
  <!-- over12 is an XMLS datatype based on decimal -->
  <!-- with the added restriction that values must be >= 13 -->
  <xsd:restriction base="xsd:decimal">
  <xsd:minInclusive value="13"/>

<xsd:simpleType name="over17">
  <!-- over17 is an XMLS datatype based on positiveIntege -->
  <!-- with the added restriction that values must be >= 18 -->
  <xsd:restriction base="xsd:positiveInteger">
  <xsd:minInclusive value="18"/>
Then we could reference elements of this file in DAML+OIL restrictions, as

<daml:Class rdf:ID="Adult">
  <daml:intersectionOf rdf:parseType="daml:collection">
    <daml:Class rdf:about="#Person"/>
      <daml:onProperty rdf:resource="#age"/>

What you _wish_ to do is to use the value of the _name_ attribute as a
fragment identifier, correct? Firstly, the _actual_ XML Namespace for XML
Schema is http://www.w3.org/2001/XMLSchema (i.e. without the trailing '#',
which turns out to be important because if the "xsd" prefix is then used in
an RDF document ala <xsd:integer>5</xsd:integer> it will parse (via RDF)
rules to the URI http://www.w3.org/2001/XMLSchemainteger --- which is not
what you want)

Secondly, the "name" attribute in an XML Schema document is NOT of type ID,
i.e. is not used to create fragment identifiers. The problem is that "name"s
are not required to be unique in XML Schema, i.e. it is entirely possible to
have all of the above in a single schema:

<xsd:element name="foo"> ...
<xsd:attribute name="foo"> ...
<xsd:simpleType name="foo"> ...
<xsd:complexType name="foo"> ...


The XML Schema Formal Description discusses this specific issue and proposes
a _new_ URI syntax which does properly identify XML Schema items _but not by

> [...]
> > > My stance is quite simple.
> > >
> > > 1/ RDF should incorporate XML Schema datatypes.
> >
> > I am not sure how RDF can 'incorporate' XML Schema datatypes alone. Do
> > mean that the RDF DT semantics should incorporate XSFD and/or XQFS? Or
> > you mean that RDF should incorporate the concepts of 'string' 'integer'
> > 'date'?
> The model theory should incorporate, at least, XML Schema primitive
> datatypes.  RDF/XML syntax should allow, at least, the specification of
> Schema primitive datatypes, using the xsi:type construct.  (I would like
> go much further, of course.  I think that the natural place is to have the
> input to RDF from XML syntax be the XQuery 1.0 and XPath 2.0 Data model.)

For the above reason (namely that you need a correct way to generate a URI
for an XML Schema type) I think you will need to incorporate at least parts
of XS-formal and probably XQ-formal

> >
> > Careful, because there are known inconsistencies between XML Schema
> > and XSFD as well as XQFS (this is much of the _reason_ they were
> > _after_ XML Schema 1.0 was specified). Hopefully the work of XSFD/XQFS
> > be incorporated into XSD 1.1.
> Yes, it would be much better if the XML-related stuff was in a better
> shape.  That is why I'm arguing for XML Schema---to pick one of the
> contenders, and the one that, I think, has the closest relationship to
> RDF/XML syntax.

Of course all the XML diehards I know say the same thing about RDF so there
you have it.

Received on Wednesday, 5 December 2001 19:22:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:38 UTC