Subject: Re: [xsl] XSL/XPath Dynamic sort key From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 10 Jul 2003 22:55:48 +0100 |
} <xsl:sort } select="*[name()=$sort_select_lvl_1]\*[name()=$sort_select_lvl_2]" \ isn't Xpath: you want / As it is you should get a syntax error. > If I remove the "\" i get a number expected error yes because * is multiplication. > xsl:sort select="concat('author','/','last_name')" /> > is not the same as > <xsl:sort select="author/last_name" /> No, concat produces a string, so it's the same as <xsl:sort select="'author/last_name'" /> which is a legal expression, but not what you want. <xsl:sort select="*[name()=$sort_select]|author/*[name()=$sort_select]" data-type="{$sort_data_type}" order="{$sort_order}" /> and just set the sort_select param to be 'uid' or 'last_name' or whatever you want. In each case one branch of the | will return nothing, but that's OK. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL/XPath Dynamic sort key, Fett Boba | Thread | RE: [xsl] XSL/XPath Dynamic sort ke, Michael Kay |
RE: [xsl] Using not(...a nd ... ) t, Lars Huttar | Date | RE: RE: [xsl] Using not(...a nd ..., Barak |
Month |