I have written a block of XSLT and I want to sort my xml file, but that doesn't work.
my XSLT:
.....
<xsl:template match="/">
<html>
<body>
<h1>The second one that i can sort the result</h1>
<table>
<tr bgcolor="blue">
<th>Name</th>
<th>ID</th>
<th>preis</th>
<th>Lieferant</th>
</tr>
<xsl:for-each select="//lieferungen/artikel">
<tr>
<xsl:apply-templates select="name"/>
<td><xsl:value-of select="@id"/></td>
<td><xsl:apply-templates><xsl:sort select="preis" order="ascending"/</xsl:apply-templates></td>
<xsl:apply-templates select="lieferant"/>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="name">
<td><xsl:value-of select="node()"/></td>
</xsl:template>
<xsl:template match="lieferant">
<td><xsl:value-of select="node()"/></td>
</xsl:template>
</xsl:stylesheet>
and the xml is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="C:\Users\Babak\Desktop\XSLT\sort.xslt"?>
<!-- Edited by XMLSpy® -->
<lieferungen
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:myspace:lieferungen ....">
<artikel id="3526">
<name>apfel</name>
<preis stueckpreis="true">15.97</preis>
<lieferant>Fa. Krause</lieferant>
</artikel>
...