<fo:table space-after="10pt" space-before="10pt" table-layout="????">
<fo:table-column
column-width="proportional-column-width(100)???"/>
<fo:table-column column-width="scale-to-fit????"/>
<fo:table-column column-width="auto???"/>
<fo:table-body>
<xsl:for-each select="tr">
<fo:table-row>
<xsl:for-each select="td">
<fo:table-cell border-style="solid" border-width="1pt" >
<fo:block space-after="5pt" space-before="5pt"><xsl:value-of
select="."/></fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
Thanks in advance
Diana Steiner
> I have a big xml-document (the pdf is about 200 pages), which includes
> many different tables. I do not want to include the information about
> the column-width in the xml-document.
My experience is that generating nice tables is a very layout-oriented task.
So generally, unless your tables are very simple, there is almost certainly
a need for at least some table layout properties in your schema, and column
width use to be one of them.
> The Stylesheet should somehow
> adjust the column-width automatically (like HTML), depending on how
> much text the cell contains.
The FO equivalent is table/@table-layout="auto". Just make sure first that
your formatter has implemented it. My guess is that "auto" is harder to
implement than "fixed", and therefore less supported.
There are good alternatives however. Even if you have a column width
property in your schema, you shouldn't need to manually specify each column
width while editing. Depending on the flexibility in your editor, you can
make almost a WYSIWYG interface for users (i.e. resizing a table columns
have a real effect in your PDF output).
Gustaf
Only Antenna xsl formatter supports table-layout=auto. fop and xep doesn't.
ds...@ids.de (DStei) wrote in message news:<a235326e.0303...@posting.google.com>...