History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-492
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Arjohn Kampman
Reporter: Arjohn Kampman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

TriX parser discard leading and trailing whitespace for literals

Created: 27/Nov/07 11:52 AM   Updated: 20/Mar/08 08:15 PM
Component/s: Rio
Affects Version/s: 2.0-rc1, 2.0-beta6, 2.0-beta5, 2.0-beta4, 2.0-beta3, 2.0-beta2, 2.0-beta1, 2.0-alpha-4, 2.0-alpha-3, 2.0-alpha-2, 2.0-alpha-1
Fix Version/s: 2.0-rc2


 Description   
Issue reported at http://www.openrdf.org/forum/mvnforum/viewthread?thread=1517

The following code snippet exports a statement to TriX and reads it back in. The assertion at the end fails:

URI subj = valueFactory.createURI("http://subj");
Literal literal = valueFactory.createLiteral("text\n\n");
connection.add(subj, RDFS.LABEL, literal);

StringWriter sw = new StringWriter();
connection.export(new TriXWriter(sw));

connection.clear();
connection.add(new StringReader(sw.toString()), null, RDFFormat.TRIX);
assert literal.equals(connection.getStatements(subj, RDFS.LABEL, null, false).asList().get(0).getObject());

 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [27/Nov/07 01:34 PM]
The TriXParser now preserves leading and trailing whitespace characters for XML text elements.