xsl-list
[Top] [All Lists]

Re: [xsl] sorting based on variable and limit the results

2009-03-22 20:06:29
     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).


     <xsl:if test="position() &lt; 11">

smart...

          In xslt2 you can use the content of xsl:sort rather that a select
          attribute which allows a wider range of constructs. You didn't say
          if you wanted xslt 1 or 2.


           But you don't need a variable  you could do

            <xsl:key name="p" match="p" use="pp"/>

Perfectly works.

Thanks!

On Mon, Mar 23, 2009 at 12:41 AM, David Carlisle 
<davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:

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


<xsl:if test="position() &lt; 11">
....

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



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