I have 2 condition to check true or false and take a certain action.
Here is my code.
<xsl:variable name="hac" select="Hac1"/>
<xsl:choose>
<xsl:when test="$hac= 'false'">
<p style="display:inline">Hac1: </p><input type="checkbox" disabled="disabled" >
</xsl:when>
<xsl:otherwise>
<p>HACCP: </p><input type="checkbox" disabled="disabled" checked="checked">
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="glo1" select="Gloves"/>
<xsl:choose>
<xsl:when test1="$glo1= 'false'">
<p style="display:inline">Gloves: </p><input type="checkbox" disabled="disabled" >
</xsl:when>
<xsl:otherwise>
<p>Gloves: </p><input type="checkbox" disabled="disabled" checked="checked">
</xsl:otherwise>
</xsl:choose>
This only displays my Hac1 and not my Gloves, and i don’t know what seems to be the problem.
Assuming this is a direct copy/paste from your XSLT, you have several errors, so I’m amazed you actually get anything.
All four of the
<input>tags are missing their closure, so change the final part from>to/>on each one… for example…Then you have
<xsl:when test1=...which is incorrect. It should be<xsl:when test=...(note the lack of the1)…