[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: sort elements based on attribute value
This will allow you to process the elem's in numerical order. I am
assuming that is what you needed. Note that if you don't add the data-type
attribute it will sort by string-value rather than in numerical order.
<xsl:template match="/"> <root> <xsl:apply-templates select="//elem"> <xsl:sort data-type="number" select="@value"/> </xsl:apply-templates> </root> </xsl:template> <!-- process elem's --> <xsl:template match="elem"> <newelem value="{@value}"> </newelem> </xsl:template> At 05:11 PM 3/27/03 -0500, you wrote: Hi Gurus
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|