RDFLib/rdfextras — Issue #16: Check for plain literals without lang tag doesn't work
Author: gjhiggins
Created: 2012-02-20 07:57:11+00:00
State: closed

joernhees, 2010-11-08T13:05:12.000Z

Example code:
graph = ConjunctiveGraph()
graph.add((rdflib.URIRef("http://example.org/#test"), RDFS.label, rdflib.Literal("foobar")))
q = """
SELECT ?p ?o
WHERE {
?p ?o.
FILTER( lang(?o) = "" )
}
"""
pprint(list(graph))
pprint(list(graph.query(q)))

Prints:
[(rdflib.term.URIRef('http://example.org/#test'),
rdflib.term.URIRef('http://www.w3.org/2000/01/rdf-schema#label'),
rdflib.term.Literal(u'foobar'))]
[]

As you can see the second result doesn't include anything, which I think is wrong.

Comment 1 by gromgull
This issue was closed by revision 447bb68fcd7a.