Is there a way of "breaking out" of a for-each loop (some sort of Leave instruction)?
I'm processing a set of nodes and doing a test to only pickup a certain condition, however once this condition has been fulfilled I don't wan't to continue checking in case it the condition is true again.
Code:
<xsl:for-each select="//BookingFareData/BookingData/SeatSegment">
<xsl:if test="FlightNbr = $ASFlightNbr and DepartureDate = $ASDate">
<xsl:element name="SeatData">
<xsl:element name="SeatNumber">
<xsl:value-of select="SeatLocation"/>
</xsl:element>
<xsl:element name="SeatStatus">
<xsl:value-of select="SeatStatusCode"/>
</xsl:element>
</xsl:element>
</xsl:if>
</xsl:for-each>
As always - thanks in advance