W3C home > Mailing lists > Public > www-archive@w3.org > June 2001

Problems with sax2rdf.py

From: Aaron Swartz <aswartz@swartzfam.com>
Date: Mon, 04 Jun 2001 12:44:04 -0500
To: Dan Connolly <connolly@w3.org>, Tim Berners Lee <timbl@w3.org>
CC: <www-archive+n3bugs@w3.org>
Message-ID: <B7413312.D17F%aswartz@swartzfam.com>
Below is a patch to sax2rdf.py -- it fixes two bugs I found:

 - Appends the genPrefix to the base URI so that genids aren't left
"hanging" in space.

 - Uses the new FORMULA type for formulas, as opposed to RESOURCE

Hope this helps,
-- 
[ :name "Aaron Swartz" ] is dc:author of <> .

[aswartz@v123-1 swap]$ cvs diff sax2rdf.py
Index: sax2rdf.py
===================================================================
RCS file: /sources/public/2000/10/swap/sax2rdf.py,v
retrieving revision 1.3
diff -r1.3 sax2rdf.py
61a62
> FORMULA = notation3.FORMULA
85c86
<         self._genPrefix = "#_g"    # @@@ allow parameter override
---
>         self._genPrefix = self._thisURI + "#_g"    # @@@ allow parameter
override
179c180
<             self.sink.makeStatement(( (RESOURCE, self._context),
---
>             self.sink.makeStatement(( (FORMULA, self._context),
188c189
<             self.sink.makeStatement(( (RESOURCE, self._context),
---
>             self.sink.makeStatement(( (FORMULA, self._context),
207c208
<                 self.sink.makeStatement((  (RESOURCE, c),
---
>                 self.sink.makeStatement((  (FORMULA, c),
286c287
<                         self.sink.makeStatement(( (RESOURCE, c),
---
>                         self.sink.makeStatement(( (FORMULA, c),
302c303
<                                 self.sink.makeStatement(( (RESOURCE, c),
---
>                                 self.sink.makeStatement(( (FORMULA, c),
320c321
<                     self.sink.makeStatement(((RESOURCE, self._context),
---
>                     self.sink.makeStatement(((FORMULA, self._context),
326c327
<                     self.sink.makeStatement(((RESOURCE, self._context),
---
>                     self.sink.makeStatement(((FORMULA, self._context),
341c342
<             self.sink.makeStatement(( (RESOURCE, c),   # Link in new pair
---
>             self.sink.makeStatement(( (FORMULA, c),   # Link in new pair
346c347
<             self.sink.makeStatement(( (RESOURCE, c),
---
>             self.sink.makeStatement(( (FORMULA, c),
360c361
<             self.sink.makeStatement(( (RESOURCE, c), # Link to new object
---
>             self.sink.makeStatement(( (FORMULA, c), # Link to new object
381c382
<             self.sink.makeStatement(( (RESOURCE, self._context),
---
>             self.sink.makeStatement(( (FORMULA, self._context),
388c389
<             self.sink.makeStatement(( (RESOURCE, self._context),
---
>             self.sink.makeStatement(( (FORMULA, self._context),
Received on Monday, 4 June 2001 13:44:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:13 GMT