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

Use of XSD namespace in RDF recommendations

From: Richard Smith <richard@ex-parrot.com>
Date: Fri, 31 Aug 2012 15:12:58 +0100 (BST)
To: public-rdf-comments@w3.org
Message-ID: <alpine.LRH.2.02.1208311426030.7484@sphinx.mythic-beasts.com>

In WD-rdf11-concepts-20120605 (and other RDF drafts and 
recommendations), the xsd prefix is typically bound to the 
following URI:

   http://www.w3.org/2001/XMLSchema#

In the XML Schema recommendations (both 1.0 and 1.1), they 
bind the xs prefix to

   http://www.w3.org/2001/XMLSchema

Note the lack of the trailing '#'.  Per the XML namespace 
recommendation, xsd:string and xs:string are distinct QNames 
as they have different namespace URIs.

Most of the time this isn't a problem.  If you're writing 
RDF, you add the '#'; if you're writing XML Schema, you 
don't.  But there are situations where the difference does 
cause surprising consequences.  For example, here is a cut 
down version of a real case I recently had to investigate.

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

Richard
Received on Friday, 31 August 2012 14:12:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:53 UTC