Keeping XMLLiterals unchanged when going through RDFa

Hi,

I'm writing a browser based editor to edit graphs rendered as RDFa/HTML.

I encountered the problem that the round-trip via browser changes the value
of the XMLLiterals, e.g. a <br/> becomes <br /> (in firefox) or a <br> (in
chrome). There seems to be no way to the client library to get the exact
original version as the js has only access to the DOM not to the literal
source. This of course makes it impossible to update the content using e.g.
a SPARQL DELETE/INSERT.

I though one work around would be to pass the original version in a content
attribute. This way the client could read out the exact literal before the
editing starts and use this version when sending back the DELETE/INSERT
request.

Unfortunately I noticed that the content node is ignored if the datatype is
set to rdf:XMLLiteral.

Is there any way to encode an arbitrary XMLLiteral in RDFa so that it
remains identical character-by-character when encoding as RDFa and decoding
again?

Cheers,
Reto

Received on Wednesday, 4 June 2014 10:25:58 UTC