I
i79947
I'm trying to convert a HTML table into Ventura Publisher markup.
Because tables can be a bit complicated I decided to do this
with a Javascript function like this:
<xsl:template match="table">
<xsl:if test="not(@class='header')">
<xsl:variable name='table' select="jssoft:venturaTable(.)" />
<xsl:value-of select='$table'></xsl:value-of>
</xsl:if>
</xsl:template>
<xsl:template match="td">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tr">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
The problem is that table format is correct, but contents are
not transformed. Is there a way to apply transformation to
<td>-elements before javascript-conversion?
Because tables can be a bit complicated I decided to do this
with a Javascript function like this:
<xsl:template match="table">
<xsl:if test="not(@class='header')">
<xsl:variable name='table' select="jssoft:venturaTable(.)" />
<xsl:value-of select='$table'></xsl:value-of>
</xsl:if>
</xsl:template>
<xsl:template match="td">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tr">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
The problem is that table format is correct, but contents are
not transformed. Is there a way to apply transformation to
<td>-elements before javascript-conversion?