Re: Keeping XMLLiterals unchanged when going through RDFa

Hi Reto,

I am afraid I cannot give you any good advice... I was actually surprised that @content did not work but I checked and, indeed, the spec refers to the DOM content for XML Datatypes so it looks like the implementation you used was correct (I actually believe this is a but in the spec, but, well, here we are...)

Sorry...

Ivan

On 04 Jun 2014, at 06:25 , Reto Gmür <reto@apache.org> wrote:

> 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


----
Ivan Herman, W3C 
Digital Publishing Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
GPG: 0x343F1A3D
WebID: http://www.ivan-herman.net/foaf#me

Received on Wednesday, 4 June 2014 15:28:11 UTC