When viewed in HTML, this shows three different tables. I'm trying to get these all into one table. Can someone explain to me, in layman's terms, what makes this Stylesheet create a new table every time?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL]
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html><head><title>Dinosaurs!</title></head>
<body><h1>Dinosaurs Redone!</h1>
<xsl:apply-templates select="DinoList/Dinosaur"/>
</body></html>
</xsl:template>
<xsl:template match="Dinosaur">
<table border="1" width="400" cellpadding="5">
<tr>
<th> <td><xsl:value-of select="Name"/> </td> </th>
</tr>
<tr>
<th>Period</th>
<td>
<xsl:value-of select="@period"/>
</td>
</tr>
<tr>
<th>Group</th>
<td>
<xsl:value-of select="Group"/>
</td>
</tr>
<xsl:apply-templates select="Range"/>
<xsl:apply-templates select="PhysicalAttr"/>
</table>
</xsl:template>
<xsl:template match="Range">
<tr>
<th>Range</th>
<td>
<ul>
<xsl:for-each select="Region">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</td>
</tr>
</xsl:template>
<xsl:template match="PhysicalAttr">
<xsl:if test="Height">
<tr>
<th>Height</th>
<td>
<xsl:value-of select="Height"/>
<xsl:text disable-output-escaping="yes">
&nbsp;
</xsl:text>
<xsl:value-of select="Height/@unit"/>
</td>
</tr>
</xsl:if>
<xsl:if test="Length">
<tr>
<th>Length</th>
<td>
<xsl:value-of select="Length"/>
<xsl:text disable-output-escaping="yes">
&nbsp;
</xsl:text>
<xsl:value-of select="Length/@unit"/>
</td>
</tr>
</xsl:if>
<xsl:if test="Weight">
<tr>
<th>Weight</th>
<td>
<xsl:value-of select="Weight"/>
<xsl:text disable-output-escaping="yes">
&nbsp;
</xsl:text>
<xsl:value-of select="Weight/@unit"/>
</td>
</tr>
</xsl:if>
</xsl:template>
</xsl:stylesheet>