This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Two column HTML output
- To: xsl-list at mulberrytech dot com
- Subject: Two column HTML output
- From: "David Whipple" <dwhipple at dtcc dot com>
- Date: Thu, 11 May 2000 09:35:28 -0400
- Reply-To: xsl-list at mulberrytech dot com
I have a problem I am not able to figure out.
I have a simple xml file:
<result>
<row>
<item>aaaa</item>
<item>bbbb</item>
<item>cccc</item>
<item>dddd</item>
<item>eeee</item>
...
</row>
</result>
with an arbitrary number of item's.
I want to product HTML output like:
<table>
<tr>
<td>
aaaa
</td>
<td>
bbbb
</td>
</tr>
<tr>
<td>
cccc
</td>
<td>
dddd
</td>
<tr>
...
</table>
(put two <item>s in each <tr> </tr> block). It is easy enough to put
out each item surrounded by <tr> </tr>. Because of the necessity to
output proper XML, I am not able to read in the <item>s and if it is in
an odd position emit the <tr> and if it is even position emit the </tr>.
Maybe there is some concept I am not aware of/understand that
I am missing here.
Can anyone help me with an approach to dealing with this kind of
problem?
Thanks,
Dave
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list