[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|