Re: Cwm namespace/URI bug?

On Thu, 2003-08-28 at 15:14, Ryan Lee wrote:
> (using the latest version of 2000/10/swap, with cwm.py 1.135, 2003/08/25)
> 
> Consider a file a.n3:
> 
>  % cwm --n3 a.n3
> 
>  result: [[
>  @prefix : <http://www.example.org/ns#> .
> 
>  :s :p :o .
>  # ENDS
>  ]]
> 
> This is good.  But if I call cwm with the following (assuming
> a.n3 is the same as above):
> 
>  % cwm --n3 http://www.example.org/a.n3 > o.n3
> 
>  result: [[
>  @prefix : </ns#> .
> 
>  :s :p :o .
>  # ENDS
>  ]]
> 
> If I were to then use that output for something else, the namespace would
> render it incorrect for most situations.

Incorrect? How do you mean?

>   Perhaps cwm should not be so
> eager to look for relative URIs when it comes to namespaces.  Or something
> like that.
> 
> This is particularly troublesome when doing work with files coming off
> www.w3.org that use at least one namespace that starts with
> 'http://www.w3.org/'.  It can be worked around by using cwm with
> no-prefix, absolute URI flags, --n3=pr.  It does NOT work if the --n3=r
> (suppress relative URIs) option is used on its own nor if --n3=p is used
> on its own.

cwm assumes the output goes to the same part of URI space
as the input; if you violate that assumption by moving the
the output to file: space when the input came from http: space,
you need to tell cwm by way of the --base option, I think.

>   I would rather see 'http://' namespaces go untouched no
> matter what flags are used.

I don't see any straightforward way to do that.

> Information on what I might be doing wrong would also be greatly
> appreciated.
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 28 August 2003 16:30:51 UTC