RDFLib/rdflib — Issue #36: n3 parser doesn't error on corrupt terms
Author: gjhiggins
Created: 2012-02-20 08:31:02+00:00
State: closed

drewpca, 2009-02-06T07:34:54.000Z

What steps will reproduce the problem?

from rdflib.Graph import Graph
from rdflib import StringInputSource
g.parse(StringInputSource(":a b c."), format='n3')
list(g.triples((None,None,None)))

->
[(rdflib.URIRef('file:///home/drewp/#a'),
rdflib.URIRef('file:///home/drewp/#b'),
rdflib.URIRef('file:///home/drewp/#c'))]

I think that should have errored because the empty prefix was not defined.
And maybe also because b and c were unknown.

Comment 1 by eik...@gmail.com

Comment 2 by gromgull
Fixed in r1755