W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2003

Re: XMLSchema namespace confusion

From: Frank Manola <fmanola@mitre.org>
Date: Tue, 02 Sep 2003 21:21:20 -0400
Message-ID: <3F554210.50408@mitre.org>
To: Garret Wilson <garret@globalmentor.com>
Cc: www-rdf-interest@w3.org, fmanola@acm.org

Garret Wilson wrote:

> In RDF, to get a URI from a qname, one concatenates the URI designated 
> by the prefix with the local name. For example, rdf:Description yields 
> http://www.w3.org/1999/02/22-rdf-syntax-ns#Description.
> So what about XML Schema? The RDF Primer ( 
> http://www.w3.org/TR/2003/WD-rdf-primer-20030815/ ) uses the resource 
> http://www.w3.org/2001/XMLSchema#integer which, working backwards, 
> yields xsd:integer iff the namespace to XML Schema is 
> http://www.w3.org/2001/XMLSchema# . In fact, the RDF primer says that it 
> is:
> <blockquote>
> Primer examples will also use several "well-known" QName prefixes 
> (without explicitly specifying them each time), defined as follows:
> ...
> prefix xsd:, namespace URI: http://www.w3.org/2001/XMLSchema#
> </blockquote>
> Unfortunately, the XML Schema specification itself ( 
> http://www.w3.org/TR/xmlschema-2/#namespaces ) says that the XML Schema 
> namespace is http://www.w3.org/2001/XMLSchema (without the ending pound 
> sign).
> Isn't the XML Schema specification authoritative here? I'm guessing why 
> there's a discrepancy: we'd rather not look at a URI like 
> http://www.w3.org/2001/XMLSchemastring or 
> http://www.w3.org/2001/XMLSchemaint . But what justifies changing the 
> XML Schema namespace URI? Should we change the XLink namespace, too, so 
> we have http://www.w3.org/1999/xlink#href instead of 
> http://www.w3.org/1999/xlinkhref? Can RDF do that unilaterally?
> If I missed some new RDF rule that clears all this up, let me know.
> Thanks,
> Garret


Yes, the XML Schema specification is authoritative here, and no, we 
haven't changed the XML Schema namespace URI.

It's not a new RDF rule that clears all this up, it's the combination of 
old rules, plus the way the XML Schema Datatypes specification says to 
form URIrefs for datatypes.  If you look just above the place in the XML 
Schema Datatypes specification you're quoting from 
the spec says:

"Each built-in datatype in this specification (both ·primitive· and 
·derived·) can be uniquely addressed via a URI Reference constructed as 

    1. the base URI is the URI of the XML Schema namespace
    2. the fragment identifier is the name of the datatype

For example, to address the int datatype, the URI is:

     * http://www.w3.org/2001/XMLSchema#int"

So the XML Schema spec says that the URI for an xsd datatype has a pound 
sign in it; the RDF Primer isn't making that up.

What the Primer is trying to do is show how to correctly form those 
datatype URIrefs in RDF.  The section of the Primer you're quoting from 
is describing the use of QNames in abbreviating triples, and refers to 
the URIref that is associated with the QName prefix (xsd: in this case) 
as a "namespace URI", which is more-or-less what the XML Namespaces spec 
calls the same thing (actually, it calls it a "namespace URI reference", 
so I'm abbreviating a little).  The namespace URI in the Primer is 
chosen (*based on* the namespace name in the XML Schema spec) so that, 
following the RDF rules for forming URIrefs for QNames, xsd:int (for 
example) forms the proper XML Schema datatype URIref.  The Primer 
*doesn't say* that the URIref http://www.w3.org/2001/XMLSchema# assigned 
to xsd: in the Primer is *the same URI* that XML Schema specifies as its 
namespace name.  But if you do things as described in the Primer you 
will be *using* the XML-Schema-Datatypes-specified namespace name 
http://www.w3.org/2001/XMLSchema in such a way as to correctly form 
URIrefs for XML Schema datatypes, as defined in the XML Schema spec.


Frank Manola                   The MITRE Corporation
202 Burlington Road, MS A345   Bedford, MA 01730-1420
mailto:fmanola@mitre.org       voice: 781-271-8147   FAX: 781-271-875
Received on Tuesday, 2 September 2003 20:56:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 6 January 2021 22:03:26 UTC