XSL Dynamically changing the Column width

Posted on 2004-11-23
Last Modified: 2012-05-05
I have the following table
<fo:table-column column-width="0.35in" />
<fo:table-column column-width="4in" />
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.
Question by:jaffersathick
    LVL 19

    Accepted Solution

    Just try follwoing code in your XSL which produces your xsl:fo file:
    <xsl:when select="@attribute1='true'">
    <xsl:element name="fo:table-column">
    <xsl:attribute name="column-width">2in</xsl:attribute>
    <xsl:element name="fo:table-column">
    <xsl:attribute name="column-width">0.35in</xsl:attribute>

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now