• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

XSL Dynamically changing the Column width

I have the following table
<fo:table>
<fo:table-column column-width="0.35in" />
<fo:table-column column-width="4in" />
</fo:table>.
I want to dynamically change the above column width based on a elements attribute. For example if @attribute1 = "True" then change the column width from 0.35 inch to 2 inch.
Can anyone answer me ASAP pls.
Thanks
0
jaffersathick
Asked:
jaffersathick
1 Solution
 
ramazanyichCommented:
Just try follwoing code in your XSL which produces your xsl:fo file:
<xsl:choose>
<xsl:when select="@attribute1='true'">
<xsl:element name="fo:table-column">
<xsl:attribute name="column-width">2in</xsl:attribute>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="fo:table-column">
<xsl:attribute name="column-width">0.35in</xsl:attribute>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
0
 
jaffersathickAuthor Commented:
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now