Hi all,
I have to generate a two-column table using xslt.
My xsl code is:
<xsl:for-each select="my-tag">
<xsl:choose>
<xsl:when test="(position() mod 2) = 1">
--ADD tags <tr><td>
---add left cell here--
</xsl:when>
<xsl:when test="(position() mod 2) = 0">
---add right cell here--
--ADD tags </td></tr>
</xsl:when>
</xsl:choose>
<xsl:for-each>
But my <tr><td> tags come out as <tr> and <td>
which doesn't work in further usage of the output.
I tried using CDATA:
<xsl:text disable-output-escaping="yes"><![CDATA[ <tr>]]> </xsl:text>
But it still results the same.
Is there any work around ? Please advice me.
TIA,
Sheila
I have to generate a two-column table using xslt.
My xsl code is:
<xsl:for-each select="my-tag">
<xsl:choose>
<xsl:when test="(position() mod 2) = 1">
--ADD tags <tr><td>
---add left cell here--
</xsl:when>
<xsl:when test="(position() mod 2) = 0">
---add right cell here--
--ADD tags </td></tr>
</xsl:when>
</xsl:choose>
<xsl:for-each>
But my <tr><td> tags come out as <tr> and <td>
which doesn't work in further usage of the output.
I tried using CDATA:
<xsl:text disable-output-escaping="yes"><![CDATA[ <tr>]]> </xsl:text>
But it still results the same.
Is there any work around ? Please advice me.
TIA,
Sheila