xsl-list
[Top] [All Lists]

[xsl] sorting based on variable and limit the results

2009-03-22 19:18:07
Hi guys,

is it possible to sort based on xsl:variable? If so, how?

For example, i have such piece of code:
                                         <xsl:for-each select="//s">            
                        
                                            <xsl:variable name="name" 
select="n" />
                                                <xsl:variable name="quantity" 
select="count(//p/pp[(.) = $name])" />                                    
                                           <tr>                                 
                
                                                        <td><xsl:value-of 
select="n"/></td>                                                     
                                                        <td><xsl:value-of 
select="$quantity"/></td>
                                           </tr>
                                        </xsl:for-each>

and i want to sort on $quantity (simple xsl:sort is not compilable).

And the second part of question - is it possible to limit the result
to the top 10, without intermediate representation (or, just in one
XSLT script).

Thanks!

--~------------------------------------------------------------------
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>
--~--