Re: XMLLiterals and c14n


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).


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:
>> 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:
> <>
>    <>
>       "<rect xmlns=\"\" height=\"100\"
> style=\"fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)\"
> width=\"300\"></rect><rect xmlns=\"\"
> height=\"50\" style=\"fill:rgb(255,0,0);stroke-width:2;
> stroke:rgb(0,0,0)\"
> width=\"50\"></rect>"^^
> (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
mobile: +31-641044153
PGP Key:

Received on Thursday, 17 September 2009 08:31:48 UTC