W3C home > Mailing lists > Public > public-cwm-talk@w3.org > April to June 2007

Decomposing a URI into its components

From: Andrea Perego <andrea.perego@uninsubria.it>
Date: Mon, 23 Apr 2007 10:52:23 +0200
Message-ID: <462C73C7.5090204@uninsubria.it>
To: Public CWM <public-cwm-talk@w3.org>

I'm trying to use N3+Cwm in order to decompose a URI into its components
(scheme, authority, path, etc.).

Suppose we have a resource

<http://www.example.com/example1?sec=1#note2> a foaf:Document .

and we wish to extend it as follows

<http://www.example.com/example1?sec=1#note2> a foaf:Document;
  uri:scheme   "http";
  uri:host     "www.example.com";
  uri:path     "/example1";
  uri:query    "sec=1";
  uri:fragment "note2" .

Is it possible to obtain this through a rule? I checked Cwm's built-ins
(especially LOG and STRING), but I couldn't find any tip explaining how
this can be done.

Thanks

Andrea
Received on Monday, 23 April 2007 08:48:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:02 GMT