Re: RDF-ISSUE-13 (RDF XMLLiterals): Review RDF XML Literals [Cleanup tasks]

On Mar 7, 2011, at 14:25 , RDF Working Group Issue Tracker wrote:

> 
> RDF-ISSUE-13 (RDF XMLLiterals): Review RDF XML Literals [Cleanup tasks]
> 
> http://www.w3.org/2011/rdf-wg/track/issues/13
> 
> Raised by: Andy Seaborne
> On product: Cleanup tasks
> 
> RDF Concepts:
> http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral
> 
> RDF Syntax:
> http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-XML-literals
> 
> The lexical space of RDF XML Literals is XML fragments which are required to be "exclusive canonical XML".  The lexical space and the value space are in 1-1 correspondence. The rules are quite complicated. These rules for canonicalization apply to the lexical form; equality testing can be done using string compare.
> 
> Canonicalization rules include no use of <tag/> and that attributes must be in sorted order (this is not an exhaustive list).
> 
> A consequence of this is that many correct XML fragments are not legal as XML Literals because they do not correspond to exclusive canonicalization.
> 
> Possible cleanup includes partially relaxing the lexical space restrictions while retaining the value space so that fragments can be used as XML literals without complex processing.
> 

+10^infinite

I know of no RDF serializers around that would produce correct XML Literals in this sense. They all produce valid XML, with hopefully the right namespace declarations (though that does not always happen either) but they certainly do not necessarily go through the extra mile of canonicalization. And there is no reason for that either: canonicalization comes into place when two XML fragments must be compared as strings; but this should be done in value space and not in lexical space...

Ivan

> RDF XML Literals are the only datatype hard wired into RDF.
> 
> If a Turtle document is to be validated, will that require access to an XML parser and canonicalization engine?
> 
> 
> 
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 7 March 2011 13:33:47 UTC