Using XSLT 2.0 to do XML Canonicalization

This is a question concerning
http://www.w3.org/TR/2003/WD-xslt20-20030502/

I would like to write an XSL transform to implement (parts of) the Canonical 
XML recommendations

http://www.w3.org/TR/xml-c14n
http://www.w3.org/TR/xml-exc-c14n/

I am concerned that as to whether the definition of sorting provides the sort 
that is needed to perform such a transformation.

The relevant text from xml-c14n is:

[[
Lexicographic order is imposed on the namespace declarations and attributes of 
each element
]]

[[
Lexicographic comparison, which orders strings from least to greatest 
alphabetically, is based on the UCS codepoint values, which is equivalent to 
lexicographic ordering based on UTF-8.
]]

Thus my question is it possible to sort qnames using XSLT 2.0 to achieve this 
sort order (without using an implementation dependent feature)?

(I will be satisfied with a "YES" with no supporting justification)

thanks

Jeremy

PS: Is there such an implementation? maybe with XSLT 1.0

Received on Sunday, 9 November 2003 03:00:59 UTC