Просмотр исходного кода

2004-10-05 Atsushi Enomoto <[email protected]>

	* XPathDocument2Editable.cs : for WriteAttributes(), use
	  CreateAttributesWriter() that creates attribute tree XmlWriter.
	* XPathNavigatorReader.cs : the reader was missing attributes when
	  it is created with an element node that has attriibutes.

svn path=/trunk/mcs/; revision=34717
Atsushi Eno 21 лет назад
Родитель
Сommit
85afdc362c

+ 7 - 0
mcs/class/System.XML/Mono.Xml.XPath/ChangeLog

@@ -1,3 +1,10 @@
+2004-10-05  Atsushi Enomoto <[email protected]>
+
+	* XPathDocument2Editable.cs : for WriteAttributes(), use
+	  CreateAttributesWriter() that creates attribute tree XmlWriter.
+	* XPathNavigatorReader.cs : the reader was missing attributes when
+	  it is created with an element node that has attriibutes.
+
 2004-10-04  Atsushi Enomoto <[email protected]>
 
 	* XPathNavigatorReader.cs : It can reject attribute and namespace

+ 2 - 3
mcs/class/System.XML/Mono.Xml.XPath/XPathDocument2Editable.cs

@@ -812,7 +812,7 @@ namespace Mono.Xml.XPath
 		public override XmlWriter CreateAttributes ()
 		{
 			XomNode n = ((IHasXomNode) navigator).GetNode ();
-			return document.CreateInsertionWriter (n, null);
+			return document.CreateAttributesWriter (n);
 		}
 
 		public override bool DeleteCurrent ()
@@ -830,8 +830,7 @@ namespace Mono.Xml.XPath
 			while (n.FirstChild != null)
 				document.DeleteNode (n.FirstChild);
 			XmlWriter w = document.CreateInsertionWriter (n, null);
-			// FIXME: Hmm, it does not look like using it.
-			w.WriteFromObject (value);
+			w.WriteValue (value);
 			w.Close ();
 		}
 	}

+ 1 - 0
mcs/class/System.XML/Mono.Xml.XPath/XPathNavigatorReader.cs

@@ -445,6 +445,7 @@ namespace Mono.Xml.XPath
 				case XPathNodeType.Element:
 					if (current.IsEmptyElement)
 						nextIsEOF = true;
+					attributeCount = GetAttributeCount ();
 					return true;
 				case XPathNodeType.Namespace:
 				case XPathNodeType.Attribute: