Subject: Re: testing for child node and counting
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 6 Feb 2002 22:10:21 GMT
|
<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
|