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

Re: mismatched tags with xsl:if

Subject: Re: mismatched tags with xsl:if
From: "Jonathan Cates" <catesj@xxxxxxxx>
Date: Tue, 13 Mar 2001 05:43:36 -0500
jonathan cates
Yes, the answer to that question is in the FAQ.  In particular, look at the
tables example, and the sub topic
10. Multiple Rows in a Table

This, I believe is what you're looking for.



Jon



----- Original Message -----
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, March 13, 2001 5:23 AM
Subject: RE:  mismatched tags with xsl:if


> > I'll explain a bit further what I'm trying to do.
>
> That's always a good idea! Coding problems usually boil down to people
> tackling the problem the wrong way. (And often turn out to be a FAQ!)
>
>  I actually
> > want to render a 3 collumns XHTML table with a list of items.
> > I want them to appear as follow :
> >
> > item1  item2  item3
> > item4  item5  item6
> > item7  ...
> >
> > To do so, I have a for-each loop over the items that
> > output the <td>item</td>.  Now I have to set some
> > condition to generate the <tr> and </tr> every three
> > items.
>
> The solution to this kind of grouping problem is along the lines of
>
> <xsl:for-each select="item[position() mod 3 = 1]">
>    <tr>
>      <td><xsl:value-of select="."/></td>
>      <td><xsl:value-of select="following-sibling::item[1]"/></td>
>      <td><xsl:value-of select="following-sibling::item[2]"/></td>
>    </tr>
> </xsl:for-each>
>
> Mike Kay
> Software AG
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.