Author: atsushi
Date: 2005-11-07 06:42:17 -0500 (Mon, 07 Nov 2005)
New Revision: 52647
Modified:
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlCDataSection.cs
trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs
trunk/mcs/class/System.XML/System.Xml/XmlElement.cs
trunk/mcs/class/System.XML/System.Xml/XmlNode.cs
trunk/mcs/class/System.XML/System.Xml/XmlSignificantWhitespace.cs
trunk/mcs/class/System.XML/System.Xml/XmlText.cs
trunk/mcs/class/System.XML/System.Xml/XmlWhitespace.cs
Log:
2005-11-07 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlElement.cs, XmlCDataSection.cs, XmlText.cs, XmlWhitespace.cs,
XmlSignificantWhitespace.cs : added ParentNode overrides (actually
they don't make sense since it just calls base.)
* XmlNode.cs, XmlDocument.cs : changed .NET 2.0 CreateNavigator() impl
to match signature and skip OwnerDocument check in XmlNode (since
it is overriden). Maybe MS does not have ownerDocument as a field and
costs too much on OwnerDocument property.
Added missing bits in XmlDocument.
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-11-07 10:37:57 UTC
(rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-11-07 11:42:17 UTC
(rev 52647)
@@ -1,5 +1,16 @@
2005-11-07 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * XmlElement.cs, XmlCDataSection.cs, XmlText.cs, XmlWhitespace.cs,
+ XmlSignificantWhitespace.cs : added ParentNode overrides (actually
+ they don't make sense since it just calls base.)
+ * XmlNode.cs, XmlDocument.cs : changed .NET 2.0 CreateNavigator() impl
+ to match signature and skip OwnerDocument check in XmlNode (since
+ it is overriden). Maybe MS does not have ownerDocument as a field and
+ costs too much on OwnerDocument property.
+ Added missing bits in XmlDocument.
+
+2005-11-07 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XmlAttribute.cs : added new overrides in 2.0 RTM (this scarcely
makes sense without real optimization though).
* XmlDocument.cs, XmlElement.cs, XmlNode.cs : avoid ChildNodes and
Modified: trunk/mcs/class/System.XML/System.Xml/XmlCDataSection.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlCDataSection.cs 2005-11-07
10:37:57 UTC (rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlCDataSection.cs 2005-11-07
11:42:17 UTC (rev 52647)
@@ -54,6 +54,12 @@
get { return XmlNodeType.CDATA; }
}
+#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return base.ParentNode; }
+ }
+#endif
+
#endregion
#region Methods
Modified: trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs 2005-11-07
10:37:57 UTC (rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs 2005-11-07
11:42:17 UTC (rev 52647)
@@ -62,6 +62,7 @@
XmlNameEntryCache nameCache = new XmlNameEntryCache ();
#if NET_2_0
XmlSchemaSet schemas;
+ IXmlSchemaInfo schemaInfo;
#endif
// MS.NET rejects undeclared entities _only_ during Load(),
@@ -237,10 +238,19 @@
}
#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return null; }
+ }
+
public XmlSchemaSet Schemas {
get { return schemas; }
set { schemas = value; }
}
+
+ public override IXmlSchemaInfo SchemaInfo {
+ get { return schemaInfo; }
+ internal set { schemaInfo = value; }
+ }
#endif
#endregion
@@ -372,6 +382,13 @@
return new XmlEntityReference (name, this);
}
+#if NET_2_0
+ public override XPathNavigator CreateNavigator ()
+ {
+ return CreateNavigator (this);
+ }
+#endif
+
protected internal virtual XPathNavigator CreateNavigator
(XmlNode node)
{
#if NET_2_0
@@ -773,6 +790,10 @@
case ReadState.Interactive:
break;
case ReadState.Initial:
+#if NET_2_0
+ if (reader.SchemaInfo != null)
+ this.SchemaInfo = new XmlSchemaInfo
(reader.SchemaInfo);
+#endif
reader.Read ();
break;
default:
Modified: trunk/mcs/class/System.XML/System.Xml/XmlElement.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlElement.cs 2005-11-07 10:37:57 UTC
(rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlElement.cs 2005-11-07 11:42:17 UTC
(rev 52647)
@@ -226,6 +226,10 @@
}
#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return base.ParentNode; }
+ }
+
public override IXmlSchemaInfo SchemaInfo {
get { return schemaInfo; }
internal set { schemaInfo = value; }
Modified: trunk/mcs/class/System.XML/System.Xml/XmlNode.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlNode.cs 2005-11-07 10:37:57 UTC
(rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlNode.cs 2005-11-07 11:42:17 UTC
(rev 52647)
@@ -323,12 +323,21 @@
public abstract XmlNode CloneNode (bool deep);
+#if NET_2_0
+ public virtual XPathNavigator CreateNavigator ()
+ {
+ // XmlDocument has overriden definition, so it is safe
+ // to use OwnerDocument here.
+ return OwnerDocument.CreateNavigator (this);
+ }
+#else
public XPathNavigator CreateNavigator ()
{
XmlDocument document = this.NodeType ==
XmlNodeType.Document ?
this as XmlDocument : this.ownerDocument;
return document.CreateNavigator (this);
}
+#endif
public IEnumerator GetEnumerator ()
{
Modified: trunk/mcs/class/System.XML/System.Xml/XmlSignificantWhitespace.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlSignificantWhitespace.cs
2005-11-07 10:37:57 UTC (rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlSignificantWhitespace.cs
2005-11-07 11:42:17 UTC (rev 52647)
@@ -69,6 +69,12 @@
}
}
+#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return base.ParentNode; }
+ }
+#endif
+
// Methods
public override XmlNode CloneNode (bool deep)
{
Modified: trunk/mcs/class/System.XML/System.Xml/XmlText.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlText.cs 2005-11-07 10:37:57 UTC
(rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlText.cs 2005-11-07 11:42:17 UTC
(rev 52647)
@@ -69,6 +69,11 @@
set { Data = value; }
}
+#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return base.ParentNode; }
+ }
+#endif
#endregion
#region Methods
Modified: trunk/mcs/class/System.XML/System.Xml/XmlWhitespace.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlWhitespace.cs 2005-11-07
10:37:57 UTC (rev 52646)
+++ trunk/mcs/class/System.XML/System.Xml/XmlWhitespace.cs 2005-11-07
11:42:17 UTC (rev 52647)
@@ -67,6 +67,12 @@
}
}
+#if NET_2_0
+ public override XmlNode ParentNode {
+ get { return base.ParentNode; }
+ }
+#endif
+
// Methods
public override XmlNode CloneNode (bool deep)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches