|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting problem...
David M. Goudreau wrote:
I'm trying to sort some concatenated strings in a dropdown box in my XSL. (I'm also sure there's a more compact way to write my XSL, frankly). My XML is: try using something like <xsl:sort select="@name"/> to handle your alpha sort first, the rest is recursion ------------------------------- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="root"> <xsl:apply-templates select="folder"> <xsl:sort lang="en" select="@name" data-type="text"/> </xsl:apply-templates> </xsl:template> <xsl:template match="folder"> <xsl:value-of select="@name"/> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> ------------------------------- i leave the select / option tag stuff to u. w3 org on sorting http://www.w3.org/TR/xsl#sorting xsl faq on sorting in general http://www.dpawson.co.uk/xsl/N6461.html#N35304 ,jim fuller 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
|

Cart








