W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > February 2010

XML Literals and canonicalization [was: swap-scala's RDFa ...]

From: Dan Connolly <connolly@w3.org>
Date: Tue, 09 Feb 2010 09:35:12 -0600
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: public-rdf-in-xhtml-tf <public-rdf-in-xhtml-tf@w3.org>
Message-ID: <1265729712.3812.991.camel@pav.lan>
On Tue, 2010-02-09 at 09:15 +0000, Philip Taylor wrote:
> Dan Connolly wrote:
> > [...]
> > I consider the XMLLiteral problems limitations of the test
> > harness; I suggest more subtle SPARQL queries. I don't recommend
> > a strict canonical-xml requirement on RDFa parsers; I hope
> > we can find some equivalence test from XQuery that will serve
> > better.
> 
> The exclusive Canonical XML requirement is a feature of RDF, not RDFa. 
> http://www.w3.org/TR/rdf-concepts/#dfn-rdf-XMLLiteral says:
> 
>    "The lexical space is the set of all strings [...] for which encoding 
> as UTF-8 [RFC 2279] yields exclusive Canonical XML (with comments, with 
> empty InclusiveNamespaces PrefixList) [XML-XC14N]"

I'm painfully aware... that seems like premature standardization,
in retrospect; I thought I argued against it in the RDF Core WG,
but I can't confirm from records.
http://www.w3.org/2000/03/rdf-tracking/#rdfms-xml-literal-namespaces

> so if an RDF producer (e.g. an RDFa parser) produces an RDF triple whose 
> object is a typed literal with datatype rdf:XMLLiteral and with a 
> lexical form that is *not* in exclusive canonical form, then it is not 
> conforming RDF, and I would expect a test suite for an RDF-based 
> technology to flag it as an error. Until/unless RDF changes the 
> definition of rdf:XMLLiteral, I don't believe RDFa has any choice in this.

Of course the object is in canonical form, by definition. But
RDFa can allow canonical forms of more than one literal value
to be legal outputs for a given input.



-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
gpg D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Tuesday, 9 February 2010 15:35:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 9 February 2010 15:35:18 GMT