|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL FO: how to centre tables
I am getting confused, and wonder if anyone who knows XSL FOs could
help out. I want to specify a table, whose caption and body will be centered on
the page width. So I have done this:
<xsl:template match='table'>
<fo:table-and-caption>
<fo:caption>
<fo:block text-align-last="centered">
<xsl:text>Table </xsl:text>
<xsl:number level="1"/><xsl:text>. </xsl:text>
<xsl:apply-templates select="head"/>
</fo:block>
</fo:caption>
<fo:table-body>
<xsl:for-each select="row">
<fo:table-row>
<xsl:for-each select="cell">
<fo:table-cell>
<xsl:apply-templates/>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table-and-caption>
</xsl:template>
really simple, yes? the caption is centered, correctly, but what do I
do to make the <fo:table-body> centre itself?
Unless I mistake, a <table> must directly contain a <table-body> which
must directly contain <table-row>s. So there is no room for a <block>
in there.
sebastian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








