Author: atsushi
Date: 2005-12-14 01:52:29 -0500 (Wed, 14 Dec 2005)
New Revision: 54344
Modified:
trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs
trunk/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
Log:
2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
* XPathEditableDocument.cs : added 2.0 SchemaInfo.
* XmlDocument.cs : changed some exception types.
* XmlDocumentNavigator.cs : added 2.0 SchemaInfo.
Modified: trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog 2005-12-14 05:49:08 UTC
(rev 54343)
+++ trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog 2005-12-14 06:52:29 UTC
(rev 54344)
@@ -1,3 +1,7 @@
+2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XPathEditableDocument.cs : added 2.0 SchemaInfo.
+
2005-12-13 Atsushi Enomoto <[EMAIL PROTECTED]>
* XPathEditableDocument.cs : implement ReplaceSelf() here.
Modified: trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
2005-12-14 05:49:08 UTC (rev 54343)
+++ trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
2005-12-14 06:52:29 UTC (rev 54344)
@@ -479,6 +479,10 @@
get { return navigator.Prefix; }
}
+ public override IXmlSchemaInfo SchemaInfo {
+ get { return navigator.SchemaInfo; }
+ }
+
public override string Value {
get { return navigator.Value; }
}
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-12-14 05:49:08 UTC
(rev 54343)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-12-14 06:52:29 UTC
(rev 54344)
@@ -1,3 +1,8 @@
+2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlDocument.cs : changed some exception types.
+ * XmlDocumentNavigator.cs : added 2.0 SchemaInfo.
+
2005-12-13 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlTextReader.cs : 1.x build fix.
Modified: trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs 2005-12-14
05:49:08 UTC (rev 54343)
+++ trunk/mcs/class/System.XML/System.Xml/XmlDocument.cs 2005-12-14
06:52:29 UTC (rev 54344)
@@ -440,7 +440,13 @@
case XmlNodeType.Text: return CreateTextNode
(null);
case XmlNodeType.Whitespace: return
CreateWhitespace (String.Empty);
case XmlNodeType.XmlDeclaration: return
CreateXmlDeclaration ("1.0", null, null);
- default: throw new
ArgumentOutOfRangeException(String.Format("{0}\nParameter name: {1}",
+ default:
+#if NET_2_0
+ throw new ArgumentException (
+#else // makes less sense
+ throw new ArgumentOutOfRangeException (
+#endif
+ String.Format("{0}\nParameter
name: {1}",
"Specified argument
was out of the range of valid values", type.ToString ()));
}
}
@@ -513,6 +519,10 @@
private XmlNodeType GetNodeTypeFromString (string
nodeTypeString)
{
+#if NET_2_0 // actually should be done in any version
+ if (nodeTypeString == null)
+ throw new ArgumentNullException
("nodeTypeString");
+#endif
switch (nodeTypeString) {
case "attribute": return XmlNodeType.Attribute;
case "cdatasection": return XmlNodeType.CDATA;
Modified: trunk/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
2005-12-14 05:49:08 UTC (rev 54343)
+++ trunk/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
2005-12-14 06:52:29 UTC (rev 54344)
@@ -33,6 +33,7 @@
using System;
using System.Collections;
using System.Xml;
+using System.Xml.Schema;
using System.Xml.XPath;
namespace System.Xml
@@ -214,6 +215,12 @@
get { return (NsNode != null) ? String.Empty :
node.Prefix; }
}
+#if NET_2_0
+ public override IXmlSchemaInfo SchemaInfo {
+ get { return NsNode != null ? null : node.SchemaInfo; }
+ }
+#endif
+
public override string Value {
get {
switch (NodeType) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches