Hi,

Dave Pawson wrote:
On 07/10/05, Svante Schubert <[EMAIL PROTECTED]> wrote:

Hi Dave,

I had recently the same problem, what do you think of accessing the
first cell

<xsl:apply-templates select="table:table-cell[1]">
    <xsl:with-param name="maxColumnNo"       select="$maxColumnNo" />
    <xsl:with-param name="currentRowNumber"  select="$currentRowNumber" />
</xsl:apply-templates>

and traversing afterwards to every following cell sibling.

<xsl:choose>
    <xsl:when test="count(following-sibling::*) != 0">
        <xsl:apply-templates select="following-sibling::*[1]">
...


By this you might keep in mind the row and column number, which gets
very useful sometimes (e.g. other paradigm use a jump index instead of
repetition of cells).


That seems like an apply templates by anothe name?


Yes, only applying one node at the time.

Perhaps using this with a template parameter which is the
updated true column count could be useful?

Yes, that's what it is all about. I have to admit this parameter got lost during the copy-paste into this mail.

BTW a variable like maxColumnNo becomes useful if you export the Office XML to a language, where no repeated cell elements exist.

Imagine a Calc spreadsheet with background color for all it's 16.777.216 (65536 * 256) cells, each written out in XHTML.
A nearly 25 MB large document if simple written out.


What do you think of collecting Office specific and major XSLT pattern in a FAQ?

Svante

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to