Subject: Re: How to select some items from list of items
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 25 Oct 2002 02:03:33 +0100
|
Hi Paul,
> i have a question on how to select some items from list of items
>
> for example:
> <book>
> <item>AA</item>
> <item>BB</item>
> <item>CC</item>
> <item>DD</item>
> <item>EE</item>
> <item>FF</item>
> </book>
>
> i only want to select the first 4 items and drop the rest. the
> output should give me AA BB CC and DD
In other words, you need to select the items whose position() is less
than or equal to 4:
/book/item[position() <= 4]
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|