W3C home > Mailing lists > Public > public-cwm-talk@w3.org > January to March 2005

Re: @keywords: Notation3 Pre-Processor

From: Yosi Scharf <syosi@mit.edu>
Date: Sun, 16 Jan 2005 10:08:46 -0500
Message-ID: <41EA837E.6080002@mit.edu>
To: "Sean B. Palmer" <sean+cwm@infomesh.net>
Cc: Tim Berners-Lee <timbl@w3.org>, public-cwm-talk@w3.org

Sean B. Palmer wrote:

> Tim Berners-Lee wrote:
>> It does or doesn't output a @keywords keyword ... if it
>> does presumably some old N3 parsers won't recognize it.
> Right, though I thought the only issue was tokenization, and for that 
> either method (empty @keywords declarations or removing them entirely) 
> will work. Adding the capability to remove @keywords altogether and 
> prefix the barenames with a colon instead is very simple; I've 
> appended a patch for it [1]. It depends on which format you decide is 
> best for the canonicalised N3 that parsers will be accepting. I guess 
> removing @keywords entirely would probably be best.
> I've modified n3pp.py online to be the patched version, and all of the 
> tests still pass. For even further backwards compatibility, it'd have 
> to add "@prefix : <#> ." at the top of each file of course.
There is a minor bug in the patched version. I created a file, named it 
c.n3, and gave it the content:
"hello" @a_m .

I then ran:
[syosi@yosi n3p]$ ./n3p.py c.n3

and I got an exception (obviously)
Then I ran:
[syosi@yosi n3p]$ python2.4 n3pp.py c.n3 > d.n3 && ./n3p.py d.n3
and got no error.

clearly, the preprocessor made an invalid file valid.

Received on Sunday, 16 January 2005 15:09:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:04 UTC