[Home] [By Thread] [By Date] [Recent Entries]
Senthilkumaravelan K wrote:
<xsl:for-each select="report/result"> <tr> <xsl:if test="(position() mod 2 = 0)"> <xsl:attribute name="bgcolor"> #FFF8C6 </xsl:attribute> </xsl:if> <td> <xsl:value-of select="title" /> </td> <td> <xsl:if test="req/* or req/text()"> <textarea rows="$ROWS" cols="$COLS" readonly="true" onClick="alert(this.value)"> <xsl:if test="(position() mod 2 = 0)"> <xsl:attribute name="style">background-color: #FFF8C6</xsl:attribute> </xsl:if> <xsl:copy-of select="req" /> </textarea> </xsl:if> </td> <td> <textarea rows="$ROWS" cols="$COLS" > <xsl:if test="(position() mod 2 = 0)"> <xsl:attribute name="style">background-color: #FFF8C6</xsl:attribute> </xsl:if> <xsl:copy-of select="exp_resp" /> </textarea> </td> <td> <textarea rows="$ROWS" cols="$COLS" > <xsl:if test="(position() mod 2 = 0)"> <xsl:attribute name="style">background-color: #FFF8C6</xsl:attribute> </xsl:if> <xsl:copy-of select="resp" /> </textarea> </td> <td> <xsl:choose> <xsl:when test="normalize-space(resp/fault)=normalize-space(exp_resp/fault)"> <xsl:call-template name="STATUS_DETECTION"> <xsl:with-param name="my-param" select="'S'" /> Here you are passing 'S' and </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="STATUS_DETECTION"> <xsl:with-param name="my-param" select="'F'" /> here 'F' but later on where you compute the count ^^^^</xsl:call-template> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:for-each> your are not passing in a string (e.g. 'S' or 'F') but an node-set of S elements. There no such elements therefore your template creates failure images and then your count code does not find any and therefore the count is 0. -- Martin Honnen http://JavaScript.FAQTs.com/
|

Cart



