This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: testing for child node and counting



<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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]