Guest milan Posted December 4, 2005 Share Posted December 4, 2005 Hi,I am creating a table to display some info, a fixed number of elements per row. So, basically, I want to show some data where I have 3 elements in each row of the table. So, instead of repeating the XSL code 3 times, I was wondering if there was some way to loop the given number of times.I tried the following:<table><xsl:for-each select="b"> <!-- b contains info for display --> <xsl:if test="(position() mod 3)=0"> <tr> </xsl:if> <td>some info</td> <td>some more info</td> <xsl:if test="(position() mod 3)=2"> </tr> </xsl:if></xsl:for-each></table>However, for the code above, I get mismatched tag error in line 5.Anyone has some idea?Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now