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

RE: xmlns, uri+name pairs or just uris..? Clarification needed.

From: McBride, Brian <bwm@hplb.hpl.hp.com>
Date: Sat, 22 Jul 2000 15:52:52 +0100
Message-ID: <5E13A1874524D411A876006008CD059F239309@0-mail-1.hpl.hp.com>
To: "'Jan Grant'" <Jan.Grant@bristol.ac.uk>, www-rdf-interest@w3.org
Hi Jan,

From section 6 of the model and syntax spec:

  Each propertyElt E contained by a Description element results in the
  creation of a triple {p,r,v} where:

   1.p is the expansion of the namespace-qualified tag name (Generic
     Identifier) of E. This expansion is generated by concatenating the
     namespace name given in the namespace declaration with the LocalPart
     of the qualified name.

This defines the mapping of qname to a URI.

One potential problem with it is that it is not in general reversible, i.e.
given an arbritary URI it is not in general possible to split it into the
correct namespace part and localname part.  It was Sergey who pointed out
to me that provided the namespace URI REF's end in a character which is not
legal in a local name, such as '/' or '#', then it is possible to get the
correct split by scanning from the end of the URI backwards, looking for the
first character which cannot be in a localname.

Some of the examples I have seen tend to end in a '#' which is intended to
enable the use of ID attributes to define new properties, classes etc in
schema definitions.  For me, I have a problem with naming things relative
to the URI of the document the text happens to be found in, but thats
another
issue.

Its maybe a shame that the expansion algorithm wasn't reversible in general,
but there you go.

Brian


> -----Original Message-----
> From: Jan Grant [mailto:Jan.Grant@bristol.ac.uk]
> Sent: 22 July 2000 12:53
> To: www-rdf-interest@w3.org
> Subject: xmlns, uri+name pairs or just uris..? Clarification needed.
> 
> 
> Excuse me for zoning in on this a bit late, but what exactly is the
> state of play regarding namespaces in RDF?
> 
> As I understand it, an xmlns-qualified name is a pair of 
> (namespace URI,
> name); there is no composition function implied apart from the trivial
> "shove both bits into a pair".
> 
> But RDF claims that resources are (or are identified by) URIs
> only; there seems to be an (implicit? explicit?) composition function
> that takes the namespace and the name part and produces a URI 
> from them.
> 
> Can someone please clear this up for me once and for all?
> 
> jan
> 
> PS. Obviously a pair of (nsuri, name) can be uniquely mapped 
> onto a URI
> using some cheesy hack like inventing a URI scheme like
> 
> 	nselement:[nsuri]name
> 
> but there's probably a better way to do this.
> 
> -- 
> jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
> Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 
> jan.grant@bris.ac.uk
> HP-unix: Open Sauce product, available in 57 distributions.
> 
Received on Saturday, 22 July 2000 10:53:02 GMT

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