A function could be put in xsl:value-fo directly, like this
<xsl:value-of select="
count(//FIELD[FNAME='exceptionList']
/STRUCT[SNAME='ImagisInterfaceExceptionDetailsList']/FIELD[FNAME='dtls']
/STRUCT_LIST/STRUCT/FIELD[FNAME='type' and VALUE='stopped'])" />
If I need use that function a couple of times, I can use "variable" in xslt.
<xsl:variable name="countResult" select="
count(//FIELD[FNAME='exceptionList']
/STRUCT[SNAME='ImagisInterfaceExceptionDetailsList']/FIELD[FNAME='dtls']
/STRUCT_LIST/STRUCT/FIELD[FNAME='type' and VALUE='stopped'])" />
<xsl:value-of select="$countResult"/>
<xsl:if test="$countResult>0">
<p>display...</p>
</xsl:if>
No comments:
Post a Comment