jupyrdf / ipyradiant

Jupyter widgets for working with RDF graphs.
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

Address inconsistency in namespace for RDF2NX process #64

Closed zwelz3 closed 3 years ago

zwelz3 commented 3 years ago

Why does overwriting the sparql attribute of a query class cause the query to fail if a PREFIX isn't specified? The namespace may be in initNs or graph.namespaces, but the process doesn't recognize them.

Example:

# this doesn't work without PREFIX
RDF2NX.node_properties.sparql = """
PREFIX voc: <https://swapi.co/vocabulary/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?iri ?predicate ?value
{
  ?iri ?predicate ?value.

  VALUES (?predicate){
      (rdfs:label)
      (voc:starship)
  }
}
"""