cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Schmidt <hschm...@chronolabs.de>
Subject conditional </tr><tr> generation ???
Date Mon, 19 Jun 2000 12:20:19 GMT
Hi,
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

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

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

<table>
   <xsl:text>[</xsl:text>
     <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>
     </xsl:if>
    <xsl:text>]</xsl:text>
</table>


H.

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


Mime
View raw message