[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: CHILDREN PROBLEM


Subject: RE: CHILDREN PROBLEM
From: Marco.Mistroni@xxxxxxxxx
Date: Thu, 29 Jul 1999 13:31:25 +0300

Hi david,
	This was I wanted and I've already tried with success!! Anyway thanx
Br
marco

-----Original Message-----
From:	EXT David Carlisle [mailto:davidc@xxxxxxxxx]
Sent:	29. July 1999 11:49
To:	xsl-list@xxxxxxxxxxxxxxxx
Subject:	Re: CHILDREN PROBLEM


> but I don't know how
> to test that a node is the last children in the xsl file

You can test if you are at the last by
<xsl:if test="position()=last()"/>

but probably that isn't what you want to do, normally you would do
something like

....stuff to put before the list
<xsl:apply-templates select="animal"/>
....stuff to put after the list


ie rather than process the list one at a time asking each time if you
are at the end, it is usually more convenent to specify what you want to
put around that branch of the tree, and inbetween, select the elements
you want in that branch.

David


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


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



Current Thread
Keywords
xsl