|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: param value in xsl:sort
> I'm trying to use the value of a parameter as the select value of an > xsl:sort element. You can't (this is a FAQ). <xsl:sort select="$param"/> means "sort by the value of the parameter", which, since the parameter has the same value for every member of the node-set, is the same as saying don't sort at all. There is no way in standard XSLT of saying "sort by the value of the XPath expression represented by the string value of $param". You can do this in Saxon by writing <xsl:sort select="saxon:evaluate($param)"/>. If $param is always an element name, and if you are careful about namespaces, you can do it in standard XSLT by writing <xsl:sort select="*[name()=$param]"/> Mike Kay > 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








