Loading ...
Sorry, an error occurred while loading the content.

How to obtain the table column width dynamically

Expand Messages
  • C. Myers
    Sorry that I used the wrong subject in my last posting. ... __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile
    Message 1 of 3 , Dec 6, 2004
    • 0 Attachment
      Sorry that I used the wrong subject in my last
      posting.

      >
      > Hi,
      >
      > I need to use the column-width as a base variable to
      > derive another value dynamically, I tried to use the
      > function of "from-table-column()", it didn't work.
      > Could someone give me a hint? Please refer to the
      > following codes, thanks.
      >
      >
      >
      > <fo:table space-before.optimum="3pt">
      >
      > <fo:table-column
      > column-width="proportional-column-width(2.5)"/>
      >
      > <fo:table-column
      > column-width="proportional-column-width(3.5)"/>
      >
      > <fo:table-column
      > column-width="proportional-column-width(20)"/>
      >
      > <fo:table-body>
      >
      > <fo:table-row>
      >
      > <fo:table-cell>
      >
      > <fo:block><xsl:call-template
      > name="code-left-icons" /></fo:block>
      >
      > </fo:table-cell>
      >
      > <fo:table-cell>
      >
      > <xsl:call-template name="codetemplate" />
      >
      > </fo:table-cell>
      >
      > <fo:table-cell>
      >
      > <xsl:variable
      > name="column-width"><xsl:value-of
      > select="from-table-column(column-width)"
      > /></xsl:variable>
      >
      > <fo:block><xsl:value-of select="$column-width"
      > /></fo:block>
      >
      > <xsl:call-template name="descriptiontemplate"
      > />
      >
      > </fo:table-cell>
      >
      > </fo:table-row>
      >
      > </fo:table-body>
      >
      > </fo:table>
      >
      > </xsl:template>
      >
      >
      >
      >
      > ---------------------------------
      > Do you Yahoo!?
      > Yahoo! Mail - 250MB free storage. Do more. Manage
      > less.
      >
      > [Non-text portions of this message have been
      > removed]
      >
      >




      __________________________________
      Do you Yahoo!?
      Take Yahoo! Mail with you! Get it on your mobile phone.
      http://mobile.yahoo.com/maildemo
    • Chris Bowditch
      ... The XSLT and XSLFO processes are separate, and the XSLFO process happens afterwards, so there is no way to get information from the XSLFO process into
      Message 2 of 3 , Dec 7, 2004
      • 0 Attachment
        C. Myers wrote:

        > > I need to use the column-width as a base variable to
        > > derive another value dynamically, I tried to use the
        > > function of "from-table-column()", it didn't work.
        > > Could someone give me a hint? Please refer to the
        > > following codes, thanks.

        The XSLT and XSLFO processes are separate, and the XSLFO process happens
        afterwards, so there is no way to get information from the XSLFO process into
        XSLT. You can write some XSLT to have a guess at the width of the column. In
        order to help you write this XSLT I would need to see some of the input XML.

        <snip/>

        Chris
      • W. Eliot Kimber
        ... In a one-pass process. Using two passes you can, of course, do whatever you need, although it may not always be straightforward. Both XEP and XSL Formatter
        Message 3 of 3 , Dec 7, 2004
        • 0 Attachment
          Chris Bowditch wrote:

          > C. Myers wrote:
          >
          >
          >> > I need to use the column-width as a base variable to
          >> > derive another value dynamically, I tried to use the
          >> > function of "from-table-column()", it didn't work.
          >> > Could someone give me a hint? Please refer to the
          >> > following codes, thanks.
          >
          >
          > The XSLT and XSLFO processes are separate, and the XSLFO process happens
          > afterwards, so there is no way to get information from the XSLFO process into
          > XSLT.

          In a one-pass process.

          Using two passes you can, of course, do whatever you need, although it
          may not always be straightforward. Both XEP and XSL Formatter provide
          the option of writing out the paginated area tree as an XML document,
          which opens the possibility of doing a two-pass process. You can also do
          tricks with embedding information into the generated PDF on the first
          pass and then using that information as input to a second pass.

          Cheers,

          Eliot
          --
          W. Eliot Kimber
          Professional Services
          Innodata Isogen
          9390 Research Blvd, #410
          Austin, TX 78759
          (512) 372-8122

          eliot@...
          www.innodata-isogen.com
        Your message has been successfully submitted and would be delivered to recipients shortly.