Hello,

I would like to do a "col-span" who depend on the value of a variable,
for example :

I have an xml file which contains:
<header>
  <item>Header 1</item>
  <item>Header 2</item>
  <item>Header 3</item>
</header>

And an xsl code like this :

<xsl:variable name="nb_header" select="count(header/item)"/>

<fo:table>
  <fo:table-column column-width="4cm"/>
  <xsl:for-each select="header/item">
    <fo:table-column column-width="4cm"/>
  </xsl:for-each>
  <fo:table-column column-width="3cm"/>
  <fo:table-body>
    <fo:table-header>
      <fo:table-row>
        <fo:table-cell>
          <fo:block>Test 1</fo:block>
        </fo:table-cell>
        <fo:table-cell number-columns-spanned="$nb_header">
          <fo:block>General comment for header 1, 2, 3</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block>Test 2</fo:block>
        </fo:table-cell>
      </fo:table-row>
    </fo:table-header>
   <!-- Data here -->
  </fo:table-body>
</fo:table>

Fop give me an error :
[ERROR] Error in number-columns-spanned property value '$nb_header':
org.apache.fop.fo.expr.PropertyException: illegal character

Is it possible to do that ?

Thanks,

Julien

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

Reply via email to