|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: multiple sorting
Iyer,
I think that the problem is that with the line:
sortField.setAttribute "select","'"+ field +"'"
you are setting the xsl:sort to look like:
<xsl:sort select="'NAME'" />
When the select expression is evaluated for each of the nodes that's being
sorted, it always comes up with the same value, the string 'NAME'. If you
instead want it to sort on the value of the *child node* called NAME, then
you want either:
<xsl:sort select="*[name() = 'NAME']" />
(which is equivalent to changing the value of the parameter and leaving the
sort expression as it is) or simply:
<xsl:sort select="NAME" />
To create the latter, you just need to take out the extra quotes that are
making the XSLT processor interpret it as a string rather than an element
name:
sortField.setAttribute "select",field
I haven't tested this, but I think it might work.
I hope this helps,
Jeni
Jeni Tennison
http://www.jenitennison.com/
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








