This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSL Table Styling
- To: <XSL-List at mulberrytech dot com>
- Subject: XSL Table Styling
- From: "Scott Johnson" <scjohnson at arrow dot com>
- Date: Mon, 17 Jul 2000 11:10:04 -0400
- Reply-To: xsl-list at mulberrytech dot com
Hello,
I'm having problems with displaying items from a XSL style-sheet. What I'm
trying to do is lay out two rows of data
with 4 items per row, extracting my data from an Oracle database. Currently,
my code looks like this:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:template match="hit">
<tr>
<td width="450"><img width="175" height="175"><xsl:attribute name="SRC">
<xsl:value-of select="small-image"/></xsl:attribute></img></td>
</tr>
<tr>
<td width="175"><font face="Verdana" size="2"><b><xsl:value-of
select="name"/></b></font></td>
</tr>
<tr>
<td width="175"><font face="Verdana" size="1"><xsl:value-of
select="short-desc"/></font></td>
</tr>
</xsl:template>
</xsl:stylesheet>
Which outputs this:
image
name
short-desc
image
name
short-desc
(and repeats this 6 more times aligned on the left side, I have a JSP page
set to 8 hits per page)
What I want to happen is this:
image image image image
name name name name
short-desc short-desc short-desc short-desc
image image image image
name name name name
short-desc short-desc short-desc short-desc
All of the data needs to show different items when it is pulled from the
database. I'm able to make four items per row,
but with 8 rows ( I only want 2 rows) and each row has repeating data all
the way across, with the new item being
displayed on the next row until all 8 of my hits per page are displayed.
If anyone can help me, I would greatly appreciate it. Is this a simple
XSL-structure type fix
or something more involved using JAVA programming?
Thanks,
Scott
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list