Re: swap/sax2rdf.py: datatype too sticky

Thanks, Ryan!

I must re-find that python lint-like thing danc pointed me at.

Have you tried cvs update -d LX to get the LX code?

or PYTHONPATH=.. python retest...

Tim

On Monday, Aug 25, 2003, at 23:16 US/Eastern, Ryan Lee wrote:

> Looks like a typo.
>
> [[[
>    self._dataType = None
> ]]] - line 355 sax2rdf.py
>
> shouldn't be funkyCased:
>
> [[[
>    self._datatype = None
> ]]]
>
> Output is then:
> [[[
> <rdf:RDF xmlns="http://opencyc.sourceforge.net/daml/cyc.daml#"
>     xmlns:log="http://www.w3.org/2000/10/swap/log#"
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>
>     <rdf:Description  
> rdf:about="http://opencyc.sourceforge.net/daml/cyc.daml#Sunday">
>         <rdf:type  
> rdf:resource="http://opencyc.sourceforge.net/daml/ 
> cyc.daml#DayOfWeekType"/>
>         <dayAbbr  
> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#">SU</ 
> dayAbbr>
>         <index  
> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#"
>              
> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">6</index>
>         <nameString>Sunday</nameString>
>     </rdf:Description>
> </rdf:RDF>
> ]]]
>
> I am trying to run the regression suite, but a bunch of stuff dealing  
> with
> LX is preventing me from success, thus I haven't checked the
> one-character change in (someone who can correct this is welcome to
> check it in).  The error is the following each time:
> [[[
> Traceback (most recent call last):
>   File "../cwm.py", line 54, in ?
>     import LX.kb
>   File "../LX/kb.py", line 9, in ?
>     import LX.rdf
>   File "../LX/rdf.py", line 13, in ?
>     from LX.defaultns import rdfns, lxns
> ImportError: No module named defaultns
> ]]]
>
> On Mon, 25 Aug 2003, Dan Connolly wrote:
>> I think I found a bug in the datatype handling
>> of
>>   sax2rdf.py,v 1.34 2003/08/14 00:00:19 timbl Exp
>>
>> Consider this input:
>>
>> <rdf:RDF xmlns="http://opencyc.sourceforge.net/daml/cyc.daml#"
>>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>>     <DayOfWeekType
>> rdf:about="http://opencyc.sourceforge.net/daml/cyc.daml#Sunday">
>>         <dayAbbr
>> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#">SU</ 
>> dayAbbr>
>>         <index
>> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#"
>>
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">6</index>
>>         <nameString>Sunday</nameString>
>>     </DayOfWeekType>
>> </rdf:RDF>
>>
>> cwm seems to think Sunday is an integer:
>>
>> $ python ../../2000/10/swap/cwm.py --rdf
>> ../../2000/10/swap/test/syntax/dtdirty.rdf
>>
>> <!-- Processed by Id: cwm.py,v 1.136 2003/08/20 11:50:57 sandro Exp  
>> -->
>> <!--     using base
>> file:/home/connolly/w3ccvs/WWW/2000/10/swap/test/syntax/dtdirty.rdf-->
>>
>>
>> <rdf:RDF xmlns="http://opencyc.sourceforge.net/daml/cyc.daml#"
>>     xmlns:log="http://www.w3.org/2000/10/swap/log#"
>>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>>
>>     <DayOfWeekType
>> rdf:about="http://opencyc.sourceforge.net/daml/cyc.daml#Sunday">
>>         <dayAbbr
>> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#">SU</ 
>> dayAbbr>
>>         <index
>> xmlns="file:/home/connolly/w3ccvs/WWW/2003/09dc-bos/weekDays#"
>>
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">6</index>
>>         <nameString
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">Sunday</ 
>> nameString>
>>     </DayOfWeekType>
>> </rdf:RDF>
>>
>>
>>
>
> -- 
> Ryan Lee          +1.617.253.5542 (MIT office)
> ryanlee@w3.org    http://www.w3.org/People/ryanlee/

Received on Monday, 25 August 2003 23:39:16 UTC