This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: testing for child node and counting
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 6 Feb 2002 22:10:21 GMT
- Subject: Re: [xsl] testing for child node and counting
- References: <20020206215221.82777.qmail@web14510.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
<xsl:for-each select="Orders/Row">
Now the current node is a row element.
<xsl:if text="Orders/Row/field_c">
so this is testing if the current row has an Orders child with a Row
element child with a field_c child, which isn't what you want.
what you want is
<xsl:for-each select="Orders/row[field_c]">
ie just select the ones you want, don't select everything and then test
for those you picked up by mistake.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list