|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: <xsl:sort>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<header/>
<paragraph/>
<subheader/>
<paragraph/>
<product>
<partname/>
<category>3</category>
</product>
<product>
<partname/>
<category>1</category>
</product>
<product>
<partname/>
<category>2</category>
</product>
</document>XSL: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="document"> <xsl:for-each select="child::node()"> <!-- whatever processing you want to do --> </xsl:for-each> <xsl:apply-templates select="product"> <xsl:sort select="category" data-type="number" order="descending"/> </xsl:apply-templates> </xsl:template> </xsl:stylesheet> All the XSLT transformers I tried (Saxon6.5.3, Saxon 8.4, Xalan 2.5.1, MSXML .NET, 4.0, 3.0 and XSLTProc) gave me: 3 2 1 Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com aspsa wrote: Thanks for the reply, George.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








