xsl-list
[Top] [All Lists]

Re: How to select some items from list of items

2002-10-24 18:03:33
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() &lt;= 4]

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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



<Prev in Thread] Current Thread [Next in Thread>