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

Key: RIO-50
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Arjohn Kampman
Reporter: Arjohn Kampman
Votes: 0
Watchers: 0
Operations

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

RDF/XML writer needs to encode "carriage return" characters in literal values

Created: 07/Aug/06 11:42 AM   Updated: 05/Jul/07 11:24 AM
Component/s: RDF/XML writer
Affects Version/s: 1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0
Fix Version/s: 1.0.9


 Description   
XML parsers are required to normalize any end-of-line character sequences in XML documents to a single LF (line feed) character[1]. Due to this, any CR (carriage return) characters and CR-LF combinations that are part of RDF literal values will be replaced with LF characters by the XML parser, effectively changing the RDF literal value. To prevent this, any CR characters in RDF literals should be encoded using the entity 

[1] http://www.w3.org/TR/REC-xml/#sec-line-ends

 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [08/Aug/06 11:54 AM]
All CR-, LF- and tab-characters that appear in attribute values, and all CR-characters that appear in character data, are now encoded using a character entity. However, the RDF/XML writer still includes XML-literals as-is in an RDF/XML document. The resoning is that, as this is an XML-fragment, XML's normalization rules apply to it anyway. Parsing the fragment as a stand-alone document would have yielded the same result.