|
Subject: RE: [xsl] [xsl-fo] generating the correct number of columns for a table from html to xsl-fo From: "El Hage Camille" <CAMILLE.ELHAGE@xxxxxxxxxxxxxxxx> Date: Mon, 14 Oct 2002 20:02:38 +0200 |
David Carlisle wrote:
> <xsl:for-each select="//*[position() <= 8]">
> <fo:table-column column-width="2cm"/>
> </xsl:for-each>
thanks for answering David, however I still have two problems:
1- the value 8 is in a variable called maxNumbers and the following does not seem to work:
<xsl:for-each select="//*[position() <=$maxNumbers]">
2- the number of fo:table-column genereated by the following code is more than 8, it is 94.
<xsl:template match="performance-table">
<xsl:variable name="maxNumbers">
<xsl:for-each select="performance-tables/performance-table/performance-table-tr">
<xsl:if test="count(performance-tables/performance-table/performance-table-tr[count(performance-table-td) >
count(current()/performance-table-td)]) = 0">
<xsl:value-of select="count(performance-table-td)"/>:
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring-before($maxNumbers,':')"/>
<fo:table>
<xsl:for-each select="//*[position() <= 8]">
<fo:table-column column-width="2cm"/>
</xsl:for-each>
<fo:table-body>
<xsl:apply-templates select="performance-table-tr"/>
</fo:table-body>
</fo:table>
</xsl:template>
here is the source xml:
<performance-tables>
<performance-table-name>123546</performance-table-name>
<performance-table-remark>bla bla bla</performance-table-remark>
<performance-table>
<performance-table-tr/>
<performance-table-tr>
<performance-table-td>rty</performance-table-td>
<performance-table-td>rty</performance-table-td>
<performance-table-td>rty.</performance-table-td>
<performance-table-td> </performance-table-td>
<performance-table-td>rty</performance-table-td>
<performance-table-td>rty</performance-table-td>
</performance-table-tr>
<performance-table-tr>
<performance-table-td> </performance-table-td>
<performance-table-td> </performance-table-td>
<performance-table-td>yu</performance-table-td>
<performance-table-td>ui</performance-table-td>
<performance-table-td>uio</performance-table-td>
<performance-table-td>io</performance-table-td>
<performance-table-td>ki</performance-table-td>
<performance-table-td>mpl</performance-table-td>
</performance-table-tr>
<performance-table-tr>
<performance-table-td> </performance-table-td>
<performance-table-td> </performance-table-td>
<performance-table-td>1</performance-table-td>
<performance-table-td>2</performance-table-td>
<performance-table-td>3</performance-table-td>
<performance-table-td>4</performance-table-td>
<performance-table-td>5</performance-table-td>
<performance-table-td> </performance-table-td>
</performance-table-tr>
<performance-table-tr>
<performance-table-td>6| - 12 - 6</performance-table-td>
<performance-table-td>Clear</performance-table-td>
<performance-table-td>23</performance-table-td>
<performance-table-td>6</performance-table-td>
<performance-table-td>2</performance-table-td>
<performance-table-td>83</performance-table-td>
<performance-table-td>17</performance-table-td>
<performance-table-td>17</performance-table-td>
</performance-table-tr>
<performance-table-tr>
<performance-table-td>6| - 12Ar - |6</performance-table-td>
<performance-table-td>Dark blue</performance-table-td>
<performance-table-td>23</performance-table-td>
<performance-table-td>6</performance-table-td>
<performance-table-td>2</performance-table-td>
<performance-table-td>83</performance-table-td>
<performance-table-td>16</performance-table-td>
<performance-table-td>16</performance-table-td>
</performance-table-tr>
<performance-table-tr>
<performance-table-td>6| - 12 - 6</performance-table-td>
<performance-table-td>Brilliant bronze</performance-table-td>
<performance-table-td>25</performance-table-td>
<performance-table-td>18</performance-table-td>
<performance-table-td>3</performance-table-td>
<performance-table-td>63</performance-table-td>
<performance-table-td>20</performance-table-td>
<performance-table-td>20</performance-table-td>
</performance-table-tr>
</performance-table>
</performance-tables>
any idea on how to solve this?
regards,
Camille
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] [xsl-fo] generating the c, Michael H. Semcheski | Thread | [xsl] [xsl-fo] generating the corre, Jaish_Kumar |
| Re: [xsl] Finding wanted nodes in c, Geoff | Date | RE: [xsl] Eliminating duplicate nod, Mac Martine |
| Month |