Re: Troubleshooting a sort
<xsl:for-each select="//SAVEIdeas/SAVEIdea"> <xsl:sort select="*[name()=$param1]"/> Usually, I'm sorting on a child of the root element (SAVE_ID, date_submitted, etc.) These sorts are all working fine. But I also need to sort on the *last* status element. Status is not a child of the root, but a child of status_history. Is that the problem? Do I need to have something conditional for the sort statement? I welcome any additional suggestions! It's not a problem, but you have to make your sort xpath select teh required element and * won't select a grandchild ever in xpath. <xsl:for-each select="/SAVEIdeas/SAVEIdea"> <xsl:sort select="(*|*/*)[name()=$param1][last()]"/> (I didn't spot the requiremnt you had for last() in previous reply) -- http://www.dcarlisle.demon.co.uk/matthew 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