[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Arranging content into columns

Subject: Arranging content into columns
From: bharathi kongara <bharathikongara@xxxxxxxxx>
Date: Fri, 9 Dec 2005 21:33:15 -0800 (PST)
fo table row keep together
Hi guys,

I need to put some content into columns dynamically
with XSL-FO. I've a template called AnswerKeySection
which can have one or more AnswerKeyQuestions. Now I
need them arranged like 3 AnswerKeyQuestions into 1
row. So I want something like

Question1  Question2  Question3
Question4  Question5  Question6
Question7  Question8  Question9

instead of

Question1
Question2
Question3
Question4
Question5
Question6
Question7
Question8
Question9

I'm wondering whether this is possible, I tried to use
column-count property but didn't notice nay
difference.

I'm posting my code from XSL for a better
understanding. Any help would be greatly appreciated.

Thanks,
Bharathi

<xsl:template match="AnswerKeySection">
       <fo:block keep-together="always"
white-space-collapse = "false">
        <xsl:if test="not(position()=last())">
           <xsl:attribute
name="break-after">page</xsl:attribute>
         </xsl:if>
        <xsl:apply-templates select="SectionName"/>
           <xsl:apply-templates
select="SectionHeader"/>
           <xsl:apply-templates
select="AnswerKeyQuestion"/>
       </fo:block>
 </xsl:template>
 
 <xsl:template match="AnswerKeyQuestion">
   <fo:table table-layout="fixed" width="100%"
keep-together="always">
      <fo:table-column
column-width="proportional-column-width(1)"/>
      <fo:table-body space-after.optimum="5pt"
keep-together="always">
           <fo:table-row padding-bottom="0.5em">
                <fo:table-cell>
                  
                    <xsl:apply-templates
select="QuestionInfo"/>
                    
                   </fo:table-cell>
           </fo:table-row>
           <fo:table-row keep-with-previous="always">
                <fo:table-cell>
                  
                    <xsl:apply-templates
select="Notes"/>
                    
                   </fo:table-cell>
           </fo:table-row>
           <fo:table-row keep-with-previous="always">
                <fo:table-cell>
                  
                    <xsl:apply-templates
select="Blank"/>
                    
                   </fo:table-cell>
           </fo:table-row>
           <fo:table-row keep-with-previous="always">
                <fo:table-cell>
                  
                    <xsl:apply-templates
select="Order"/>
                    
                   </fo:table-cell>
           </fo:table-row>
           <fo:table-row keep-with-previous="always">
                <fo:table-cell>
                  
                    <xsl:apply-templates
select="TrueFalse"/>
                    
                   </fo:table-cell>
           </fo:table-row>
      </fo:table-body>
  </fo:table>
 </xsl:template>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.