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

Re: Decomposing a URI into its components

From: Sandro Hawke <sandro@w3.org>
Date: Mon, 14 May 2007 10:28:23 -0400
To: Andrea Perego <andrea.perego@uninsubria.it>
Cc: Public CWM <public-cwm-talk@w3.org>
Message-ID: <21933.1179152903@ubuhebe>


Andrea Perego <andrea.perego@uninsubria.it> writes:
> 
> Thanks. Yes, this is what I did. However, this way I had to specify one
> rule for each URI component:
> 

...  stuff like:

> # Scheme
> 
>   {(?uri "^([^:/?#]+):") string:scrape ?scheme} => {?rsc uri:scheme
>     ?scheme} .

So, the nice trick would be to make sure your "uri" namespace prefix is
properly dereferenceable, so that once you've provided these
definitions, folks can just use uri:scheme, etc, as if they were
builtins.  I think that will work, or at least it should.  (You might
need to give cwm certain flags.  It's been some years since I used that
feature.)  If you think about what you're doing as providing a standard
library for parsing URIs, then it may not seem quite so messy.

     -- Sandro
Received on Monday, 14 May 2007 14:28:30 GMT

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