Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.XPath')
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/ChangeLog7
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs15
2 files changed, 17 insertions, 5 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
index 053dc02ede2..c7d9e126328 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-30 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DTMXPathNavigator.cs :
+ Fixed IsSamePosition(). currentAttr is not always the same as
+ that of other when current is not attribute. Ditto for currentNS
+ (when current is not namespace).
+
2004-06-06 Atsushi Enomoto <atsushi@ximian.com>
* DTMXPathDocumentBuilder.cs : Close XmlTextReader strictly. It might
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
index abd904bc987..6bd8a339a0e 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
+++ b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
@@ -366,11 +366,16 @@ namespace Mono.Xml.XPath
if (another == null || another.document != this.document)
return false;
- return this.currentNode == another.currentNode &&
- this.currentAttr == another.currentAttr &&
- this.currentIsAttr == another.currentIsAttr &&
- this.currentIsNode == another.currentIsNode &&
- this.currentNs == another.currentNs;
+ if (this.currentNode != another.currentNode ||
+ this.currentIsAttr != another.currentIsAttr ||
+ this.currentIsNode != another.currentIsNode)
+ return false;
+
+ if (currentIsAttr)
+ return this.currentAttr == another.currentAttr;
+ else if (!currentIsNode)
+ return this.currentNs == another.currentNs;
+ return true;
}
public override bool MoveTo (XPathNavigator other)