kasei / perlrdf

Deprecated in favor of the Attean package
26 stars 25 forks source link

Tests fails with XML-LibXML-2.0202 #167

Open jplesnik opened 4 years ago

jplesnik commented 4 years ago

The test t/parser-rdfxml-w3c.t failed with XML-LibXML-2.0202.

#   Failed test 'expected triples: /amp-in-url/test001 (parse_into_model)'
#   at t/parser-rdfxml-w3c.t line 288.
#          got: '<http://example/q?abc=1&#38;def=2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> "xxx" .^M
# '
#     expected: '<http://example/q?abc=1&def=2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> "xxx" .^M
# '
#   Failed test 'expected triples: /amp-in-url/test001 (parse_file_into_model)'
#   at t/parser-rdfxml-w3c.t line 288.
#          got: '<http://example/q?abc=1&#38;def=2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> "xxx" .^M
# '
#     expected: '<http://example/q?abc=1&def=2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> "xxx" .^M
# '
# Looks like you failed 2 tests of 517.
t/parser-rdfxml-w3c.t ..............
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/517 subtests

It probably happened, because loading external DTDs or external entities is disabled by default in XML-LibXML-2.0202.

ppisar commented 4 years ago

I believe this a bug in XML::LibXML::SAX https://rt.cpan.org/Ticket/Display.html?id=131498 that only fails to parse & entity (other numerical values entities are fine) in attribute values with a SAX interface.