cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Schmidt <>
Subject conditional </tr><tr> generation ???
Date Mon, 19 Jun 2000 12:20:19 GMT
I have a xml file with several items called <group>
now i want to build table with 4 <group> items in a row

I open a table and start the first row, then i insert the TD's  within
a <xsl:for-each select="group"> loop
after every 4th TD i want to close the row and then start a new one.

However for some reason the parser has a problem with inserting the </tr> <tr>
every 4th row. but when i use text instead of tags " <tr> -> '[' and <td> 
-> '('  "
everyting looks like it should be.

The parser thinks i don't close the <xsl:if> tag.
Probably im doing something i shouldn't, but what other way could i go?

this is my sample code which is not working

     <xsl:for-each select="group">
     <td> blablabla </td>
     <xsl:if test="not(position() mod 4)">
       </tr> <tr>

and this the one that is working (but not usefull)

     <xsl:for-each select="group">
     <xsl:text>(</xsl:text> blablabla <xsl:text>)</xsl:text>
     <xsl:if test="not(position() mod 4)">
       <xsl:text>] [ </xsl:text>


Holger Schmidt  - email:
phone: ++4989 55869988  -  fax: ++4989 55869966
Chronolabs GmbH - Landwehrstr. 5 - 80336 Munich

View raw message