[Mono-bugs] [Bug 77781][Nor] Changed - Xpath sort problem

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Mar 14 16:10:42 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77781

--- shadow/77781	2006-03-14 05:18:38.000000000 -0500
+++ shadow/77781.tmp.27973	2006-03-14 16:10:42.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 77781
 Product: Mono: Class Libraries
 Version: 1.1
 OS: Debian Woody
 OS Details: Debian Woody
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Sys.XML
 AssignedTo: atsushi at ximian.com                            
 ReportedBy: hugobendelin at hotmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Possible Xpath sort problem
+Summary: Xpath sort problem
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 
 I Have been trying to write a xsl file to sort and style a xml-document on
@@ -216,6 +216,33 @@
 select="count(/matches/match/score[@goal=$player])" />
 <xsl:variable name="assist"
 select="count(/matches/match/score[@ass=$player])" />
 <xsl:value-of select="$goals + $ass" />
 <xsl:value-of select="$goals" />
 <xsl:value-of select="$ass" />
+
+------- Additional Comments From atsushi at ximian.com  2006-03-14 16:10 -------
+Ok, after changing the stylesheet like this, I could reproduce the
+problem.
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version="1.0">
+ <xsl:template match="/">
+  <xsl:for-each select="matches/players/player">
+   <xsl:sort select="count(/matches/match/score[@goal=current()/@nr]) +
+count(/matches/match/score[@ass=current()/@nr])" data-type="number"
+order="descending" />
+   <xsl:sort select="count(/matches/match/score[@goal=current()/@nr])"
+data-type="number" order="descending" />
+   <xsl:sort select="count(/matches/match/score[@ass=current()/@nr])"
+data-type="number" order="descending" />
+<xsl:variable name="player" select="@nr" />
+<xsl:variable name="goals"
+select="count(/matches/match/score[@goal=$player])" />
+<xsl:variable name="ass"
+select="count(/matches/match/score[@ass=$player])" />
+<xsl:value-of select="$goals + $ass" /> (<xsl:value-of select="$goals"
+/>, <xsl:value-of select="$ass" />).
+  </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
+


More information about the mono-bugs mailing list