Subject: [xsl] sort + current() - bug in Microsoft MSXML 4? From: "WATKIN-JONES,ADAM (HP-UnitedKingdom,ex1)" <adam_watkin-jones@xxxxxx> Date: Wed, 23 Oct 2002 15:46:29 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Question about MS setProp, Chuck White | Thread | RE: [xsl] sort + current() - bug in, Marrow |
RE: [xsl] IE 5.5 - special characte, Chuck White | Date | Re: [xsl] Problems incrementing a v, Vasu Chakkera |
Month |