Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Colspan in XSLT

Tags:

xslt

I am trying to get colspan working in XSLT but it just will not work for me...here is what I have please tell me where I am going wrong.

<xsl:attribute-set name="colspan-2">
    <xsl:attribute name="colspan">2</xsl:attribute>
</xsl:attribute-set>

<fo:table-cell xsl:use-attribute-sets="valign-c title border colspan-2">
    <fo:block>
        <xsl:value-of select="data"/>
    </fo:block>
</fo:table-cell>

My other attributes work fine, but colspan-1 causes everything to fail. Seems to me like this should work, but it not. I am probably missing something silly, but any help is greatly appreciated.

like image 969
mgrenier Avatar asked Dec 19 '22 02:12

mgrenier


1 Answers

Don't confuse XSL-FO with HTML.

HTML uses colspan

XSL-FO uses number-columns-spanned

So, if you try replace colspan with number-columns-spanned then all should be well.

like image 168
Tim C Avatar answered Jan 21 '23 16:01

Tim C