Subject: RE: [xsl] Problem Dynamically setting XSL Sort order From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx> Date: Thu, 31 Jul 2003 09:08:56 +0100 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Problem Dynamically setting X, Andrew Pym | Thread | [xsl] What is the best way to restr, Armand Datema |
Re: [xsl] How to speed up parsing ?, Simon Bretin | Date | Re: [xsl] Xml to xml conversion of , Vetle Roeim |
Month |