Skip to content

Commit

Permalink
Keep the row and colspans in table rows (closes ContentMine#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Nov 29, 2016
1 parent 47c3bb3 commit a184fce
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/main/resources/org/xmlcml/norma/pubstyle/nlm/toHtml.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@
*[local-name()='table-wrap'] |
*[local-name()='table-wrap-foot'] |
*[local-name()='tbody'] |
*[local-name()='td'] |
*[local-name()='tfoot'] |
*[local-name()='th'] |
*[local-name()='th'] |
*[local-name()='thead'] |
*[local-name()='tr']
" >
Expand All @@ -61,6 +58,21 @@
</xsl:copy>
</xsl:template>

<xsl:template match="
*[local-name()='td'] |
*[local-name()='th']
" >
<xsl:copy>
<xsl:if test="@colspan">
<xsl:attribute name="colspan"><xsl:value-of select="./@colspan" /></xsl:attribute>
</xsl:if>
<xsl:if test="@rowspan">
<xsl:attribute name="rowspan"><xsl:value-of select="./@rowspan" /></xsl:attribute>
</xsl:if>
<xsl:apply-templates select=" * | text()" />
</xsl:copy>
</xsl:template>


<!-- NON-HTML DIV -->
<xsl:template match="
Expand Down

0 comments on commit a184fce

Please sign in to comment.