[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Problem Dynamically setting XSL Sort order
> I am using XML Spy 5 and MSXML4 > > Can't seem to get the suggested solution on the FAQ to work for > Dynamically setting the sort order within an XSLT [snip] > <xsl:param name="sortOrder" select="descending" /> I think here you mean: <xsl:param name="sortOrder" select="'descending'" /> ^ ^ Notice the single quotes. This is a common mistake; without the quotes you mean 'select the <descending> element', with the quotes you mean the string value 'descending'. By the way, > <xsl:sort order="{$sortOrder}" select="field/value[../@ID=$sortKey]" Here you can write select="field[@ID=$sortKey]/value" as it's more natural (and readable) than stepping back up the tree. Cheers andrew 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
|