RDFLib / rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
https://rdflib.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.15k stars 555 forks source link

RDF/XML Blank node parsing #2637

Open JoelBender opened 10 months ago

JoelBender commented 10 months ago

I am using the results from an oxigraph CONSTRUCT statement that contains a blank node and the results are coming back like:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about="ex:a">
        <c xmlns="ex:" rdf:nodeID="192d1ce3b267f0038ba80330f5eaf5c6"/>
    </rdf:Description>
</rdf:RDF>

Which is failing:

rdflib.exceptions.ParserError: file:...: rdf:nodeID value is not a valid NCName: 192d1ce3b267f0038ba80330f5eaf5c6

However if I put the letter 'a' in front of the node identifier it works fine, it only seems to break with those that start with a digit.

nikokaoja commented 5 months ago

Are you using oxigraphrdflib or you have configure SPARQLStore that points to "remote" SPARQL endpoint?