[Mono-bugs] [Bug 39079][Wis] New - SelectSingleNode
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Tue, 4 Mar 2003 21:24:23 -0500 (EST)
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=39079
--- shadow/39079 Tue Mar 4 21:24:23 2003
+++ shadow/39079.tmp.18856 Tue Mar 4 21:24:23 2003
@@ -0,0 +1,57 @@
+Bug#: 39079
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ginga@kit.hi-ho.ne.jp
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: SelectSingleNode
+
+Description of Problem:
+
+Even though we specify xpath reverse order axis expression (e.g.
+"ancestor::foo") MS.NET always returns SelectSingleNode() result
+in document order, non-conformant to W3C XPath recommendation.
+Current Mono returns more wise result, conformant to W3C XPath
+recommendation, but inconsistent with MS.NET as a result.
+
+Steps to reproduce the problem:
+
+use XmlDocument.SelectSingleNode(expression) and specify
+expression with reverse document order axis.
+
+Sample:
+
+ XmlDocument doc = new XmlDocument ();
+ doc.LoadXml ("<foo a='1'><foo a='2'><foo a='3'><bar
+/></foo></foo></foo>");
+ XmlElement bar = doc.SelectSingleNode ("//bar") as XmlElement;
+ XmlElement foo = bar.SelectSingleNode ("ancestor::foo") as
+XmlElement;
+ Console.WriteLine (foo.GetAttribute ("a"));
+
+Actual Results:
+ Console output: 3
+
+Expected Results:
+ Console output: 1
+
+How often does this happen?
+ Always (specified reverse order axes)
+
+Additional Information:
+
+See "document reverse order" here:
+ http://www.w3.org/TR/xpath
+
+You may also be intersted in what they say about it:
+ http://msdn.microsoft.com/msdnmag/issues/03/02/XMLFiles/