W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2000

Re: the hash sign

From: Pierre-Antoine CHAMPIN <champin@cpe.fr>
Date: Thu, 10 Feb 2000 15:25:13 +0100
Message-ID: <38A2CA49.C3C48E42@cpe.fr>
To: John.Parnefjord@kib.ki.se
CC: W3C RDF-interest <www-rdf-interest@w3.org>
John Parnefjord wrote:
> Could anyone explain about the hash-sign (#) following the URI when declaring XML namespaces in RDF. For example you may write:
> 
> <rdf:RDF
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:schema="http://mysite.org/schema/">
>    <rdf:Description about="">
>       <schema:property1>some value</schema:property1>
>         <schema:property2>some value</schema:property2>
>    </rdf:Description>
> </rdf:RDF>

this is because the RDF parser is supposed to simply concatenate namespace with the element name to get the expanded name.
Though this is not compliant with the XML-Namespaces-rec, this is a good way to take profit of the namespace mechanism
and still work with simple URIs.
(in XML-Namespaces-rec, expanded names are structures with 2 fields : the namespace and the name)

> Is this suffix used as an anchor, as in HTML? In that case rdf:Description could be translated to http://www.w3.org/1999/02/22-rdf-syntax-ns#Description, and by doing this you can point to a definition of the property.

That's right.

> Why not using the same technique for the second schema then?

why so ? The schema could be distributed in many files on //mysite.org/,
each file describing the resource it is named after.
The advantage of this mechanism for expanding name is that it allows more than one kind of schema.

By the way, I remember someone mentionning tricky uses of namespaces in RDF,
with a namespace ending neither by a "#" nor a "/".
Thus the expanded URIs pointed to files with a common prefix.

  Pierre-Antoine

--- Quid quid Latine dictum sit, altum viditur
    Whatever is said in Latin sounds important.
Received on Thursday, 10 February 2000 09:23:40 GMT

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