[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: getting the first three

Subject: Re: getting the first three
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 18:23:25 +0100
Re:  getting the first three
Hi Sandeep,

> i need to get the first three child elements of a particular node to
> print out?
>
> is this the right syntax? "position() &lt; '4' ". it doesn't work on
> our server :(

That test is 'correct' in that it will return true if the position of
the context node when you do the test is less than 4. You haven't
given any indication about the context the test is used in, but
from the fact that it's not working at the moment, then I guess you're
not using it like:

  <xsl:apply-templates select="*[position() &lt; 4]" />

This would apply templates to the first three child elements of the
current node, so you should place it in the template that matches the
'particular node' that you refer to in your first paragraph.

If this wild guess doesn't help, I really recommend posting a sample
of the source XML that you're using, the stylesheet that you're trying
to use, and the output that you want.

I hope that helps anyway,

Jeni

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



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.