I use XSLT to generate an HTML table using info from an XML file. I want only 4 TD in every TR.
It works fine on Chrome and Safari. Not in Firefox. I understand that Firefox doesn't support 'disable-output-escaping' so I know that is the problem (it just writes on the web page) . Is there another way to generate this kind of (simple) table with XSLT on client side?
My code looks like this:
<table>
<xsl:for-each select="movies/movie">
<xsl:if test="(position() = 1) or ((position() mod 4) = 1)">
<!-- This is a <tr> -->
<xsl:text disable-output-escaping="yes"><tr></xsl:text>
</xsl:if>
<td>
<!-- Some stuff goes here. -->
</td>
<xsl:if test="((position() mod 4) = 0) or (position() = last())">
<!-- This is a </tr> -->
<xsl:text disable-output-escaping="yes"></tr></xsl:text>
</xsl:if>
</xsl:for-each>
</table>