1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <xsl:key match="row" name="ligne" use="concat(entry[@colname='col1'],entry[@colname='col3'],entry[@colname='col4'],entry[@colname='col5'],entry[@colname='col6'])"/>
<xsl:template match="/">
<tbody>
<xsl:apply-templates select="//row[generate-id(.)=generate-id(key('ligne',concat(entry[@colname='col1'],entry[@colname='col3'],entry[@colname='col4'],entry[@colname='col5'],entry[@colname='col6']))[1])]" mode="regroupement">
</xsl:apply-templates>
</tbody>
</xsl:template>
<xsl:template match="row" mode="regroupement">
<row>
<xsl:copy-of select="./entry[@colname='col1']"/>
<entry colname="col2">
<xsl:apply-templates select="key('ligne',concat(entry[@colname='col1'],entry[@colname='col3'],entry[@colname='col4'],entry[@colname='col5'],entry[@colname='col6']))" mode="concatenation"/>
</entry>
<xsl:copy-of select="./entry[@colname='col3']"/>
<xsl:copy-of select="./entry[@colname='col4']"/>
<xsl:copy-of select="./entry[@colname='col5']"/>
<xsl:copy-of select="./entry[@colname='col6']"/>
</row>
</xsl:template>
<xsl:template match="row" mode="concatenation">
<xsl:value-of select="concat(' ',entry[@colname='col2'])"/>
</xsl:template> |
Partager