Re: How to sort by elements of a function output?
> xmlns:fn="http://www.w3.org/2005/xpath-functions" if you called the functions as count($matches)" rather than fn:count($matches) you wouldn't need to declare this namespace. > does not do the job, no error however. becaus eit does not select anything > ())/td[8 welects the 8th td element in no namespace but your td are in the xhtml namepsace. <xsl:variable name="tableRow" select="my:MakeTableRow(current-grouping-key(),current-group())"/> <xsl:copy-of select="$tableRow"/> no need to declare a variable if you only use it one, of course. If you want to avoid calling the function twice on each row, probably the simplist is to generate the table as you have it originally into a variable and then just do a xsl:for-each that sorts the rows of the table in a final pass. (Trading space to store the table for time spent recalculating) David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
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