Commit bd4d1451 authored by haroldcb's avatar haroldcb

ajout traitement listes dans tableaux, corrections bugs

parent 47227d6f
......@@ -309,14 +309,11 @@
</xsl:if>
</xsl:template>
<!-- <xsl:template match="span" mode="textOnly">
<xsl:apply-templates/>
</xsl:template>-->
<!-- Simple Tables -->
<xsl:template match="table" mode="textOnly">
<xsl:choose>
<!-- Tables that doesn't contain colspan, rowspan or included tables -->
<xsl:when test="not(descendant::td/@colspan | descendant::td/@rowspan | descendant::table)">
<table>
<xsl:apply-templates select="node()" mode="textOnly"/>
......@@ -328,6 +325,7 @@
</xsl:choose>
</xsl:template>
<!-- Complexe Tables : create extern Ods files and copy content in it-->
<xsl:template name="TableComplexe">
<xsl:variable name="tableId">
<xsl:number level="any" count="table"/>
......@@ -352,10 +350,17 @@
</xsl:template>
<xsl:template match="td | th" mode="textOnly">
<td><p><xsl:apply-templates select="." mode="table"/></p></td>
<xsl:choose>
<xsl:when test="not(ul|ol)">
<td><p><xsl:apply-templates select="." mode="table"/></p></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:apply-templates select="." mode="table"/></td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="b" mode="table">
<xsl:template match="b" mode="table" priority="1">
<!-- b is not allowed, however em is allowed: replacing all b by em -->
<xsl:element name="em" namespace="http://www.utc.fr/ics/hdoc/xhtml">
<xsl:apply-templates select="node()" mode="textOnly"/>
......@@ -364,13 +369,19 @@
<!-- Balises pour les abbréviations -->
<xsl:template match="abbr" mode="table" priority="1">
<xsl:value-of select="."/>
<xsl:apply-templates select="node()" mode="textOnly"/>
</xsl:template>
<xsl:template match="sup" mode="table" priority="1">
<xsl:template match="abbr/sup" mode="table" priority="1">
<sup><xsl:value-of select="."/></sup>
</xsl:template>
<xsl:template match="ul|ol" mode="table" priority="1">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()" mode="textOnly"/>
</xsl:element>
</xsl:template>
<!-- Images -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment