Hi people anyone who understand xslt well can you please help me. I just want to display the checkbox, if got value checkbox must be checked else not checked. I used choose but it not giving me what I want. It just give me only checked checkbox.
<table border="1" cellspacing="0" cellpadding="0" width="100%" style="border-style:solid;border-color:Black;border-width:1px;font-family:Arial;border-collapse: collapse;font-size:11px;" > <xsl:for-each select="$lst4[generate-id(.) = generate-id(key('keyMoticationID', ISTMotivationID)[1])]"> <xsl:variable name="intISTMotivationID"> <xsl:value-of select="ISTMotivationID" /> </xsl:variable> <tr> <td style="width:2%; padding:2px;text-align:center;"> <xsl:value-of select ="$lst4[ISTMotivationID=$intISTMotivationID]/ISTReasonID"/> </td> <td style="width:96%; padding:2px;"> <xsl:value-of select ="$lst4[ISTMotivationID=$intISTMotivationID]/ISTMotivation"/> </td> <xsl:for-each select="$lst5[generate-id(.) = generate-id(key('keycheck',concat(ISTID,'+', $intISTMotivationID))[1])]"> <xsl:variable name="intISTID"> <xsl:value-of select="ISTID" /> </xsl:variable> <xsl:choose> <xsl:when test="$lst5[ISTID=$intISTID and ISTMotivationID=$intISTMotivationID]/ISTReasonID"> <td valign="top" style="width:2%; padding:3px; text-align:center;"> <input id="chkISTReasonID" name="ISTReasonID" type="checkbox" checked="checked"></input> </td> </xsl:when> <xsl:otherwise> <td valign="top" style="width:2%; padding:3px;text-align:center;"> <input id="chkISTReasonID" name="ISTReasonID" type="checkbox"></input> </td> </xsl:otherwise> </xsl:choose> </xsl:for-each> </tr> </xsl:for-each> </table>
No comments:
Post a Comment