Subject: displaying results in 2 columns From: Stan Ozier <stan@xxxxxxxxxxxxxxxx> Date: Fri, 07 Jul 2000 14:51:37 +0200 |
ok folks, got a situation here... What I want to do is displaying my results in a table which has two columns that means, in html: <table> <tr> <td>result 1</td> <td>result 2</td> </tr> <tr> <td>result 3</td> <td>result 4</td> </tr> ... </table> my XML file looks like this: <thinglist> <thing value="result 1"/> <thing value="result 2"/> <thing value="result 3"/> <thing value="result 4"/> ... </thinglist> my XSL file should be something like this: <table> <tr> <xsl:for-each select="thinglist/thing"> <td><xsl:value-of select="@value"/></td> <xsl:if test="position() mod 2 = 1"> </tr><tr> </xsl> </xsl:for-each> </tr> </table> but of course this is impossible because of the </tr><tr> couple of tags in the xsl:if statement. I couldn't find a solution for this. Anybody got an idea ? PS: please don't answer that I have to change my XML file like so: <thinglist> <thingline> <thing value="result1"/> <thing value="result2"/> </thingline> <thingline> ... </thinglist> cause I don't think it's the purpose of XML to solve this kind of problems. Thank's in advance. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Removing duplicates not precedi, Kay Michael | Thread | RE: displaying results in 2 columns, Kay Michael |
Removing duplicates not preceding v, Ronald | Date | RE: Indexing Tree Elements, Kay Michael |
Month |