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:
authorAtsushi Eno <atsushieno@gmail.com>2007-01-05 19:20:04 +0300
committerAtsushi Eno <atsushieno@gmail.com>2007-01-05 19:20:04 +0300
commit8da0d1e779d576985a8b77f184b9b62814b72f21 (patch)
tree30b87e72ba80a64d1c07d24850c72d7ef4bae0ce /mcs/class/System.XML/System.Xml.XPath
parentaff845a63e9a253ef1273a93caa57de94a0e1ec3 (diff)
2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
* Expression.cs : text() should match whitespace and significant whitespace nodes. * XPathNavigatorTests.cs : added test for text() and whitespace/ significantwhitespace node. svn path=/trunk/mcs/; revision=70536
Diffstat (limited to 'mcs/class/System.XML/System.Xml.XPath')
-rw-r--r--mcs/class/System.XML/System.Xml.XPath/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml.XPath/Expression.cs9
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/class/System.XML/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/System.Xml.XPath/ChangeLog
index 52cf2749030..8b2a57f450f 100644
--- a/mcs/class/System.XML/System.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.XPath/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Expression.cs : text() should match whitespace and significant
+ whitespace nodes.
+
2006-11-10 Atsushi Enomoto <atsushi@ximian.com>
* XPathNavigator.cs :
diff --git a/mcs/class/System.XML/System.Xml.XPath/Expression.cs b/mcs/class/System.XML/System.Xml.XPath/Expression.cs
index fc81742b5b7..a5d8357a5af 100644
--- a/mcs/class/System.XML/System.Xml.XPath/Expression.cs
+++ b/mcs/class/System.XML/System.Xml.XPath/Expression.cs
@@ -1560,9 +1560,14 @@ namespace System.Xml.XPath
return true;
case XPathNodeType.Text:
- if (nodeType == XPathNodeType.SignificantWhitespace)
+ switch (nodeType) {
+ case XPathNodeType.Text:
+ case XPathNodeType.Whitespace:
+ case XPathNodeType.SignificantWhitespace:
return true;
- goto default;
+ default:
+ return false;
+ }
default:
return type == nodeType;
}