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

FO/XSL:Setting up columns in a for-each loop

Subject: FO/XSL:Setting up columns in a for-each loop
From: Rachael Blank <blankrr@xxxxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 15:53:05 -0400
xsl columns
Hello!

I want to set up four columns in a table and display (in order) the data
pulled from the tags within the cells.

For example,  if I have 13 items, it would look like the following:

item 1   item2     item3    item4
item5    item6     item7    item8
item9    item10   item11  item12
item13

Right now, I am attempting to pull them in the for-each loop, but it
isn't working so well.  I think there might be a much better way of
achieving the result I need.

Thank you in advance for any and all assistance.

Rachael

P.S. Here's my very ineloquent way of doing this so far:

<fo:table
         font="arial"
   font-weight="normal"
         font-size="12pt">
     <fo:table-column column-width="1.5in"/>
  <fo:table-column column-width="1.5in"/>
  <fo:table-column column-width="1.5in"/>
  <fo:table-column column-width="1.5in"/>
     <fo:table-body>
     <fo:table-row>
     <xsl:for-each select="report/section">
        <xsl:variable name="datatypeidValue" select="datatypeid" />
        <xsl:variable name="commentValue" select="comment" />
              <fo:table-cell>
              <fo:block>
        <xsl:choose>
              <xsl:when test="$datatypeidValue='648'">
                    <xsl:value-of select="comment"/>
              </xsl:when>
        </xsl:choose>
        </fo:block>
     </fo:table-cell>

     <fo:table-cell>
           <fo:block>
     <xsl:choose>
              <xsl:when test="$datatypeidValue='649'">
                    <xsl:value-of select="comment"/>
           </xsl:when>
        </xsl:choose>
     </fo:block>
     </fo:table-cell>

     <fo:table-cell>
           <fo:block>
     <xsl:choose>
           <xsl:when test="$datatypeidValue='650'">
                 <xsl:value-of select="comment"/>
     </xsl:when>
     </xsl:choose>
     </fo:block>
     </fo:table-cell>

     <fo:table-cell>
           <fo:block>
     <xsl:choose>
           <xsl:when test="$datatypeidValue='651'">
                 <xsl:value-of select="comment"/>
     </xsl:when>
     </xsl:choose>
     </fo:block>
     </fo:table-cell>
  </xsl:for-each>

       </fo:table-row>
  </fo:table-body>
     </fo:table>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.