Subject: Re: [xsl] table formating From: Michael Kay <mike@xxxxxxxxxxxx> Date: Wed, 26 Jan 2011 14:20:29 +0000 |
Do a preprocessing pass to add an @index attribute to all cells.Sorry, that's the answer to a slightly different question - but one that's often useful in this kind of situation.
Identity template plus
<xsl:template match="row"> <xsl:for-each-group select="cell" group-starting-with="cell[@index]"> <xsl:for-each select="current-group()"> <cell index="{current-group()[1]/@index + position() - 1}"> <xsl:copy-of select="child::node()"/> </ </ </ </
<xsl:template match="row"> <xsl:apply-templates select="cell[1]" mode="add-missing-cells"> <xsl:wirh-param name="present-in-output select="0"/> </xsl:apply-templates> </xsl:template>
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] table formating, Szabo, Patrick \(LNG | Thread | AW: [xsl] table formating, Szabo, Patrick \(LNG |
AW: [xsl] table formating, Szabo, Patrick \(LNG | Date | AW: [xsl] table formating, Szabo, Patrick \(LNG |
Month |