Re: [xsl] How to sort attribute?

Subject: Re: [xsl] How to sort attribute?
From: Soren Kuula <dongfang@xxxxxxxxxxx>
Date: Mon, 15 Aug 2005 13:05:48 +0200
John Li wrote:


When exporting one node and its attribute, I want to sort its attributes
lexicographic. I try it as below but always fail. Anyone could help?

XML attributes have no notion of order -- attributes are just a set of name--value mappings.

<x foo="a" bar="b"/> <x bar="b" foo="a"/> are indistinguishable.

(but if you need to control the serialization order od attributes, for the matter or appearance, you could tweak the serializer class(es) of some open source DOM library, then just parse and serialize back the documents).


Current Thread