I have a table in each row having checkbox and to find if checkbox is checked then only the data of that row is to be saved in text file using xslt

for this I have some xsl code

<xsl:for-each select="session">
<tr class="session{position() mod 2}">
<input name="mycheckbox1" type="checkbox" checked="Y" value="Y"> </input>
<xsl:for-each select="data">
<xsl:value-of select="."/>// this line is used to display data in tabular format
<xsl:if test=". = ''"> </xsl:if>
<xsl:if test="$totalvalue &gt; 0">
<span class="perc">
(<xsl:value-of select="format-number(number(.) div $totalvalue,'###%')"/>)

Thanks in advance