W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2003

RDF Namespace Resolution Proposal: A Bone for Discussion

From: James Cerra <jimbobbs@hotmail.com>
Date: Fri, 07 Nov 2003 10:24:12 -0500
To: www-rdf-interest@w3.org
Message-ID: <Law15-F83ksJDQ8S2km00014a3e@hotmail.com>

I was reading the "Addressing the QName to URI mapping problem" [1,2] and a 
thought occured.  Although I think its too simple and probably won't work, 
it might generate some discussion.

The idea is to use "qname" like prefixes for URI bases.  Each prefix would 
be a NCName and be declared via a normal xmlns attribute; however, the 
prefix stands for an xml-entity-like representation for the namespace URI.  
There should be two predefined prefixes, "uri" and the empty string "", 
which resolve to an empty string prefix "".

Then, a new resolution mechanism for RDF would be used.  Here's the formula 
for a string to be interpreted as a URI:

1) If there is no colon in the string, then it is a relative URI.  Thus, if 
the base is "http://www.example.com/", then "hello/world/" maps to 

2) If there is a colon in the string, then x is the part before the first 
colon and y is the part after it.  Thus, x is "ex" and y is "foo" in the 
string "ex:foo".  Also note that x is "uri" and y is 
"http://www.example.com" in "uri:http://www.example.com".  Finally, x is the 
empty string "" and y is "http://www.example.com" in 

3) If x is one of the predefined prefixes, "uri" or the empty string "", 
then y is the URI.  Thus, "uri:http://www.example.com" and 
":http://www.example.com" both map to the URI, "http://www.example.com".  
Also note that ":hello/world" maps to the relative URI, "hello/world".

4) If x is a declared xml namespace prefix, then the URI is y concatinated 
after the namespace URI.  Thus, if I declared 
xmlns:ex1="http://www.example.com" and ex2="http://www.example.com/foo/", 
then "ex1:/foo/bar" and "ex2:bar" both map to the URI, 

5) If x is not a declared xml namespace, then the URI is the concatination 
of, in order, x, ":", and y.  Thus, if "http" is not declared, then 
"http://www.example.com" maps to the URI "http://www.example.com".

It seems to me that would solve a bunch of problems.  URIs and base-prefixed 
URIs would be easy to interpret.  Furthermore, the mechanism is compatible 
with the 1999 RDF if no prefixex conflicts with URI schemes are declared.  
Finally, since the proposal interpretes a prefixe as entitie representing a 
base URI rather than a QName namespace URI, then some of the issues with 
QNames are not involved.

However, there are some drawbacks.  The proposed mechanism is not compatible 
with 1999 RDF if there are prefix conflicts, and one can forget to put in a 
first colon to explicitly specify a full URI.  There is also slightly more 
complexity than the existing mechanism for resolving strings to URIs.  
Finally, this proposal is only applicable to XML serializations of RDF, IMO.

P.S.  I suggest these are called "RNames" since R is the next letter after 
Q!  :-)

-- Jimmy Cerra

Great deals on high-speed Internet access as low as $26.95.  
https://broadband.msn.com (Prices may vary by service area.)
Received on Friday, 7 November 2003 10:24:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:03 GMT