[Mono-bugs] [Bug 46797][Wis] Changed - XPath union expression does not return results in document order

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 13 Oct 2003 03:37:11 -0400 (EDT)


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 ginga@kit.hi-ho.ne.jp.

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

--- shadow/46797	2003-07-23 11:37:58.000000000 -0400
+++ shadow/46797.tmp.519	2003-10-13 03:37:11.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 46797
 Product: Mono/Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: System.XML
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -41,6 +41,27 @@
     <xsl:apply-templates
 select="@*|comment()|processing-instruction()|text()|*"/>
   </xsl:copy>
 </xsl:template>
 
 fail in managed xslt.
+
+------- Additional Comments From ginga@kit.hi-ho.ne.jp  2003-10-13 03:37 -------
+I fixed this problem, but in the next stage I encountered another bug 
+(maybe) in SlashIterator.
+
+XmlDocument doc = new XmlDocument ();
+doc.LoadXml 
+("<root><foo/><bar/><bar/><foo/><baz/><bar/><foo/></root>");
+XPathNavigator nav = doc.CreateNavigator ();
+
+//(1) runs well with my fix
+//XPathNodeIterator iter = nav.Select ("/root/bar|/root/foo");
+//(2) incorrectly outputs extraneous bar * 3
+XPathNodeIterator iter = nav.Select ("//bar|/root/foo");
+//(3) results in infinite loop(!)
+//XPathNodeIterator iter = nav.Select ("//bar|//foo");
+
+while (iter.MoveNext ())
+	Console.WriteLine ("Name: " + iter.Current.Name);
+
+It would be better we apply the patch after fixing this problem.