SPARQL result in XML may not be strictly valid? · Issue #493 · RDFLib/rdflib (original) (raw)
The XML serializer for SPARQL results produces a result that looks valid to me, but is not recognized by at least one tool (namely Corese). The problem comes from the fact that the serializer produces something like
<sparql:sparql xmlns:sparql="" title="undefined" rel="noopener noreferrer">http://www.w3.org/2005/sparql-results#">
while Corese expects an empty NS prefix, as in
which is actually what the recommendation says. Again, the fact that the documentation uses XML namespaces makes me think that what RDFLib produces is valid, but the phrasing ("written as follow") makes it ambiguous. I explicitly asked the question on the public mailing list.
Whatever the answer is, I guess it wouldn't hurt to be a little more conservative in RDFLib. If I'm correct, changing that line to use the empty prefix rather than the "sparql" prefix would do the trick (sorry, not really able to test it myself right now).