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

Re: [XSL-FO] 3 elements on the same line

Expand Messages
  • Chris Bowditch
    ... ... In order to get the QuestionNo, QuestionText and QuestionScore onto the same line you must put them in the same table row. Your example above
    Message 1 of 2 , Sep 12, 2005
    • 0 Attachment
      bharathi kongara wrote:
      > Hi
      >
      > I've the following table - I want to put the
      > QuestionNo, QuestionText, and QuestionScore on the
      > same line in the resulting output.
      >

      <snip/>

      >
      > I tried with columns, didn't work(I'm using FOP to
      > render the o/p). Any ideas???

      In order to get the QuestionNo, QuestionText and QuestionScore onto the
      same line you must put them in the same table row. Your example above
      shows each item in its own row. So you must declare 3 columns in your table:

      <fo:table>
      <fo:table-column column-width="proportional-column-width(1)"/>
      <fo:table-column column-width="proportional-column-width(1)"/>
      <fo:table-column column-width="proportional-column-width(1)"/>
      <fo:table-body>
      <fo:table-row>
      <fo:table-cell>
      <xsl:apply-templates select="QuestionNo"/>
      </fo:table-cell>
      <fo:table-cell>
      <xsl:apply-templates select="QuestionText"/>
      </fo:table-cell>
      <fo:table-cell>
      <xsl:apply-templates select="QuestionScore"/>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>

      You say you have tried columns? If you have tried this already then the
      problem is likely to lie with your XSL not working for your input XML.
      However, I cannot comment on this as you haven't shown your input XML.
      Try running the xalan.bat file that comes with FOP to generate the
      intermediate FO. This will help you identify whether your problem is
      with your XML and XSL or the XSL-FO.

      Chris
    Your message has been successfully submitted and would be delivered to recipients shortly.