I think you have to calculate the column-width in your java code and then
pass it to the xml or direct to the xslt transformer as parameter.
possibility 1:
create xml structure like this in your data source
table1
columns
width10/width
width15/width
width30/width
/columns
/table1
in your xsl read out this values
xsl:for-each select=table1/columns
fo:table-column column-width=proportional-column-width({@width})/
/xsl:for-each
possibility 2:
pass the values to the stylesheet at transforming process
Transformer transformer = =
TransformerFactory.newInstance().newTransformer( xslSource );
transformer.setParameter( table1-column1, yourValue1 );
transformer.setParameter( table1-column2, yourValue2 );
...
in your xsl catch the parameters
xsl:param name=table1-column1/
xsl:param name=table1-column2/
and use it to set the columns
fo:table-column
column-width=proportional-column-width({$table1-column1})/
fo:table-column
column-width=proportional-column-width({$table1-column2})/
Note that all of this is untestet stuff and may not work.
cu Torsten
-Original Message-
From: Juergen Lippold [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 15. Mai 2002 11:17
To:
Subject: dynamic table-column-width
Hello,
does anybody know if there is a possibilty to let FOP-Managing the
column-width?
The problem is that I've got some tables with String-attributes for each
column with a different width.
There is one possibiltity to calculate the width in the java application,
but I don't think that there will be very
good performance doing this because you have to check the length of all the
Strings.
Thanks for help.
Juergen Lippold
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]