RE: Using XSLT 2.0 to do XML Canonicalization

If you specify the codepoint collation
 http://www.w3.org/2003/11/xpath-functions/collation/codepoint

in the collation attribute of xsl:sort then you get the lexicographic
sorting described.

Regards,

Michael Kay

> -----Original Message-----
> From: Jeremy Carroll [mailto:jjc@hpl.hp.com] 
> Sent: 09 November 2003 08:01
> To: public-qt-comments@w3.org
> Subject: 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 13:50:37 UTC