[Home] [By Thread] [By Date] [Recent Entries]
At 2010-11-10 09:36 -0800, Narayan wrote:
Yes ... don't use the flag. Something along the lines of: Then you *don't* need the loop at all: <xsl:template name="getOrderSource">
<xsl:choose>
<xsl:when test='/ns0:Transaction-850/ns0:Loop-N1/
ns0:Segment-N1/ns0:Element-66 = "21"'>NAEDI</xsl:when>
<xsl:otherwise>NAEDIBrokerage</xsl:otherwise>
</xsl:choose>
</xsl:template>In XPath when you address a set of nodes as an operand in a test, the test is repeated for every member of the node set until either a true() value is returned by any member (you aren't told which), or until the node set is exhausted and a false() value is returned. I hope this helps. . . . . . . . . . Ken
|

Cart



