Base URI/default namespace interaction

I spotted this in a question on the Jena mailing list, which I think might 
be useful to incorporate into a test case.

[[
<rdf:RDF
     xmlns="http://owl.protege.stanford.edu#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#">

   <owl:Ontology rdf:about=""/>

   <owl:AnnotationProperty rdf:ID="creator" />

   <owl:Class rdf:ID="MusicalWork">
     <creator>Me</creator>
   </owl:Class>

</rdf:RDF>
]]

I think (though I'm not certain) that the creator declared to be an 
'owl:AnnotationProperty' is not necessarily the same as the creator 
property applied to the owl:Class instance.

The former occurrence is qualified by the current base URI (IIRC), and the 
latter is qualified by the default XML namespace, no?  (I think this 
violates the principle of minimum surprise, but don't see that that can be 
helped.)

But, because of the surprising element of this, I think an illustrative 
test case may be appropriate; e.g.

[[
<rdf:RDF
     xmlns="http://www.example.org/default/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:ex="http://www.example.org/example/">

   <rdf:Property rdf:ID="creator" >
     <rdfs:domain rdf:resource="&ex;Blob" />
   </rdf:Property>

   <ex:Thing rdf:ID="MusicalWork">
     <creator>Me</creator>
   </ex:Thing>

</rdf:RDF>
]]

DOES NOT entail:

[[
   <ex:Thing rdf:ID="MusicalWork">
     <rdf:type rdf:resource="&ex;Blob" />
   </ex:Thing>
]]

(unless the current XML base happens to be "http://www.example.org/default/")

#g


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Thursday, 27 November 2003 06:57:34 UTC