parser#5 testing: bug in literal canonicalisation

hiya

testing your new parser. Looks like a cleaner approach, but I found a
little (hopefully) bug:

The text from dc:title in the testcase below leaks out and gets repeated
during canonicalisation, resulting in illformed RDF. Your 2nd xslt doesn't
notice this and generates broken triples...

dan


danbri@fireball:~/s-rubyrdf/xsltrdf > more tc_parser_1.rdf
<?xml version="1.0"?>
<web:RDF xmlns:web="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        xmlns:rss="http://purl.org/rss/1.0/"
        xmlns="http://xmlns.com/foaf/0.1/"
        xmlns:wn="http://xmlns.com/wordnet/1.6/"
        xmlns:dc="http://purl.org/dc/elements/1.1/" >

 <wn:Person>
  <name>Dan Brickley</name>
  <mbox web:resource="mailto:daniel.brickley@bristol.ac.uk"/>
  <homepage web:resource="http://purl.org/net/danbri/"/>
  <depiction
web:resource="http://www.ilrt.bris.ac.uk/~ecdb/purl/danbri/2000/01/01/Image1.gif"/>
  <interest>
   <web:Description
     web:about="http://purl.org/rss"
     dc:title="RDF Site Summary (RSS)" />
  </interest>
  <interest>
    <web:Description
      web:about="http://www.w3.org/RDF/"
      dc:title="Resource Description Framework (RDF)" />
  </interest>
 </wn:Person>
</web:RDF>


danbri@fireball:~/s-rubyrdf/xsltrdf > rdfdump file:tc_parser_1.rdf
rdfdump: Parsing URI file:tc_parser_1.rdf with base URI
file:tc_parser_1.rdf
rdfdump: Statement: [genid1,
http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
http://xmlns.com/wordnet/1.6/Person]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/name, "Dan
Brickley"]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/mbox,
mailto:daniel.brickley@bristol.ac.uk]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/homepage,
http://purl.org/net/danbri/]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/depiction,
http://www.ilrt.bris.ac.uk/~ecdb/purl/danbri/2000/01/01/Image1.gif]
rdfdump: Statement: [http://purl.org/rss,
http://purl.org/dc/elements/1.1/title, "RDF Site Summary (RSS)"]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/interest,
http://purl.org/rss]
rdfdump: Statement: [http://www.w3.org/RDF/,
http://purl.org/dc/elements/1.1/title, "Resource Description Framework
(RDF)"]
rdfdump: Statement: [genid1, http://xmlns.com/foaf/0.1/interest,
http://www.w3.org/RDF/]
rdfdump: Parsing returned 9 statements
danbri@fireball:~/s-rubyrdf/xsltrdf > xsltproc rdfc
rdfc14n.xsl  rdfc2nt.xsl
danbri@fireball:~/s-rubyrdf/xsltrdf > xsltproc rdfc14n.xsl tc_parser_1.rdf
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:web="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="">
    <rdf:type rdf:resource="http://xmlns.com/wordnet/1.6/Person"/>
    <name xmlns="http://xmlns.com/foaf/0.1/">Dan Brickley</name>
    <mbox xmlns="http://xmlns.com/foaf/0.1/"
rdf:resource="mailto:daniel.brickley@bristol.ac.uk"/>
    <homepage xmlns="http://xmlns.com/foaf/0.1/"
rdf:resource="http://purl.org/net/danbri/"/>
    <depiction xmlns="http://xmlns.com/foaf/0.1/"
rdf:resource="http://www.ilrt.bris.ac.uk/~ecdb/purl/danbri/2000/01/01/Image1.gif"/>
    <interest xmlns="http://xmlns.com/foaf/0.1/">
      <rdf:Description xmlns:ns1="http://purl.org/dc/elements/1.1/"  rdf:about="http://purl.org/rss"><ns1:title>RDF Site Summary  (RSS)</ns1:title>RDF Site Summary (RSS)</rdf:Description>
    </interest>
    <interest xmlns="http://xmlns.com/foaf/0.1/">
      <rdf:Description xmlns:ns2="http://purl.org/dc/elements/1.1/"  rdf:about="http://www.w3.org/RDF/"><ns2:title>Resource Description  Framework (RDF)</ns2:title>Resource Description Framework   (RDF)</rdf:Description>
    </interest>
  </rdf:Description>
</rdf:RDF>




danbri@fireball:~/s-rubyrdf/xsltrdf > xsltproc rdfc2nt.xsl webwho.c14n.rdf
<> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/wordnet/1.6/Person> .
<> <http://xmlns.com/foaf/0.1/name> "Dan Brickley" .
<> <http://xmlns.com/foaf/0.1/mbox> <mailto:daniel.brickley@bristol.ac.uk>
.
<> <http://xmlns.com/foaf/0.1/homepage> <http://purl.org/net/danbri/> .
<> <http://xmlns.com/foaf/0.1/depiction>
<http://www.ilrt.bris.ac.uk/~ecdb/purl/danbri/2000/01/01/Image1.gif> .
<> <http://xmlns.com/foaf/0.1/interest> _:id2589570 .
<http://purl.org/rss> <http://purl.org/dc/elements/1.1/title> "RDF Site
Summary (RSS)" .
RDF Site Summary (RSS)<> <http://xmlns.com/foaf/0.1/interest> _:id2589732
.
<http://www.w3.org/RDF/> <http://purl.org/dc/elements/1.1/title> "Resource
Description Framework (RDF)" .
Resource Description Framework (RDF)

Received on Saturday, 22 June 2002 13:46:04 UTC