W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2001

RE: Formation of RDF terms

From: McBride, Brian <bwm@hplb.hpl.hp.com>
Date: Thu, 25 Jan 2001 18:22:34 -0000
Message-ID: <5E13A1874524D411A876006008CD059F0183D5DB@0-mail-1.hpl.hp.com>
To: Aaron Swartz <aswartz@upclink.com>, RDF Interest <www-rdf-interest@w3.org>

I'm assuming that when you say "RDF term" you mean the URI
of a property.

Given a strict interpretation of the spec, what you say is
not correct, but in most cases it probably is.

I could have:

<rdf:RDF xmlns:rdf="..."

In this case the <foo:bar> would represent a property whose
URI is http://foobar and if you split that at the last '/'
then you won't get the right split.

It is good practise when defining RDF namespaces to end them
in a character like '/' or '#' that can't be part of an XML
Qname.  If you do that, and many do,then your algorithm works
just fine.

My Jena implementation uses the algorithm you describe when
a property object is constructed from a URI.  It also provides
a constructor which enables an application to specify
explicitly the namespace and localname parts of the URI.


> -----Original Message-----
> From: Aaron Swartz [mailto:aswartz@upclink.com]
> Sent: 24 January 2001 18:56
> To: RDF Interest
> Subject: Formation of RDF terms
> I have a question on the formation of RDF terms:
> For a given RDF term x, can it be assumed that for every 
> character following
> the last # (or if none exists, the last /) is the name and 
> the rest is the
> namespace?
> Example:
>  http://example.webns.net/term/fries/smelly
>     Namespace: http://example.webns.net/term/fries/
>     Term: smelly
>  http://example.webns.net/term/fries#smelly
>     Namespace: http://example.webns.net/term/fries#
>     Term: smelly
> Is this correct? (This would mean that no RDF terms could 
> include a / or a
> #, right?)
> -- 
> Aaron Swartz <me@aaronsw.com>| ...schoolyard subversion...
>   <http://www.aaronsw.com>   |  because school harms kids
> AIM: JediOfPi | ICQ: 33158237|  http://aaronsw.com/school/
Received on Thursday, 25 January 2001 13:22:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:34 UTC