This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Column widths
- From: Gustaf Liljegren <gustafl at algonet dot se>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Sat, 22 Jun 2002 16:17:14 +0200
- Subject: [xsl] Column widths
- Reply-to: xsl-list at lists dot mulberrytech dot com
Thanks for all help with my last problem. Today I got a problem with column
widths. I use the XHTML table model, and this is in the <td> and <th>
templates:
<xsl:variable name="x" select="position()"/>
...
<xsl:if test="ancestor::table//col[$x]/attribute::width">
<xsl:attribute name="width">
<xsl:value-of select="ancestor::table//col[$x]/attribute::width"/>
</xsl:attribute>
</xsl:if>
I try to add a width attribute to <fo:table-cell> here, but what happens is
that I get the first column's width on every cell, except the last which
gets no width attribute at all.
XPath seem to suggest a syntax with [ and ] for attributes, like
ancestor::table//col[$x][attribute::width]. I tried that too, but then all
width attributes was empty (except the last which has no attribute).
Gustaf
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list