, Muenchian:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:key name="kBookByNums"
match="Book" use="number(current_inventory)"/>
<xsl:template match="/*">
<xsl:for-each select=
"Book
[generate-id()
=
generate-id(key('kBookByNums',
number(current_inventory)
)[1]
)
]
">
<xsl:sort select="current_inventory"
data-type="number" order="descending"/>
<xsl:if test="position()=1">
<xsl:copy-of select=
"key('kBookByNums',
number(current_inventory)
)"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XML-, :
<Book>
<sku>12345</sku>
<title>Beauty Secrets</title>
<condition>New</condition>
<current_inventory>20</current_inventory>
<price>99.99</price>
</Book>
<Book>
<sku>54321</sku>
<title>Picturescapes</title>
<current_inventory>20</current_inventory>
<condition>New</condition>
<price>50.00</price>
</Book>
, xsl-key " " " (.. )", -. .
, , . , ( ) , 10-20 - , .
.