У меня есть эти два файла:XSL сортировать и каждый
XML
<?xml version="1.0" encoding="UTF-8"?>
<Store>
<Plant id="10">
<Common>Pianta carnivora</Common>
<Botanical>Dionaea muscipula</Botanical>
<Quantity>10</Quantity>
</Plant>
<Flower id="3">
<Common>Fiore di prova</Common>
<Quantity>999</Quantity>
</Flower>
<Plant id="20">
<Common>Canapa</Common>
<Botanical>Cannabis</Botanical>
<Quantity>2</Quantity>
</Plant>
<Plant id="30">
<Common>Loto</Common>
<Botanical>Nelumbo Adans</Botanical>
<Quantity>3</Quantity>
</Plant>
</Store>
XSL
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="Store">
<body>
<xsl:for-each select="Plant">
<p>
<xsl:sort select="Quantity"/>
<xsl:value-of select="Quantity"/>
</p>
</xsl:for-each>
</body>
</xsl:template>
</xsl:stylesheet>
XSL не сортирует. У меня нет выхода. Я действительно не знаю, как это не работает. Код кажется правильным. Если вы снимете тег сортировки, вы увидите результат. В пределах сортировки вы ничего не увидите.
Отлично! Спасибо, мужик! – Vito