Subject: RE: [xsl] Re: <xsl:sort select=borrower order=descending/> question From: "dmitrik@xxxxxxxxxxxxxx" <dmitrik@xxxxxxxxxxxxxx> Date: Tue, 17 Jun 2003 15:48:06 -0400 |
Is this what you are referring to? There is an html drop down list with vbscript which allows columns in the table to be selected, and then a dropdown with ascending or descending. How can these values be passed to these variables? <xsl:sort order="{$order}" select="*[name()=$sortColumn]"/> tia, dk dynamically set the sort order Dimitre Novatchev > I am trying to dynamically set sort order and sort column in my > XSLT. It seems that I can not use an expression for "order". > > <xsl:apply-templates select="Uow"> > <xsl:sort select="$sortColumn" order="$sortOrder"/> > <xsl:with-param name="from" select="$startRow"/> > <xsl:with-param name="to" select="$endRow"/> > </xsl:apply-templates> All attributes of xsl:sort with the exception of "select" can be specified as AVT-s. The "select" attribute can be any XPath expression. Certainly, an attempt to put an XPath expression in a variable and pass this variable as the (complete) value of the "select: attribute -- this will fail for xsl: sort as in any such attempt in XSLT, because XPath expressions are not evaluated dynamically. However, if you need to specify the name of a child element, then you can use an expression like this: *[name()=$sortColumn] Therefore, one possible way to achieve your wanted results is: <xsl:sort order="{$order}" select="*[name()=$sortColumn]"/> Original Message: ----------------- From: Dimitre Novatchev dnovatchev@xxxxxxxxx Date: Tue, 17 Jun 2003 20:06:20 +0200 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Re: <xsl:sort select="borrower" order="descending"/> question http://dpawson.co.uk/xsl/sect2/N6461.html#d6859e950 ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL <dmitrik@xxxxxxxxxxxxxx> wrote in message news:293580-220036217135613598@xxxxxxxxxxxxxxxxxxxxxx > > is there a way to pass a variable into the select > <xsl:sort select="borrower" order="descending"/> > > so that different values can be sorted in the xml? > > <xsl:for-each select="trades/trade"> > <xsl:sort select="borrower" order="descending"/> > > tia, > dk > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: fiscal year calculati, Mike Haarman | Thread | [xsl] Re: Re: <xsl:sort select=borr, Dimitre Novatchev |
RE: [xsl] alternate colors for tabl, dmitrik@xxxxxxxxxxxx | Date | Re: [xsl] Special Characters in IE , Rowlinson, Nicole SL |
Month |