Subject: Re: [xsl] getting the first three From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Thu, 19 Apr 2001 18:23:25 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] getting the first three, Sandeep Hundal | Thread | RE: [xsl] getting the first three, Meltem Kogelbauer |
Re: [xsl] XSL Button Template, Thomas B. Passin | Date | Re: [xsl] text output with some sig, David Carlisle |
Month |