Re: cwm bug: --rdf=T doesn't work?

The bug is not in --rdf=T. The reason for the behavior is that cwm will 
ignore any XML outside of <rdf:RDF> tags, which makes it possible to 
embet RDF data in other XML. I have heard that the current spec says 
that the enclosing <rdf:RDF> tags are optional, and at some point we may 
update cwm's behaviour to match this.

In the meantime, installing rdflib and setting the environment variable 
CWM_RDF_PARSER="rdflib" almost worked on your file.

Norman Walsh wrote:

>With this data in /tmp/test.xml
>
><?xml version="1.0" encoding="utf-8">
>  
>

The above tag must begin and end with a ? to be valid xml. It only 
begins that way. Fixing that allowed cwm, using rdflib as its parser, to 
read the file with no problem.

><doap:Project xmlns:doap="http://usefulinc.com/ns/doap/#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:cvs="http://nwalsh.com/rdf/cvs#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/">
>   <dc:date>2004-07-29T20:22:56-04:00</dc:date>
>   <doap:license rdf:resource="http://usefulinc.com/doap/licenses/gpl"/>
></doap:Project>
>
>$ cwm --rdf=T /tmp/test.xml produces:
>
><!-- Processed by Id: cwm.py,v 1.148 2004/03/21 04:24:32 timbl Exp -->
><!--     using base file:/tmp/test.xml-->
>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
></rdf:RDF>
>
>                                        Be seeing you,
>                                          norm
>  
>

Yosi Scharf

Received on Friday, 30 July 2004 10:12:59 UTC