Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mismatched end tag?

Status
Not open for further replies.

phobe62

Programmer
Jan 30, 2004
22
US
Hi all. I have an XSL file that contains the following:

<xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.0&quot; xmlns=&quot;<xsl:eek:utput method=&quot;xml&quot; indent=&quot;yes&quot; doctype-system=&quot; doctype-public=&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; />

<xsl:template match=&quot;/&quot; />
<html lang=&quot;en&quot; xml:lang=&quot;en&quot; />
<head>
<link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;></link>
<title>Boats</title>
</head>
<body />
<table width=&quot;100%&quot; height=&quot;98%&quot; />
<tr />
<td />
<table style=&quot;border: 1px solid #000000&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; />
<tr />
<td colspan=&quot;2&quot;><img src=&quot;images/logo.gif&quot; alt=&quot;v-drive boats&quot;></img></td>
</tr>
<tr />
<td />
<xsl:for-each select=&quot;boat&quot; />
<table border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; />
<tr />
<td /><xsl:apply-templates select=&quot;image&quot; /></td>
</tr>
</table>
</td>
<td valign=&quot;top&quot;>
<table border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; />
<tr />
<td class=&quot;title&quot; colspan=&quot;2&quot;><xsl:value-of xmlns=&quot;&quot; select=&quot;year&quot; /> <xsl:value-of xlmns=&quot;&quot; select=&quot;make&quot; /> <xsl:value-of xlmns=&quot;&quot; select=&quot;type&quot; /></td>
</tr>
<tr />
<td class=&quot;fieldlabel&quot;>Owner:</td>
<td class=&quot;fieldvalue&quot;><xsl:value-of xmlns=&quot;&quot; select=&quot;owner&quot; /></td>
</tr>
<tr />
<td class=&quot;fieldlabel&quot;>Length:</td>
<td class=&quot;fieldvalue&quot;><xsl:value-of xmlns=&quot;&quot; select=&quot;length&quot; /></td>
</tr>
<tr />
<td class=&quot;fieldlabel&quot;>Engine:</td>
<td class=&quot;fieldvalue&quot;><xsl:value-of xlmns=&quot;&quot; select=&quot;engine&quot; /></td>
</tr>
<tr />
<td class=&quot;fieldlabel&quot;>Top Speed:</td>
<td class=&quot;fieldvalue&quot;><xsl:value-of xlmns=&quot;&quot; select=&quot;top-speed&quot; /></td>
</tr>
</table><br />
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

</xsl:template>
<xsl:template match=&quot;image&quot;>
<img src=&quot;images/boats/{photo}&quot; width=&quot;300&quot; />
</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!
 
You have the following for table rows: <tr /> which is incorrect. You need an opening <tr> and a closing </tr>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top