W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2004


From: Eric Jain <Eric.Jain@isb-sib.ch>
Date: Fri, 26 Mar 2004 16:52:05 +0100
Message-ID: <001101c4134a$49830f10$c300000a@caliente>
To: "rdf-interest" <www-rdf-interest@w3.org>

I have long wondered what is the correct way to extract a namespace and
local name from arbitrary resources. This is what I am doing, currently:

if protocol is urn:
  split at last ':'
  if there is a '#':
    split at '#'
  else if there is a '/' in the path
    split at last '/'

http://test.org/schema#Foo -> {http://test.org/schema#}Foo
http://test.org/schema/Foo -> {http://test.org/schema/}Foo
urn:isbn:12345 -> {urn:isbn:}12345

I suspect this approach is broken (for example, there is no requirement
that the last part of a path be a valid QName etc.). So how are other
people handling this? Any relevant W3C documents?
Received on Friday, 26 March 2004 10:52:33 UTC

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