HI,I don't know how calculate the final exam score adding all questions scores. If the answer is correct I want to increment 1 point, and if is incorrect I don't want to increment the final score.
If someone could help me please...
<xsl:template match="exam">
<xsl:for-each select="question">
<xsl:if test="identquest/@id='Q'"><br></br><br></br>
<xsl:choose>
<xsl:when test="response/condition/@ident='Correct'">
<xsl:text>Correct answer</xsl:text>
<xsl:variable name="score" select="1" >
</xsl:variable>
</xsl:when>
<xsl
therwise>
<xsl:if test="response/condition/@ident='Incorrect'">
<xsl:text>Correct answer</xsl:text>
<xsl:variable name="score"select="0"></xsl:variable>
</xsl:if>
</xsl
therwise>
</xsl:choose>
</xsl:if>
..................more questions.............
</xsl:for-each>
<xsl:text> Final Score : .................</xsl:text>
</xsl:template>
If someone could help me please...
<xsl:template match="exam">
<xsl:for-each select="question">
<xsl:if test="identquest/@id='Q'"><br></br><br></br>
<xsl:choose>
<xsl:when test="response/condition/@ident='Correct'">
<xsl:text>Correct answer</xsl:text>
<xsl:variable name="score" select="1" >
</xsl:variable>
</xsl:when>
<xsl
<xsl:if test="response/condition/@ident='Incorrect'">
<xsl:text>Correct answer</xsl:text>
<xsl:variable name="score"select="0"></xsl:variable>
</xsl:if>
</xsl
</xsl:choose>
</xsl:if>
..................more questions.............
</xsl:for-each>
<xsl:text> Final Score : .................</xsl:text>
</xsl:template>