|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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() < '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() < 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








