Subject: Re: [xsl] xsl table From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 13 Jun 2007 18:54:51 +0300 |
And this is my xsl file:
<xsl:template match="table"> <fo:block xsl:use-attribute-sets="kursinfo"> <fo:table table-layout="{$table.layout}" width="{$table.width}"> <fo:table-body> <xsl:apply-templates select="tr" /> </fo:table-body> </fo:table> </fo:block> </xsl:template>
<xsl:template match="tr"> <xsl:param name="pos_tr" select="position()" />
<fo:table-row> <xsl:apply-templates select="td" />
<xsl:apply-templates select="td"> <xsl:with-param name="pos_tr" select="position()"/> </xsl:apply-templates/>
</fo:table-row> </xsl:template>
<xsl:template match="td">
<xsl:param name="pos_td" select="position()" />
<fo:table-cell column-number="1" width="{$table.colwidth1}">
<fo:block><xsl:value-of select="//tr[$pos_tr]/td[$pos_td]"/>
</fo:block></fo:table-cell> </xsl:template>
I want to use a variable for the <tr>-position as well as for the <td>-position.
How can I manage it to use the variable from <tr> when I match <td>? If I want to parse the document an error occurs saying "variable with name pos_tr could not be founded..."
-- Upcoming hands-on training(Europe 2007): XSL-FO Jun 11; UBL Oct 01 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl table, Florent Georges | Thread | Re: [xsl] xsl table, Andreas Peter |
RE: [xsl] XSLT and XML Schema, Michael Kay | Date | Re: [xsl] Merging multiple document, Mark Peters |
Month |