xsl-list
[Top] [All Lists]

RE: How to sort attribute?

2005-08-13 02:25:51
Your for-each will process the attributes in sorted order, but once they are
added to the new element they can be reordered by the system, because
attribute order is implementation-dependent. There's no way of controlling
the order in which attributes are output by the serializer.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: John Li [mailto:johnli121(_at_)163(_dot_)com] 
Sent: 13 August 2005 10:11
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How to sort attribute?

Hi,

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?

<xsl:for-each select="@*">
    <xsl:sort select="name()"/>
    <xsl:copy/>
</xsl:for-each>

Thanks,
John



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>