Re: Function's at XSLT
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
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