|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: sort + current() - bug in Microsoft MSXML 4?
Hi Adam, I can confirm for you that that is a bug in MSXML 4.0 (and it has been reported and acknowledged). The workaround would be to use a key. Cheers Marrow, Microsoft XML MVP http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger) http://www.topxml.com/Xselerator -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of WATKIN-JONES,ADAM (HP-UnitedKingdom,ex1) Sent: 23 October 2002 15:46 To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: sort + current() - bug in Microsoft MSXML 4? Hi all! I have been struggling to use sort with current() under MSXML 4 (Product Version: 4.10.9404.0). Xalan 2.3.1, Saxon 6.5.2, jd.xslt 1.2.9, MSXML 3 (Product Version: 8.30.9926.0) all produce the result I expect. I've included the details below. Could somebody confirm the correct behaviour? Many thanks, Adam ****** XML: <list> <item> <name>name2</name> <order>2</order> </item> <item> <name>name3</name> <order>3</order> </item> <item> <name>name1</name> <order>1</order> </item> </list> ****** XSL: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <list> <xsl:for-each select="list/item/name"> <xsl:sort select="/list/item[name=current()]/order" order="descending" data-type="number"/> <name> <xsl:value-of select="."/> </name> </xsl:for-each> </list> </xsl:template> </xsl:stylesheet> ****** Expected output: <list> <name>name3</name> <name>name2</name> <name>name1</name> </list> ****** MSXML 4 output: <list> <name>name2</name> <name>name3</name> <name>name1</name> </list> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








