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

Re: Namespaces

From: Dirk-Willem van Gulik <dirkx@asemantics.com>
Date: Fri, 26 Mar 2004 17:10:18 +0100
Message-Id: <13687170-7F40-11D8-8F99-000A95CDA38A@asemantics.com>
Cc: "rdf-interest" <www-rdf-interest@w3.org>
To: "Eric Jain" <Eric.Jain@isb-sib.ch>


On Mar 26, 2004, at 4:52 PM, Eric Jain wrote:

> 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 ':'
> else
>   if there is a '#':
>     split at '#'
>   else if there is a '/' in the path
>     split at last '/'

You may also have a look at the NAPTR records for *.uri.net and 
*.urn.net - which
provide you with an up to date 'regex' for a fair number of URI's to do 
exactly
this splitting.

Dw
Received on Friday, 26 March 2004 11:10:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:48 UTC