|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Confused by xsl:for-each
are you sure you want //a rather than .//a ? //a selects all a from anwhere in the document not just those under the current element. BUT <xsl:value-of select="number(//a) I get 0, although there are two <a..> inside <td>. number() converts a string such as "2" into a number such as 2 if you give it a node set such as //a it will take the string value of the first node in the set in document order and then coerce that to a number. As you didn't show the whole document I don't know what your first a looked like, it mus have been <a href=...>0</a> The first one you showed was <a href="external/address.html">Adresse 1</a> which would have produced NaN. You want count() to count nodes, not number(). select="count(.//a)" David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. 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 ________________________________________________________________________
|
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








