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>2005-12-14 09:52:29 +0300
committerAtsushi Eno <atsushieno@gmail.com>2005-12-14 09:52:29 +0300
commit9546c7879cdb9389fea9fc6a8e20ab3b70ccc9ef (patch)
treeba1c61470d205c3247cb7da2a962ce173670259a /mcs/class/System.XML
parent187c778c567be31f18efcc545c9eb5c0000b7380 (diff)
2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
* XPathEditableDocument.cs : added 2.0 SchemaInfo. * XmlDocument.cs : changed some exception types. * XmlDocumentNavigator.cs : added 2.0 SchemaInfo. svn path=/trunk/mcs/; revision=54344
Diffstat (limited to 'mcs/class/System.XML')
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/ChangeLog4
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml/XmlDocument.cs12
-rw-r--r--mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs7
5 files changed, 31 insertions, 1 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
index 279c95f0f78..bbe01849a08 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
@@ -1,3 +1,7 @@
+2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XPathEditableDocument.cs : added 2.0 SchemaInfo.
+
2005-12-13 Atsushi Enomoto <atsushi@ximian.com>
* XPathEditableDocument.cs : implement ReplaceSelf() here.
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs b/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
index 7665b090a91..894b60ead9c 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
+++ b/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
@@ -479,6 +479,10 @@ namespace Mono.Xml.XPath
get { return navigator.Prefix; }
}
+ public override IXmlSchemaInfo SchemaInfo {
+ get { return navigator.SchemaInfo; }
+ }
+
public override string Value {
get { return navigator.Value; }
}
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index 6e6c935dc66..7cb98dba3d6 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlDocument.cs : changed some exception types.
+ * XmlDocumentNavigator.cs : added 2.0 SchemaInfo.
+
2005-12-13 Atsushi Enomoto <atsushi@ximian.com>
* XmlTextReader.cs : 1.x build fix.
diff --git a/mcs/class/System.XML/System.Xml/XmlDocument.cs b/mcs/class/System.XML/System.Xml/XmlDocument.cs
index 635a0b2b06b..b1a967cf5d9 100644
--- a/mcs/class/System.XML/System.Xml/XmlDocument.cs
+++ b/mcs/class/System.XML/System.Xml/XmlDocument.cs
@@ -440,7 +440,13 @@ namespace System.Xml
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 @@ namespace System.Xml
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;
diff --git a/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs b/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
index 939ce6141cb..c37198ce80d 100644
--- a/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
+++ b/mcs/class/System.XML/System.Xml/XmlDocumentNavigator.cs
@@ -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 @@ namespace System.Xml
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) {