Closed phillord closed 7 months ago
I am having a problem with parsing of collections.
Consider the following RDF:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/stuff/1.0/"> <rdf:Description rdf:about="http://example.org/basket"> <ex:hasFruit rdf:parseType="Collection"> <rdf:Description rdf:about="http://example.org/banana"/> <rdf:Description rdf:about="http://example.org/apple"/> <rdf:Description rdf:about="http://example.org/pear"/> <!--rdf:Description rdf:about="http://example.org/conference_pear"> </rdf:Description--> </ex:hasFruit> </rdf:Description> </rdf:RDF>
When I parse this using horned-triples (my own code):
https://github.com/phillord/horned-owl/blob/master/src/bin/horned-triples.rs
I get:
http://example.org/basket http://example.org/stuff/1.0/hasFruit n0 n0 http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://example.org/banana n0 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest n1 n1 http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://example.org/apple n1 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest n2 n2 http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://example.org/pear n2 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
which seems correct. But remove the commented XML which should add another fruit and I get:
http://example.org/basket http://example.org/stuff/1.0/hasFruit http://example.org/conference_pear
Alas my basket is empty! I was expecting it to be one longer.
@phillord thanks for the report.
@althonos you wrote the RDF/XML parser. Would you have time to take a look at this?
Is this solved in v0.6.0?
@phillord up
fixed in 0.8
(test it here)
I am having a problem with parsing of collections.
Consider the following RDF:
When I parse this using horned-triples (my own code):
https://github.com/phillord/horned-owl/blob/master/src/bin/horned-triples.rs
I get:
which seems correct. But remove the commented XML which should add another fruit and I get:
Alas my basket is empty! I was expecting it to be one longer.