Referring to resources in RDF attributes

A possible RDF issue?

I recognize RDF core WG is not strictly chartered to make changes to the 
RDF syntax, but there is a small change that I think could greatly enhance 
usability of RDF, if it doesn't break any other rules.

Currently, resource identifier values specified in attributes such as 
"about", "resource", "aboutEach" and "type" are specified as 
URI-references.  The same resources used in element or attribute names are 
specified as Qnames.

I have for some time assumed that there is a good reason for Qname syntax 
to be unavailable in attribute values but I recently noticed another 
specification that allows interpretation Qnames in attribute values, which 
leads me to question my assumption.

In the CC/PP specification [1] examples, DTD entity definitions are used to 
make such attributes more readable, but this has been criticized as being 
incompatible with future directions for XML.  It would be so much easier if 
Qnames could be used here.  I have noticed similar complications in other 
examples of RDF.

So, what would be the possible problems of allowing Qnames in the RDF/XML 
syntax for the attributes mentioned?

(a) does it break any assumed processing models?  I don't think so, but I'm 
not certain about this.

(b) how does one distinguish between a Qname and a 'bare' URI-reference 
(the bare URI form MUST be allowed for backward compatibility)?


Here's a simple example of the kind of thing I am thinking of:

Current RDF syntax:

   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:rdfs="http://www.w3.org/1999/PR-rdf-schema-19990303#">
     <rdf:Description about="http://www.example.org/Set">
       <rdf:type 
resource="http://www.w3.org/1999/PR-rdf-schema-19990303#Class"/>
       <rdfs:subClassOf 
rdf:resource="http://www.w3.org/1999/PR-rdf-schema-19990303#Container"/>
     </rdf:Description>
   </rdf:RDF>


Using Qnames:

   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:rdfs="http://www.w3.org/1999/PR-rdf-schema-19990303#"
            xmlns:eg="http://www.example.org/Set">
     <rdf:Description about="eg:Set">
       <rdf:type resource="rdfs:Class"/>
       <rdfs:subclassOf rdf:resource="rdfs:Container"/>
     </rdf:Description>
   </rdf:RDF>


#g
--

[1] CC/PP draft <http://www.w3.org/TR/CCPP-struct-vocab/>



------------
Graham Klyne
(GK@ACM.ORG)

Received on Wednesday, 18 April 2001 08:29:30 UTC