We're updating the issue view to help you get more done. 

RDF/XML parser incorrectly trims element data for (literal) property nodes

Description

The following RDF document:

1 2 3 4 5 6 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://example.com/#"> <Foo> <bar> </bar> </Foo> </rdf:RDF>

or:

1 2 3 4 5 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://example.com/#"> <Foo> <bar> </bar> </Foo> </rdf:RDF>

both documents, when parsed, will fail to produce a triple with bar as the predicate and an empty-string literal value as the object.

In contrast:

1 2 3 4 5 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://example.com/#"> <Foo> <bar></bar> </Foo> </rdf:RDF>

will produce the expected triple. Cause is that in the latter case the element is recognized as being empty and gets special treatment.

Environment

None

Status

Assignee

JeenB

Reporter

JeenB

Labels

None

Components

Fix versions

Affects versions

2.7.5

Priority

Major