Forráskód Böngészése

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

	* XmlAttributeCollection.cs : set owner element as parent on removal
	  events (though they are not "parent" in infoset or dom context)
	* XmlElement.cs : Don't remove attributes twice (raises extraneous
	  removal events).
	* XmlNamespaceManager.cs, XmlNodeChangedEventArgs :
	  Added NET_1_2 members.

svn path=/trunk/mcs/; revision=22933
Atsushi Eno 22 éve
szülő
commit
0e242ba0a0

+ 9 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,12 @@
+2004-02-10  Atsushi Enomoto <[email protected]>
+
+	* XmlAttributeCollection.cs : set owner element as parent on removal
+	  events (though they are not "parent" in infoset or dom context)
+	* XmlElement.cs : Don't remove attributes twice (raises extraneous
+	  removal events).
+	* XmlNamespaceManager.cs, XmlNodeChangedEventArgs :
+	  Added NET_1_2 members.
+
 2004-02-08  Atsushi Enomoto <[email protected]>
 
 	* DTDObjectModel.cs : Limit external entity reference from DTD by 256.

+ 2 - 2
mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs

@@ -144,10 +144,10 @@ namespace System.Xml
 			}
 
 			if(retAttr != null) {
-				ownerDocument.onNodeRemoving (node, null);
+				ownerDocument.onNodeRemoving (node, ownerElement);
 				base.RemoveNamedItem (retAttr.LocalName, retAttr.NamespaceURI);
 				RemoveIdenticalAttribute (retAttr);
-				ownerDocument.onNodeRemoved (node, null);
+				ownerDocument.onNodeRemoved (node, ownerElement);
 			}
 			// If it is default, then directly create new attribute.
 			DTDAttListDeclaration attList = ownerDocument.DocumentType != null ? ownerDocument.DocumentType.DTD.AttListDecls [ownerElement.Name] : null;

+ 1 - 4
mcs/class/System.XML/System.Xml/XmlElement.cs

@@ -271,11 +271,8 @@ namespace System.Xml
 
 		public override void RemoveAll ()
 		{
-			// Remove the child nodes.
+			// Remove all attributes and child nodes.
 			base.RemoveAll ();
-
-			// Remove all attributes.
-			attributes.RemoveAll ();
 		}
 
 		public virtual void RemoveAllAttributes ()

+ 8 - 0
mcs/class/System.XML/System.Xml/XmlNamespaceManager.cs

@@ -10,6 +10,7 @@
 //
 
 using System.Collections;
+using System.Collections.Specialized;
 
 namespace System.Xml
 {
@@ -179,6 +180,13 @@ namespace System.Xml
 			
 			return ht.Keys.GetEnumerator ();
 		}
+#if NET_1_2
+		[MonoTODO]
+		public virtual StringDictionary GetNamespacesInScope (XmlNamespaceScope scope)
+		{
+			throw new NotImplementedException ();
+		}
+#endif
 
 		public virtual bool HasNamespace (string prefix)
 		{

+ 20 - 0
mcs/class/System.XML/System.Xml/XmlNodeChangedEventArgs.cs

@@ -47,8 +47,28 @@ namespace System.Xml
 				return _newParent;
 			}
 		} 
+
+
+#if NET_1_2
+		public string OldValue
+		{
+			get
+			{
+				throw new NotImplementedException ();
+			}
+		}
 		
 
+		public string NewValue
+		{
+			get
+			{
+				throw new NotImplementedException ();
+			}
+		}
+#endif
+
+
 		// Public Methods
 		// Internal Methods
 		internal XmlNodeChangedEventArgs(