This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: selecting specific number of nodes from a list of nodes


Jaideep Chadha wrote:
> I have a list of nodes that I can select based on a criteria.  But I 
> need only a specific number of them.  For eg. a criteria may return 10 
> nodes but I just need to select the first 6 nodes.  How can I do this.  
> I need to do this for pagination in FO.

You can use a predicate and the position function, for
example
  <xsl:apply-templates select="item[position() &lt;=6]"/>
will apply templates to the first six item elements.

J.Pietschmann



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]