I am attempting to retrieve information in a tabular format, but I'm running into issues. The data is displaying vertically rather than in the horizontal table format I desire using standard HTML table tags. Is there a way to achieve this? Am I overlooking something in my code? Here is the code I have so far, along with the resulting output:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<html>
<body>
<table>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="*">
<tr>
<span style="background-color: #aaa;">
<xsl:value-of select="name()"/> :
</span>
<span style="background-color: #ccc;">
<xsl:value-of select="."/>
</span>
</tr>
</xsl:template>
<xsl:template match="*[*]">
<tr>
<th style="border:2px solid #c55; font-size:120%;">
<xsl:value-of select="name()"/>
</th>
</tr>
<tr>
<td>
<table>
<xsl:apply-templates/>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>