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

Re: XMLLiterals and c14n

From: Ivan Herman <ivan@w3.org>
Date: Thu, 17 Sep 2009 10:31:08 +0200
Message-ID: <4AB1F3CC.7090300@w3.org>
To: Philip Taylor <pjt47@cam.ac.uk>
CC: Manu Sporny <msporny@digitalbazaar.com>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Yes.

Manu, I think the general issue in the tests is that it also include the
namespace for rdf. From an XML point of view, because in that specific
XML portion that namespace is not used, the canonicalization requires
the removal of that superfluous namespaces. besides, attributes must
appear in alphanumeric order (which I believe is the case already) and
there should be no extra spaces in the elements (which is again the case
already as far as I could see).

ivan

Philip Taylor wrote:
> Manu Sporny wrote:
>> I thought I knew what was wrong with the tests in the test suite, but
>> your and Ivan's discussion has made me second guess my understanding (or
>> lack thereof) of XML c14n. Could you please point out exactly what is
>> wrong with the example in:
>>
>> http://html5.digitalbazaar.com/specs/rdfa.html#invalid-xmlliteral-values
>>
>> Both of you seem to be asserting that c14n should be applied differently
>> than I understand it to the example in the HTML+RDFa draft.
> 
> I believe the example output should be:
> 
> <>
>    <http://example.org/vocab#markup>
>       "<rect xmlns=\"http://www.w3.org/2000/svg\" height=\"100\"
> style=\"fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)\"
> width=\"300\"></rect><rect xmlns=\"http://www.w3.org/2000/svg\"
> height=\"50\" style=\"fill:rgb(255,0,0);stroke-width:2;
> stroke:rgb(0,0,0)\"
> width=\"50\"></rect>"^^http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
> 
> 
> (with appropriate line-wrapping, and with the note after the example
> updated appropriately).
> 
> Since the triple is serialised as N3/Turtle, and there is no automatic
> c14n that occurs when parsing N3/Turtle, and RDF says XMLLiterals must
> be strings that are exclusive canonical XML, the string in the example
> must be exclusive canonical XML. That's basically canonical XML with all
> the redundant namespace declarations removed, and canonical XML requires
> explicit end tags and lexicographically-ordered attributes (with
> namespace declarations first), hence the changes in the example output.
> 
> (I hope I didn't make any mistakes here - I checked with some
> command-line tools and they seem to give the same output, so I think
> it's probably approximately right!)
> 

-- 

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 Thursday, 17 September 2009 08:31:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 September 2009 08:31:49 GMT