gjhiggins/rdflib — Issue #145: Malformed literals produced when rdfa contains newlines
Author: gjhiggins
Created: 2011-10-19 01:30:32+00:00
State: open

Originally filed by m...@iandavis.com on 2010-10-04T13:24:42

What steps will reproduce the problem?
1. See test case below

What is the expected output? What do you see instead?
I expect to see the properly formed literal "VALUE\n"@en

Instead I see "VALUE\n"""@ (i.e. a triple quote terminator and no language)

What version of the product are you using? On what operating system?
>>> print rdflib.__version__
3.0.0

Please provide any additional information below.

Test case:

from rdflib import Graph
from rdflib.parser import StringInputSource

html = """

VALUE

VALUE

"""

g = Graph()
g.parse(StringInputSource(html), format="rdfa", lax=True)

print g.serialize(format='nt')

Removing the xml:lang attribute makes the problem disappear