Im trying to format my xslt form to a table that I have:
Horsepower-Electric Values
Revolutions Number of Disks
blank num 1 num 2 num 3
rev1 hpe1 hpe2 hpe3
rev2 hpe4 hpe5 hpe6
rev3 hpe7 hpe8 hpe9
And so far, Ive gotten the xslt form to come out somewhat similarly to that table, but the way its formatting just cant get fixed. I tried different ways, but I know Im missing something, and I cant figure out what. Heres the code for the xslt form:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<html>
<body>
<table border="2">
<tr>
<th colspan ="4" bgcolor="darkgrey">Horsepower-Electric Values</th>
</tr>
<tr>
<th bgcolor="lightblue">Revolutions</th>
<th colspan="7" bgcolor="tan">Number of Disks</th>
</tr>
<tr><xsl:for-each select="ArrayOfMyHPEData/MyHPEData">
<td>
<xsl:value-of select="n"/>
</td>
</xsl:for-each>
</tr>
<tr>
<xsl:for-each select="ArrayOfMyHPEData/MyHPEData">
<td>
<xsl:value-of select="HPE"/>
</td>
</xsl:for-each>
</tr>
<xsl:for-each select="ArrayOfMyHPEData/MyHPEData">
<tr>
<td>
<xsl:value-of select="Rev"/>
</td>
<!--<td>
<xsl:value-of select="HPE"/>
</td> -->
</tr></xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Does anyone know how I can fix this? Could it be the formatting problem is in my xml? Heres what the table is actually looking like when the xml combines with the xslt form.