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>2006-04-10 13:37:41 +0400
committerAtsushi Eno <atsushieno@gmail.com>2006-04-10 13:37:41 +0400
commit5bcb1c6d8d8ce9a0356b97ae339c4793597c42c1 (patch)
tree4408527b036a00abee7df4f4c2bed21aee932e41 /mcs/class/System.XML/Mono.Xml.XPath
parent6f5ecec375bfc5367ca8dc95b08bae7ea571055f (diff)
2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
* XPathNavigatorCommonTests.cs : added test for bug #78067. * XPathNavigatorReaderTests.cs : ditto, for ReadSubtree() part. * XPathNavigatorReader.cs : Read() did not compute Depth correctly. It caused bug #78067. * XPathNavigator.cs : get_OuterXml() returns indented output, without XML declaration. * XmlWriter.cs : WriteNode(XPathNavigator) : directly write element and root nodes instead of dispatching to ReadSubtree(). svn path=/trunk/mcs/; revision=59286
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.XPath')
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/ChangeLog5
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs9
2 files changed, 9 insertions, 5 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
index 8f2c5677555..d854bc047ca 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XPathNavigatorReader.cs : Read() did not compute Depth correctly.
+ It caused bug #78067.
+
2006-02-21 Atsushi Enomoto <atsushi@ximian.com>
* DTMXPathNavigator2.cs : removed valueBuilder field (create
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs b/mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs
index 195ed83361f..ad07c82d892 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs
+++ b/mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs
@@ -521,8 +521,6 @@ namespace Mono.Xml.XPath
eof = true;
return false;
}
- if (!current.IsEmptyElement && current.NodeType == XPathNodeType.Element)
- depth++;
break;
case ReadState.EndOfFile:
case ReadState.Closed:
@@ -556,19 +554,20 @@ namespace Mono.Xml.XPath
return false;
}
endElement = (current.NodeType == XPathNodeType.Element);
+ if (endElement)
+ depth--;
}
else
endElement = false;
}
+ else
+ depth++;
if (!endElement && current.NodeType == XPathNodeType.Element)
attributeCount = GetAttributeCount ();
else
attributeCount = 0;
- if (endElement)
- depth--;
-
return true;
}