MPPDF-54: Identical ids in tables in different documents caused a build failure
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@332923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea19d8a402
commit
76ca1f8a39
@ -21,6 +21,7 @@
|
|||||||
<!-- Table rendering -->
|
<!-- Table rendering -->
|
||||||
<!-- Generation for tables with THEAD and TBODY -->
|
<!-- Generation for tables with THEAD and TBODY -->
|
||||||
<xsl:template match="table" name="find-max-columns">
|
<xsl:template match="table" name="find-max-columns">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
||||||
<xsl:param name="row">1</xsl:param>
|
<xsl:param name="row">1</xsl:param>
|
||||||
<xsl:param name="maxColumns">1</xsl:param>
|
<xsl:param name="maxColumns">1</xsl:param>
|
||||||
@ -49,16 +50,19 @@
|
|||||||
<xsl:call-template name="find-max-columns">
|
<xsl:call-template name="find-max-columns">
|
||||||
<xsl:with-param name="row" select="$row+1"/>
|
<xsl:with-param name="row" select="$row+1"/>
|
||||||
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:call-template name="print-table">
|
<xsl:call-template name="print-table">
|
||||||
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template name="print-table">
|
<xsl:template name="print-table">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||||
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
||||||
<fo:block xsl:use-attribute-sets="table.padding">
|
<fo:block xsl:use-attribute-sets="table.padding">
|
||||||
@ -83,6 +87,7 @@
|
|||||||
<!-- Process any thead elements -->
|
<!-- Process any thead elements -->
|
||||||
<xsl:apply-templates select="thead">
|
<xsl:apply-templates select="thead">
|
||||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</fo:table-header>
|
</fo:table-header>
|
||||||
<!-- If there is a caption element, output a table-footer -->
|
<!-- If there is a caption element, output a table-footer -->
|
||||||
@ -103,6 +108,7 @@
|
|||||||
<fo:table-body>
|
<fo:table-body>
|
||||||
<xsl:apply-templates select="tbody/tr | tr">
|
<xsl:apply-templates select="tbody/tr | tr">
|
||||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</fo:table-body>
|
</fo:table-body>
|
||||||
</fo:table>
|
</fo:table>
|
||||||
@ -110,6 +116,7 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- Generation for tables without THEAD and TBODY -->
|
<!-- Generation for tables without THEAD and TBODY -->
|
||||||
<xsl:template match="table[count(thead)=0]" name="html-find-max-columns">
|
<xsl:template match="table[count(thead)=0]" name="html-find-max-columns">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
||||||
<xsl:param name="row">1</xsl:param>
|
<xsl:param name="row">1</xsl:param>
|
||||||
<xsl:param name="maxColumns">1</xsl:param>
|
<xsl:param name="maxColumns">1</xsl:param>
|
||||||
@ -138,16 +145,19 @@
|
|||||||
<xsl:call-template name="html-find-max-columns">
|
<xsl:call-template name="html-find-max-columns">
|
||||||
<xsl:with-param name="row" select="$row+1"/>
|
<xsl:with-param name="row" select="$row+1"/>
|
||||||
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:call-template name="html-print-table">
|
<xsl:call-template name="html-print-table">
|
||||||
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template name="html-print-table">
|
<xsl:template name="html-print-table">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||||
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
||||||
<fo:block xsl:use-attribute-sets="table.padding">
|
<fo:block xsl:use-attribute-sets="table.padding">
|
||||||
@ -175,7 +185,9 @@
|
|||||||
-->
|
-->
|
||||||
<xsl:if test="tr[1][count(*)=count(th)]">
|
<xsl:if test="tr[1][count(*)=count(th)]">
|
||||||
<!-- Process any tr elements -->
|
<!-- Process any tr elements -->
|
||||||
<xsl:apply-templates select="tr[1][count(*)=count(th)]"/>
|
<xsl:apply-templates select="tr[1][count(*)=count(th)]">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
||||||
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
||||||
<fo:table-row keep-with-previous="always">
|
<fo:table-row keep-with-previous="always">
|
||||||
@ -205,6 +217,7 @@
|
|||||||
<fo:table-body>
|
<fo:table-body>
|
||||||
<xsl:apply-templates select="tr[count(*)!=count(th)]">
|
<xsl:apply-templates select="tr[count(*)!=count(th)]">
|
||||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</fo:table-body>
|
</fo:table-body>
|
||||||
</fo:table>
|
</fo:table>
|
||||||
@ -212,6 +225,7 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- body table row -->
|
<!-- body table row -->
|
||||||
<xsl:template match="table/tr | table/tbody/tr">
|
<xsl:template match="table/tr | table/tbody/tr">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||||
<xsl:variable name="nColumns" select="count(th | td)
|
<xsl:variable name="nColumns" select="count(th | td)
|
||||||
+ sum(th/@colspan |td/@colspan)
|
+ sum(th/@colspan |td/@colspan)
|
||||||
@ -227,7 +241,9 @@
|
|||||||
<!-- Format the table row -->
|
<!-- Format the table row -->
|
||||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||||
<xsl:apply-templates select="th|td"/>
|
<xsl:apply-templates select="th|td">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:table-row>
|
</fo:table-row>
|
||||||
<!-- Add in a spacer/border row -->
|
<!-- Add in a spacer/border row -->
|
||||||
<xsl:comment> ::: Table row spacer for row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
<xsl:comment> ::: Table row spacer for row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||||
@ -257,20 +273,26 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- a row containing at least a head cell -->
|
<!-- a row containing at least a head cell -->
|
||||||
<xsl:template match="table/tbody/tr[th] | table/tr[th]">
|
<xsl:template match="table/tbody/tr[th] | table/tr[th]">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:comment> ::: Subheading row ::: </xsl:comment>
|
<xsl:comment> ::: Subheading row ::: </xsl:comment>
|
||||||
<!-- Changed from table.body.row (a bug!) -->
|
<!-- Changed from table.body.row (a bug!) -->
|
||||||
<fo:table-row xsl:use-attribute-sets="table.subheading.row">
|
<fo:table-row xsl:use-attribute-sets="table.subheading.row">
|
||||||
<xsl:apply-templates select="th|td"/>
|
<xsl:apply-templates select="th|td">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:table-row>
|
</fo:table-row>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- The last row -->
|
<!-- The last row -->
|
||||||
<xsl:template match="table/tbody/tr[last()] | table/tr[last()]">
|
<xsl:template match="table/tbody/tr[last()] | table/tr[last()]">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||||
<xsl:variable name="nColumns" select="count(th|td) + sum(th/@colspan|td/@colspan) - count(th/@colspan|td/@colspan)"/>
|
<xsl:variable name="nColumns" select="count(th|td) + sum(th/@colspan|td/@colspan) - count(th/@colspan|td/@colspan)"/>
|
||||||
<!-- Format the table row -->
|
<!-- Format the table row -->
|
||||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||||
<xsl:apply-templates select="th|td"/>
|
<xsl:apply-templates select="th|td">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:table-row>
|
</fo:table-row>
|
||||||
<!-- Add a spacer/border row: last row rule -->
|
<!-- Add a spacer/border row: last row rule -->
|
||||||
<xsl:comment> ::: Table row spacer for last row ::: </xsl:comment>
|
<xsl:comment> ::: Table row spacer for last row ::: </xsl:comment>
|
||||||
@ -285,9 +307,12 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- the table head -->
|
<!-- the table head -->
|
||||||
<xsl:template match="thead">
|
<xsl:template match="thead">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||||
<!-- Process any tr elements -->
|
<!-- Process any tr elements -->
|
||||||
<xsl:apply-templates select="tr"/>
|
<xsl:apply-templates select="tr">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
||||||
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
||||||
<fo:table-row keep-with-previous="always">
|
<fo:table-row keep-with-previous="always">
|
||||||
@ -300,25 +325,36 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- Table heading rows -->
|
<!-- Table heading rows -->
|
||||||
<xsl:template match="table/tr[1][count(*)=count(th)] | thead/tr">
|
<xsl:template match="table/tr[1][count(*)=count(th)] | thead/tr">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:comment> ::: Table heading row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
<xsl:comment> ::: Table heading row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||||
<fo:table-row xsl:use-attribute-sets="table.title.row">
|
<fo:table-row xsl:use-attribute-sets="table.title.row">
|
||||||
<!-- Process any th or td elements -->
|
<!-- Process any th or td elements -->
|
||||||
<xsl:apply-templates select="th|td"/>
|
<xsl:apply-templates select="th|td">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:table-row>
|
</fo:table-row>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- Table heading cell -->
|
<!-- Table heading cell -->
|
||||||
<xsl:template match="table/tbody/tr/th | table/tr/th">
|
<xsl:template match="table/tbody/tr/th | table/tr/th">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:comment> : Table subheading cell : </xsl:comment>
|
<xsl:comment> : Table subheading cell : </xsl:comment>
|
||||||
<fo:table-cell xsl:use-attribute-sets="table.subheading.cell">
|
<fo:table-cell xsl:use-attribute-sets="table.subheading.cell">
|
||||||
<xsl:apply-templates select="@rowspan"/>
|
<xsl:apply-templates select="@rowspan">
|
||||||
<xsl:apply-templates select="@colspan|@align"/>
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
<xsl:apply-templates select="@colspan|@align">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
<fo:block xsl:use-attribute-sets="table.subheading.block">
|
<fo:block xsl:use-attribute-sets="table.subheading.block">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:block>
|
</fo:block>
|
||||||
</fo:table-cell>
|
</fo:table-cell>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- A heading cell -->
|
<!-- A heading cell -->
|
||||||
<xsl:template match="table/tr[1][count(*)=count(th)]/th | table/thead/tr/th | table/thead/tr/td">
|
<xsl:template match="table/tr[1][count(*)=count(th)]/th | table/thead/tr/th | table/thead/tr/td">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:comment> : Table heading cell <xsl:value-of select="position()"/> : </xsl:comment>
|
<xsl:comment> : Table heading cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||||
<fo:table-cell xsl:use-attribute-sets="table.heading.cell">
|
<fo:table-cell xsl:use-attribute-sets="table.heading.cell">
|
||||||
<xsl:if test="@colspan">
|
<xsl:if test="@colspan">
|
||||||
@ -326,19 +362,28 @@
|
|||||||
<xsl:attribute name="border-after-width">0.75pt</xsl:attribute>
|
<xsl:attribute name="border-after-width">0.75pt</xsl:attribute>
|
||||||
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select="@colspan|@rowspan|@align"/>
|
<xsl:apply-templates select="@colspan|@rowspan|@align">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
<fo:block xsl:use-attribute-sets="table.heading.block">
|
<fo:block xsl:use-attribute-sets="table.heading.block">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:block>
|
</fo:block>
|
||||||
</fo:table-cell>
|
</fo:table-cell>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<!-- A table cell -->
|
<!-- A table cell -->
|
||||||
<xsl:template match="td">
|
<xsl:template match="td">
|
||||||
|
<xsl:param name="fileName"/>
|
||||||
<xsl:comment> : Table body cell <xsl:value-of select="position()"/> : </xsl:comment>
|
<xsl:comment> : Table body cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||||
<fo:table-cell xsl:use-attribute-sets="table.body.cell">
|
<fo:table-cell xsl:use-attribute-sets="table.body.cell">
|
||||||
<xsl:apply-templates select="@colspan|@align|@rowspan"/>
|
<xsl:apply-templates select="@colspan|@align|@rowspan">
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
<fo:block xsl:use-attribute-sets="table.body.block">
|
<fo:block xsl:use-attribute-sets="table.body.block">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates>
|
||||||
|
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
|
||||||
|
</xsl:apply-templates>
|
||||||
</fo:block>
|
</fo:block>
|
||||||
</fo:table-cell>
|
</fo:table-cell>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="2.5-SNAPSHOT" date="in SVN">
|
<release version="2.5-SNAPSHOT" date="in SVN">
|
||||||
|
<action dev="ltheussl" type="fix" issue="MPPDF-54">Identical ids in tables in different documents caused a build failure.</action>
|
||||||
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
|
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
|
||||||
<ul>
|
<ul>
|
||||||
<li>xercesImpl v 2.4.0 -> v2.6.2</li>
|
<li>xercesImpl v 2.4.0 -> v2.6.2</li>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user