Subject: Re: [xsl] Function's at XSLT From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 27 Nov 2003 14:36:45 GMT |
The filter step [last()] will be false for every node except the last. So if your sequence is the current node list in a step then just adding [last()] will do what you want. If your sequence is the current node list in an xsl:for-each then use <xsl:if test="position()=last()">.... Note that XPath1 does not have a sequence datatype node sets are sets so inherently unordered so it don't really have a first or last node until your sort the elements into document order (as happens in forward axes) or reverse order (reverse axes) or with xsl:sort. In xpath2 you can save a sequence in arbitrary order in a variable, then $x[last()] will give you the last in the sequence. > Where can I find a fast guide with all function's that can possible used in > xslt apart from a few special functions (eg current() key() and documen()) all the functions are listed in teh Xpath spec at www.w3.org/tr/xpath David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Function's at XSLT, Bruno LLopes | Thread | RE: [xsl] SAXON and heavy xml doc, Michael Kay |
[xsl] sum variables from templates, Markus Hanel | Date | Re: [xsl] sum variables from templa, David Carlisle |
Month |