xsl-list
[Top] [All Lists]

Re: [xsl] How to sort by elements of a function output?

2009-04-24 12:15:11


     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. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--