Re: Use of XSD namespace in RDF recommendations

Hi Richard (Cyganiak),

On Sep 4, 2012, at 07:52, Richard Cyganiak <richard@cyganiak.de> wrote:
> Hi Richard,
> 
> On 31 Aug 2012, at 15:12, Richard Smith wrote:
>> 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.
> 
> The xs: prefix is conventionally associated with one namespace URI, and the xsd: prefix is conventionally associated with another URI. The URIs are similar -- they differ only in one character.
> 
> If a user just uses the URIs as given in the specs, they will be fine. A confusion will only arise if a user is very clever and notices the similarity and tries to "optimize" the namespace declaration; but at the same time is not clever enough to notice the one-character difference. As far as I know, we have no evidence, and no reason to believe, that this is a common confusion.
> 
> I don't think that the document is improved by explicitly addressing particular user confusions, *unless* we have evidence that it's a commonly held confusion.
> 
> So my vote is for no change.
> 
> (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 agree with you regarding no change.  However, I am curious what made you write the sentence above.  Can you please elaborate on why one is more likely to use XML Schema with RDF/XML than other RDF syntaxes?

Regards,
Dave


>  IMO this further strengthens the argument that a confused user is unlikely to actually find the note; they may or may not be looking in the right spec.)
> 
> Best,
> Richard

Received on Tuesday, 4 September 2012 12:04:19 UTC