This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
FO/XSL:Setting up columns in a for-each loop
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] FO/XSL:Setting up columns in a for-each loop
- From: Rachael Blank <blankrr at mars-systems dot com>
- Date: Wed, 24 Oct 2001 15:53:05 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
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