W3C home > Mailing lists > Public > public-rdf-comments@w3.org > September 2012

Re: Use of XSD namespace in RDF recommendations

From: Richard Smith <richard@ex-parrot.com>
Date: Tue, 4 Sep 2012 13:26:34 +0100 (BST)
To: Richard Cyganiak <richard@cyganiak.de>
cc: public-rdf-comments@w3.org
Message-ID: <alpine.LRH.2.02.1209041256250.7484@sphinx.mythic-beasts.com>

Hi Richard,

Richard Cyganiak wrote:
> Richard Smith wrote:


>>  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>>      xmlns:dct="http://purl.org/dc/terms/">
>>    <xsd:annotation><xsd:appinfo>
>>      <rdf:RDF><rdf:Resource about="">
>>        <dct:issued
>>          rdf:datatype="xsd:gYearMonth">2012-08</dct:issued>
>>      </rdf:Resource></rdf:RDF>
>>    </xsd:appinfo></xsd:annotation>
>>  </xsd:schema>
>> I certainly don't think a substantive change is required. 
>> But at the risk of advancing the argument that I wrote 
>> bad RDF and therefore it's a bug in someone else's 
>> standard, I do think a non-normative note mentioning this 
>> difference might be in order.
> The xs: prefix is conventionally associated with one 
> namespace URI, and the xsd: prefix is conventionally 
> associated with another URI.

Except that isn't applied uniformly, even amongst the W3 
recommendations.  For instance, in section 2.1 of the XML 
Schema Primer


the example begins with

   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

and that recommendation uniformly uses 'xsd' as the 
prefix for the XML Schema namespace, without the '#'.

And a google search finds comparably many hits for 
"xsd:element" and "xs:element", so even if using 'xs' is 
recommended practice, it certainly doesn't seem to be 
established practice.

> As far as I know, we have no evidence, and no 
> reason to believe, that this is a common confusion.

Probably not in the form I gave.  But the much the same 
problem manifests in a second manner that I hadn't 
considered when I sent the earlier email.  I think this is 
more serious.

The implication of section 5 of the RDF 1.1 Concepts draft 
is that it should be possible to use suitable types from 
third-party XML Schemas.  A real example: English counties 
have a three-letter abbreviation known as a Chapman code, 
and I can define an XML Schema type to represent them. 

   <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
     <xs:simpleType name="chapman-code">
       <xs:restriction base="xs:string">
         <!-- I could enumerate them or use a pattern -->

If I want to use this type in RDF, what is its datatype URI? 
The RDF 1.1 Concepts draft is silent on the issue.  By 
comparison with XML Schema, we might infer that it should be


But nothing in the Concepts draft says we should add a '#' 
in this way.  And I am aware of nothing in the XML Schema 
recommendations that defines the notion of a datatype URI 
for a schema type.

And if we do add the '#', do we still do this if the XML 
Schema targetNamespace already ends with a '#'?  Or with a 

> (It also seems more of an RDF/XML issue than an RDF 
> Concepts issue to me, given that RDF/XML is the one RDF 
> technology that is somewhat likely to be used in 
> conjunction with XML Schema.

I'm not sure I agree.  In some ways, I think RDFa is the 
most likely technology to be used within an XML Schema.

Received on Tuesday, 4 September 2012 12:26:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:31 UTC