Re: the hash sign

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 UTC