Element xsl:sort not allowed here.

wxdqz

New Member
I tried to put and xsl:sort command in my xsl file. Does anyone understand why it says this?

<xsl:sort select="/owner">
<html>
<body>
<table border="1" cellpadding="2">
<tr>
<th>Owner:</th>
<th>Model:</th>
<th>Color:</th>
</tr>
<xsl:for-each select="catalog/car">
<tr>
<td><xsl:value-of select="owner" /></td>
<td><xsl:value-of select="model" /></td>
<td><xsl:value-of select="color" /></td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/truck">
<tr>
<td><xsl:value-of select="owner" /></td>
<td><xsl:value-of select="model" /></td>
<td><xsl:value-of select="color" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:sort>

I have all the correct headers, but whenever I add xsl:sort it messes up.
 
Back
Top