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

Re: Use of XSD namespace in RDF recommendations

From: Dan Brickley <danbri@danbri.org>
Date: Tue, 4 Sep 2012 20:40:37 +0800
Message-ID: <CAFfrAFraxhdgMWTrkibvSz+RBCxMz+aKHnhWNQ=k6rqbW09cTA@mail.gmail.com>
To: Richard Smith <richard@ex-parrot.com>
Cc: Richard Cyganiak <richard@cyganiak.de>, public-rdf-comments@w3.org
On 4 September 2012 20:26, Richard Smith <richard@ex-parrot.com> wrote:
>
> Hi Richard,
>
> Richard Cyganiak wrote:
>>
>> Richard Smith wrote:
>
>
> [snip]
>
>
>>>  <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
>
>   http://www.w3.org/TR/xmlschema-0/#POSchema
>
> 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. E.g.
>
>   <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
>              targetNamespace="http://www.example.com/geo">
>     <xs:simpleType name="chapman-code">
>       <xs:restriction base="xs:string">
>         <!-- I could enumerate them or use a pattern -->
>       </xs:restriction>
>     <xs:simpleType>
>   </xs:schema>
>
> 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
>
>   http://www.example.com/geo#chapman-code
>
> 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.

Just FWIW, this old-ish Note discusses that issue:
http://www.w3.org/TR/swbp-xsch-datatypes/

Dan
Received on Tuesday, 4 September 2012 12:41:05 UTC

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