amccausl / RDF4H

rdf4h is a library for working with RDF in Haskell
http://protempore.net/rdf4h/
Other
8 stars 2 forks source link

XML declaration not accepted in parseXmlRDF #4

Open robstewart57 opened 12 years ago

robstewart57 commented 12 years ago

The top line of a typical XML input is not accepted by Text.RDF.RDF4H.XmlParser.parseXmlRDF . Typically, the top line of an RDF/XML input looks something like this: <?xml version="1.0" encoding="UTF-8"?>

e.g. This is accepted:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <rdf:Description rdf:about="http://www.example.com/users/joe">
    <foaf:holdsAccount
    foaf:OnlineAccount="http://twitter.com/joe"></foaf:holdsAccount> 
  </rdf:Description>
</rdf:RDF>

This is NOT accepted (and yet is valid RDF/XML serialization):

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <rdf:Description rdf:about="http://www.example.com/users/joe">
    <foaf:holdsAccount
    foaf:OnlineAccount="http://twitter.com/joe"></foaf:holdsAccount> 
  </rdf:Description>
</rdf:RDF>