This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using xsl:sort select attribute


At 00/08/25 06:16 -0400, Nuri Besen wrote:
>and I do not get any sorting to be done, have tried
>  <xsl:sort order="{$sortOrder}" select="string($sortColm)"/>
>but no good either.

I gather you are trying to select the first child element named by the 
variable?  A variable cannot be used in XPath as a step on its own, but a 
variable can be used in a predicate.

>In short I am trying to make the colm parametric.  Can I do it? If yes, how?

Have you tried select="*[name()=$sortColm]" which selects from all child 
elements the value of the first in document order whose name is the 
variable's value?

............. Ken

--
G. Ken Holman                    mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML services, training, libraries, products.
Book: Practical Transformation Using XSLT and XPath ISBN1-894049-05-5
Article:          What is XSLT? http://www.xml.com/pub/2000/08/holman
Next public instructor-led training:     2000-09-19/20,2000-10-03/05,
-        2000-10-09/10,2000-10-19,2000-11-12,2000-12-03/04,2001-01-27


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]