W3C home > Mailing lists > Public > public-xmlsec@w3.org > April 2010

Sorting of DOM input to c14n 2.0

From: Scott Cantor <cantor.2@osu.edu>
Date: Tue, 13 Apr 2010 12:15:10 -0400
To: <public-xmlsec@w3.org>
Message-ID: <007801cadb24$7d544220$77fcc660$@2@osu.edu>
A couple more thoughts on this:

I was mistaken about there not being a DOM function to do sorting
(compareDocumentPosition) though it's DOM L3.

But I also still wonder why this is needed, given that it's possible to
impose the order by doing a depth-first traversal of the document anyway
(visit each node, if it's the root of an input subset, activate c14n and
start the algorithm). No need for extra processing.

So I'm still not convinced we need to include sorting as an explicit part of
the DOM processing rules, rather than just requiring that the output in fact
be in document order.

I didn't understand the algorithm for fast sorting that Pratik was
suggesting, but as a matter of avoiding over-specifying anyway, I would
personally suggest avoiding sorting as an explicit step.

-- Scott
Received on Tuesday, 13 April 2010 16:15:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 13 April 2010 16:15:44 GMT