Hi all. I have an XSL file that contains the following:
<xsl:stylesheet xmlns:xsl=" version="1.0" xmlns="<xslutput method="xml" indent="yes" doctype-system=" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
<xsl:template match="/" />
<html lang="en" xml:lang="en" />
<head>
<link rel="stylesheet" href="style.css"></link>
<title>Boats</title>
</head>
<body />
<table width="100%" height="98%" />
<tr />
<td />
<table style="border: 1px solid #000000" cellpadding="0" cellspacing="0" />
<tr />
<td colspan="2"><img src="images/logo.gif" alt="v-drive boats"></img></td>
</tr>
<tr />
<td />
<xsl:for-each select="boat" />
<table border="0" cellpadding="4" cellspacing="0" />
<tr />
<td /><xsl:apply-templates select="image" /></td>
</tr>
</table>
</td>
<td valign="top">
<table border="0" cellpadding="4" cellspacing="0" />
<tr />
<td class="title" colspan="2"><xsl:value-of xmlns="" select="year" /> <xsl:value-of xlmns="" select="make" /> <xsl:value-of xlmns="" select="type" /></td>
</tr>
<tr />
<td class="fieldlabel">Owner:</td>
<td class="fieldvalue"><xsl:value-of xmlns="" select="owner" /></td>
</tr>
<tr />
<td class="fieldlabel">Length:</td>
<td class="fieldvalue"><xsl:value-of xmlns="" select="length" /></td>
</tr>
<tr />
<td class="fieldlabel">Engine:</td>
<td class="fieldvalue"><xsl:value-of xlmns="" select="engine" /></td>
</tr>
<tr />
<td class="fieldlabel">Top Speed:</td>
<td class="fieldvalue"><xsl:value-of xlmns="" select="top-speed" /></td>
</tr>
</table><br />
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="image">
<img src="images/boats/{photo}" width="300" />
</xsl:template>
</xsl:stylesheet>
-------------------------------
It produces this error:
End tag 'tr' does not match the start tag 'xsl:stylesheet'. Error processing resource 'file:///C:/TMP/XMLSHIZ/boats.xsl'. Line 20, Position 9
-------------------------------
So, my questions:
-Why does it think there's a mismatch?
-How do I go about fixing this without creating more than one top-level element?
Thanks for any assistance you can provide!
<xsl:stylesheet xmlns:xsl=" version="1.0" xmlns="<xslutput method="xml" indent="yes" doctype-system=" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
<xsl:template match="/" />
<html lang="en" xml:lang="en" />
<head>
<link rel="stylesheet" href="style.css"></link>
<title>Boats</title>
</head>
<body />
<table width="100%" height="98%" />
<tr />
<td />
<table style="border: 1px solid #000000" cellpadding="0" cellspacing="0" />
<tr />
<td colspan="2"><img src="images/logo.gif" alt="v-drive boats"></img></td>
</tr>
<tr />
<td />
<xsl:for-each select="boat" />
<table border="0" cellpadding="4" cellspacing="0" />
<tr />
<td /><xsl:apply-templates select="image" /></td>
</tr>
</table>
</td>
<td valign="top">
<table border="0" cellpadding="4" cellspacing="0" />
<tr />
<td class="title" colspan="2"><xsl:value-of xmlns="" select="year" /> <xsl:value-of xlmns="" select="make" /> <xsl:value-of xlmns="" select="type" /></td>
</tr>
<tr />
<td class="fieldlabel">Owner:</td>
<td class="fieldvalue"><xsl:value-of xmlns="" select="owner" /></td>
</tr>
<tr />
<td class="fieldlabel">Length:</td>
<td class="fieldvalue"><xsl:value-of xmlns="" select="length" /></td>
</tr>
<tr />
<td class="fieldlabel">Engine:</td>
<td class="fieldvalue"><xsl:value-of xlmns="" select="engine" /></td>
</tr>
<tr />
<td class="fieldlabel">Top Speed:</td>
<td class="fieldvalue"><xsl:value-of xlmns="" select="top-speed" /></td>
</tr>
</table><br />
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="image">
<img src="images/boats/{photo}" width="300" />
</xsl:template>
</xsl:stylesheet>
-------------------------------
It produces this error:
End tag 'tr' does not match the start tag 'xsl:stylesheet'. Error processing resource 'file:///C:/TMP/XMLSHIZ/boats.xsl'. Line 20, Position 9
-------------------------------
So, my questions:
-Why does it think there's a mismatch?
-How do I go about fixing this without creating more than one top-level element?
Thanks for any assistance you can provide!