Conditions in looping
Hi,
I want a better way to do this..
The XML model is like following
<Errors>
<Error id="field1" fieldName="FIELD1"/>
<Error id="field2" fieldName="FIELD2"/>
<Error id="field3" fieldName="FIELD3"/>
<Error id="field4" fieldName="FIELD4"/>
<Error id="field5" fieldName="FIELD5"/>
<Error id="field6" fieldName="FIELD6"/>
</Errors>
My XSL code is like this
<xsl:for-each select="$ErrorCodes">
<xsl:if test="@fieldName='SECRET_ANSWER'">
<xsl:call-template name="Errors"/>
</xsl:if>
</xsl:for-each>
(This code works fine but I need a better alternate)
I ll call the template from various places
wherein I want the control to be on the node
Can anyone tell some other way which is better than this
__________________
Try Try Try Until You Succeed
|