|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL/XPath Dynamic sort key
} <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
|
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
|






