W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > October 2007

CWM Bug: --base broken on stdin

From: Sean B. Palmer <sean@miscoranda.com>
Date: Mon, 15 Oct 2007 10:54:10 +0100
Message-ID: <b6bb4d890710150254r1f736a66s8857f07f5f17c274@mail.gmail.com>
To: public-cwm-bugs@w3.org

Two bugs in one:

$ echo $PWD
/tmp

$ echo ':p :q :r .' | cwm --base=http://example.org/test
#Processed by Id: cwm.py,v 1.195 2007-08-23 16:28:29 syosi Exp
        #    using base http://example.org/test

#  Notation3 generation by
#       notation3.py,v 1.197 2007-09-09 22:49:43 timbl Exp

#   Base was: http://example.org/test
     @prefix : <file:///private/tmp/#> .

    :p     :q :r .

#ENDS

The first bug is that --base isn't being used.

The second bug is that when the $PWD is being used, it's resolving the
symlink. I didn't even know that /tmp was symlinked on OS X, but
apparently it is:

$ ls -al /tmp
lrwxr-xr-x   1 root  admin  11 Apr 18  2006 /tmp@ -> private/tmp

Anyway, cwm doesn't use HTTP URI redirects for namespace purposes:

$ curl -Is http://inamidst.com/misc/pinky.n3
HTTP/1.1 301 Moved Permanently
Date: Mon, 15 Oct 2007 09:49:58 GMT
Server: Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_python/3.2.10
Python/2.4.4 PHP/4.4.4-8+etch1 proxy_html/2.5 mod_ssl/2.2.3
OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
Location: http://inamidst.com/misc/perky.n3
Content-Type: text/html; charset=iso-8859-1

$ curl -s http://inamidst.com/misc/perky.n3
<> a :Document .

$ cwm http://inamidst.com/misc/pinky.n3 --ntriples
<http://inamidst.com/misc/pinky.n3>
 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
  <http://inamidst.com/misc/pinky.n3#Document> .

So it shouldn't resolve symlinks either; or it should at least be consistent.

Thanks,

-- 
Sean B. Palmer, http://inamidst.com/sbp/
Received on Monday, 15 October 2007 09:54:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:01 UTC