Переглянути джерело

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

	* IXPathChangeNavigable.cs,
	  IXPathEditable.cs,
	  NodeChangedEventArgs.cs,
	  NodeChangedEventHandler.cs,
	  XPathAtomicValue.cs,
	  XPathChangeNavigator.cs,
	  XPathDocumentNodeChangedAction.cs,
	  XPathEditableNavigator.cs,
	  XPathItem.cs,
	  XmlChangeFilters.cs,
	  XmlNodeChangeType.cs : added NET_2_0 classes.
	* XPathDocument.cs,
	  XPathNavigator.cs : updated NET_2_0 members.

svn path=/trunk/mcs/; revision=27884
Atsushi Eno 21 роки тому
батько
коміт
edcb7df121

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

@@ -1,3 +1,19 @@
+2004-05-22  Atsushi Enomoto  <[email protected]>
+
+	* IXPathChangeNavigable.cs,
+	  IXPathEditable.cs,
+	  NodeChangedEventArgs.cs,
+	  NodeChangedEventHandler.cs,
+	  XPathAtomicValue.cs,
+	  XPathChangeNavigator.cs,
+	  XPathDocumentNodeChangedAction.cs,
+	  XPathEditableNavigator.cs,
+	  XPathItem.cs,
+	  XmlChangeFilters.cs,
+	  XmlNodeChangeType.cs : added NET_2_0 classes.
+	* XPathDocument.cs,
+	  XPathNavigator.cs : updated NET_2_0 members.
+
 2004-05-20  Atsushi Enomoto  <[email protected]>
 
 	* Expression.cs : We should not catch all kind of exception. Just

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

@@ -0,0 +1,20 @@
+//
+// IXPathChangeNavigable.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+using System;
+using System.Collections;
+
+namespace System.Xml.XPath
+{
+	public interface IXPathChangeNavigable
+	{
+		XPathChangeNavigator CreateChangeNavigator ();
+	}
+
+}
+#endif

+ 18 - 0
mcs/class/System.XML/System.Xml.XPath/IXPathEditable.cs

@@ -0,0 +1,18 @@
+//
+// IXPathEditable.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+using System;
+
+namespace System.Xml.XPath
+{
+	public interface IXPathEditable
+	{
+		XPathEditableNavigator CreateEditor ();
+	}
+}
+#endif

+ 55 - 0
mcs/class/System.XML/System.Xml.XPath/NodeChangedEventArgs.cs

@@ -0,0 +1,55 @@
+//
+// NodeChangedEventArgs.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+// (C)2004 Novell Inc.
+//
+
+#if NET_2_0
+
+using System;
+
+namespace System.Xml.XPath
+{
+	public class NodeChangedEventArgs : EventArgs
+	{
+		XPathDocumentNodeChangedAction action;
+		XPathEditableNavigator item;
+
+		public XPathDocumentNodeChangedAction Action {
+			get { return action; }
+		} 
+
+		public XPathEditableNavigator Item {
+			get { throw new NotImplementedException (); }
+		}
+
+		public XPathEditableNavigator NewParent {
+			get { throw new NotImplementedException (); }
+		}
+
+		public XPathEditableNavigator NewPreviousItem {
+			get { throw new NotImplementedException (); }
+		}
+
+		public object NewValue {
+			get { throw new NotImplementedException (); }
+		}
+
+		public XPathEditableNavigator OldParent {
+			get { throw new NotImplementedException (); }
+		}
+
+		public XPathEditableNavigator OldPreviousItem {
+			get { throw new NotImplementedException (); }
+		}
+
+		public object OldValue {
+			get { throw new NotImplementedException (); }
+		}
+	}
+}
+
+#endif

+ 16 - 0
mcs/class/System.XML/System.Xml.XPath/NodeChangedEventHandler.cs

@@ -0,0 +1,16 @@
+//
+// NodeChangedEventHandler.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+
+#if NET_2_0
+
+namespace System.Xml.XPath
+{
+	public delegate void NodeChangedEventHandler (
+		object sender, NodeChangedEventArgs e);
+}
+
+#endif

+ 166 - 0
mcs/class/System.XML/System.Xml.XPath/XPathAtomicValue.cs

@@ -0,0 +1,166 @@
+//
+// XPathAtomicValue.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+// (C)2004 Novell Inc.
+//
+using System.Collections;
+using System.Xml;
+using System.Xml.Schema;
+
+namespace System.Xml.XPath
+{
+	public sealed class XPathAtomicValue
+	{
+
+		#region Constructors
+
+		[MonoTODO]
+		public XPathAtomicValue (bool value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (DateTime value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (decimal value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (double value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (int value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (long value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (object value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (float value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathAtomicValue (string value, XmlSchemaType xmlType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		#endregion
+
+		#region Methods
+
+		[MonoTODO]
+		public XPathAtomicValue Clone ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public object ValueAs (Type type)
+		{
+			return ValueAs (type, null);
+		}
+
+		[MonoTODO]
+		public object ValueAs (Type type, IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+		#endregion
+
+		#region Properties
+
+		[MonoTODO]
+		public bool IsNode {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public object TypedValue {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public string Value {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public bool ValueAsBoolean {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public DateTime ValueAsDateTime {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public decimal ValueAsDecimal {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public double ValueAsDouble {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public int ValueAsInt32 {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public long ValueAsInt64 {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public ICollection ValueAsList {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public float ValueAsSingle {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public Type ValueType {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public XmlSchemaType XmlType {
+			get { throw new NotImplementedException (); }
+		}
+
+		#endregion
+	}
+}

+ 72 - 0
mcs/class/System.XML/System.Xml.XPath/XPathChangeNavigator.cs

@@ -0,0 +1,72 @@
+//
+// XPathChangeNavigator.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+// (C)2004 Novell Inc.
+//
+#if NET_2_0
+
+using System;
+using System.Collections;
+
+namespace System.Xml.XPath
+{
+	public abstract class XPathChangeNavigator
+		: XPathNavigator, IXPathChangeNavigable
+	{
+		protected XPathChangeNavigator ()
+		{
+		}
+
+		// Properties
+
+		public abstract XmlNodeChangeType NodeChangeType { get; }
+
+		public abstract object OriginalTypedValue { get; }
+
+		public abstract string OriginalValue { get; }
+
+		// Methods
+
+		public virtual void AcceptChange ()
+		{
+			AcceptChange (XmlChangeFilters.AllChanges);
+		}
+
+		public abstract void AcceptChange (XmlChangeFilters filters);
+
+		public virtual void AcceptChangesOnSubtree ()
+		{
+			AcceptChangesOnSubtree (XmlChangeFilters.AllChanges);
+		}
+
+		[MonoTODO]
+		public virtual void AcceptChangesOnSubtree (XmlChangeFilters filters)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual XPathChangeNavigator CreateChangeNavigator ()
+		{
+			return (XPathChangeNavigator) Clone ();
+		}
+
+		public virtual void RejectChange ()
+		{
+			RejectChange (XmlChangeFilters.AllChanges);
+		}
+
+		public abstract void RejectChange (XmlChangeFilters filters);
+
+		public virtual XPathNodeIterator SelectChanges ()
+		{
+			return SelectChanges (XmlChangeFilters.AllChanges);
+		}
+
+		public abstract XPathNodeIterator SelectChanges (XmlChangeFilters changeTypes);
+	}
+}
+
+#endif

+ 192 - 0
mcs/class/System.XML/System.Xml.XPath/XPathDocument.cs

@@ -13,6 +13,7 @@ using System.Collections;
 using System.IO;
 using System.Xml;
 using System.Xml.Schema;
+using System.Text;
 using Mono.Xml.XPath;
 
 namespace System.Xml.XPath
@@ -67,13 +68,204 @@ namespace System.Xml.XPath
 
 #endregion
 
+#region Events
+
+#if NET_2_0
+
+		public event NodeChangedEventHandler ChangeRejected;
+
+		public event NodeChangedEventHandler ItemChanged;
+
+		public event NodeChangedEventHandler ItemChanging;
+
+		public event NodeChangedEventHandler ItemInserted;
+
+		public event NodeChangedEventHandler ItemInserting;
+
+		public event NodeChangedEventHandler ItemRemoved;
+
+		public event NodeChangedEventHandler ItemRemoving;
+
+		public event NodeChangedEventHandler RejectingChange;
+
+#endif // NET_2_0
+
+#endregion // Events
+
+#region Properties
+
+#if NET_2_0
+
+		[MonoTODO]
+		public virtual bool ContainsListCollection {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public bool EnableChangeTracking {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public Encoding Encoding {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public XmlNameTable NameTable {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public bool PreserveWhitespace {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public XmlSchemaSet Schemas {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+#endif // NET_2_0
+
+#endregion // Properies
+
+
 #region Methods
 
+#if NET_2_0
+
+		[MonoTODO]
+		public XPathChangeNavigator CreateChangeNavigator ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathEditableNavigator CreateEditor ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO ("This code is only for compatibility.")]
 		public XPathNavigator CreateNavigator ()
 		{
 			return document.CreateNavigator ();
 		}
 
+		[MonoTODO]
+		public XmlWriter CreateWriter ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual IList GetList ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool HasChanges ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool HasChanges (XmlChangeFilters changeFilter)  
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public void Load (string xml)  
+		{
+			throw new NotImplementedException ();
+//			tree = new XPathDocumentTree (xmlReader);
+//			if (acceptChangesOnLoad)
+//				AcceptChanges ();
+		}
+
+		[MonoTODO]
+		public void RejectChanges ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO ("Confirm writer settings etc.")]
+		public void Save (Stream stream)
+		{
+			Save (new XmlTextWriter (stream, null));
+		}
+
+		[MonoTODO ("Confirm writer settings etc.")]
+		public void Save (string filename)
+		{
+			using (XmlWriter w = new XmlTextWriter (filename, null)) {
+				Save (w);
+			}
+		}
+
+		[MonoTODO ("Confirm writer settings etc.")]
+		public void Save (TextWriter writer)
+		{
+			Save (new XmlTextWriter (writer));
+		}
+
+		[MonoTODO]
+		public void Save (XmlWriter writer)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathNodeIterator SelectNodes (string xpath)
+		{
+			return SelectNodes (xpath, null);
+		}
+
+		[MonoTODO]
+		public XPathNodeIterator SelectNodes (XPathExpression expr)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathNodeIterator SelectNodes (string xpath ,IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathEditableNavigator SelectSingleNode (string xpath)
+		{
+			return SelectSingleNode (xpath, null);
+		}
+
+		[MonoTODO]
+		public XPathEditableNavigator SelectSingleNode (XPathExpression expr)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public XPathEditableNavigator SelectSingleNode (string xpath ,IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+#else // !NET_2_0
+
+		public XPathNavigator CreateNavigator ()
+		{
+			return document.CreateNavigator ();
+		}
+
+#endif
+
 #endregion
 
 	}

+ 23 - 0
mcs/class/System.XML/System.Xml.XPath/XPathDocumentNodeChangedAction.cs

@@ -0,0 +1,23 @@
+//
+// XPathDocumentNodeChangedAction.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+namespace System.Xml.XPath
+{
+	public enum XPathDocumentNodeChangedAction
+	{
+		Deleteed,
+		Deleteing,
+		Inserted,
+		Inserting,
+		Rejected,
+		Rejecting,
+		Updated,
+		Updating,
+	}
+}
+#endif

+ 227 - 0
mcs/class/System.XML/System.Xml.XPath/XPathEditableNavigator.cs

@@ -0,0 +1,227 @@
+//
+// XPathEditableNavigator.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+// (C)2003 Atsushi Enomoto
+//
+
+#if NET_2_0
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.IO;
+using System.Security.Policy;
+using System.Xml.Schema;
+using System.Xml.XPath;
+//using Mono.Xml.XPath2;
+//using MS.Internal.Xml;
+
+namespace System.Xml
+{
+	public abstract class XPathEditableNavigator 
+		: XPathNavigator, IXPathEditable
+	{
+		protected XPathEditableNavigator ()
+		{
+		}
+
+		public abstract XmlWriter AppendChild ();
+
+		public virtual XPathEditableNavigator AppendChild (
+			string xmlFragments)
+		{
+			// FIXME: should XmlParserContext be something?
+			return AppendChild (new XmlTextReader (xmlFragments, XmlNodeType.Element, null));
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator AppendChild (
+			XmlReader reader)
+		{
+			XmlWriter w = AppendChild ();
+			w.WriteNode (reader, false);
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator AppendChild (
+			XPathNavigator nav)
+		{
+			throw new NotImplementedException ();
+//			AppendChild (new XPathNavigatorReader (nav));
+		}
+
+		public void AppendChildElement (string prefix, string name, string ns, string value)
+		{
+			XmlWriter xw = AppendChild ();
+			xw.WriteStartElement (prefix, name, ns);
+			xw.WriteString (value);
+			xw.WriteEndElement ();
+			xw.Close ();
+		}
+
+		public virtual void CreateAttribute (string prefix, string localName, string namespaceURI, string value)
+		{
+			using (XmlWriter w = CreateAttributes ()) {
+				w.WriteAttributeString (prefix, localName, namespaceURI, value);
+			}
+		}
+
+		public abstract XmlWriter CreateAttributes ();
+
+		public virtual XPathEditableNavigator CreateEditor ()
+		{
+			return (XPathEditableNavigator) Clone ();
+		}
+
+		// LAMESPEC: documented as public abstract, but it conflicts
+		// with XPathNavigator.CreateNavigator ().
+//		public abstract XPathNavigator CreateNavigator ();
+
+		public abstract bool DeleteCurrent ();
+
+		public abstract XmlWriter InsertAfter ();
+
+		public virtual XPathEditableNavigator InsertAfter (string xmlFragments)
+		{
+			return InsertAfter (new XmlTextReader (xmlFragments, XmlNodeType.Element, null));
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator InsertAfter (XmlReader reader)
+		{
+			using (XmlWriter w = InsertAfter ()) {
+				w.WriteNode (reader, false);
+			}
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator InsertAfter (XPathNavigator nav)
+		{
+//			InsertAfter (new XPathNavigatorReader (nav));
+			throw new NotImplementedException ();
+		}
+
+		public abstract XmlWriter InsertBefore ();
+
+		public virtual XPathEditableNavigator InsertBefore (string xmlFragments)
+		{
+			return InsertBefore (new XmlTextReader (xmlFragments, XmlNodeType.Element, null));
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator InsertBefore (XmlReader reader)
+		{
+			using (XmlWriter w = InsertBefore ()) {
+				w.WriteNode (reader, false);
+			}
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator InsertBefore (XPathNavigator nav)
+		{
+//			InsertBefore (new XPathNavigatorReader (nav));
+			throw new NotImplementedException ();
+		}
+
+		public virtual void InsertElementAfter (string prefix, 
+			string localName, string namespaceURI, string value)
+		{
+			using (XmlWriter w = InsertAfter ()) {
+				w.WriteElementString (prefix, localName, namespaceURI, value);
+			}
+		}
+
+		public virtual void InsertElementBefore (string prefix, 
+			string localName, string namespaceURI, string value)
+		{
+			using (XmlWriter w = InsertBefore ()) {
+				w.WriteElementString (prefix, localName, namespaceURI, value);
+			}
+		}
+
+		public abstract XmlWriter PrependChild ();
+
+		public virtual XPathEditableNavigator PrependChild (string xmlFragments)
+		{
+			return PrependChild (new XmlTextReader (xmlFragments, XmlNodeType.Element, null));
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator PrependChild (XmlReader reader)
+		{
+			using (XmlWriter w = PrependChild ()) {
+				w.WriteNode (reader, false);
+			}
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XPathEditableNavigator PrependChild (XPathNavigator nav)
+		{
+//			PrependChild (new XPathNavigatorReader (nav));
+			throw new NotImplementedException ();
+		}
+
+		public virtual void PrependChildElement (string prefix, 
+			string localName, string namespaceURI, string value)
+		{
+			using (XmlWriter w = PrependChild ()) {
+				w.WriteElementString (prefix, localName, namespaceURI, value);
+			}
+		}
+
+		// Dunno the exact purpose, but maybe internal editor use
+		[MonoTODO]
+		public virtual void SetFromObject (object value)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public abstract void SetValue (object value);
+
+		[MonoTODO]
+		public virtual void Validate (XmlSchemaSet schemas, ValidationEventHandler handler)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual void Validate (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaAttribute attribute)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual void Validate (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaElement element)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual void Validate (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaType schemaType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public override string InnerXml {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public override string OuterXml {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+	}
+}
+
+#endif

+ 54 - 0
mcs/class/System.XML/System.Xml.XPath/XPathItem.cs

@@ -0,0 +1,54 @@
+//
+// XPathItem.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+using System.Collections;
+using System.Xml.Schema;
+
+namespace System.Xml.XPath
+{
+	public abstract class XPathItem
+	{
+		protected XPathItem ()
+		{
+		}
+
+		public virtual object ValueAs (Type type)
+		{
+			return ValueAs (type, null);
+		}
+
+		public abstract object ValueAs (Type type, IXmlNamespaceResolver nsResolver);
+
+		public abstract bool IsNode { get; }
+
+		public abstract object TypedValue { get; }
+
+		public abstract string Value { get; }
+
+		public abstract bool ValueAsBoolean { get; }
+
+		public abstract DateTime ValueAsDateTime { get; }
+
+		public abstract decimal ValueAsDecimal { get; }
+
+		public abstract double ValueAsDouble { get; }
+
+		public abstract int ValueAsInt32 { get; }
+
+		public abstract long ValueAsInt64 { get; }
+
+		public abstract ICollection ValueAsList { get; }
+
+		public abstract float ValueAsSingle { get; }
+
+		public abstract Type ValueType { get; }
+
+		public abstract XmlSchemaType XmlType { get; }
+	}
+}
+#endif

+ 197 - 0
mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs

@@ -3,11 +3,16 @@
 //
 // Author:
 //   Jason Diamond ([email protected])
+//   Atsushi Enomoto ([email protected])
 //
 // (C) 2002 Jason Diamond  http://injektilo.org/
+// (C) 2004 Novell Inc.
 //
 
 using System;
+using System.Collections;
+using System.Xml;
+using System.Xml.Schema;
 using Mono.Xml.XPath;
 
 namespace System.Xml.XPath
@@ -461,5 +466,197 @@ namespace System.Xml.XPath
 		}
 
 		#endregion
+
+#if NET_2_0
+
+		[MonoTODO]
+		public virtual bool CheckValidity (XmlSchemaSet schemas, ValidationEventHandler handler)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual bool CheckValidity (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaAttribute attribute)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual bool CheckValidity (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaElement element)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual bool CheckValidity (XmlSchemaSet schemas, ValidationEventHandler handler, XmlSchemaType schemaType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual object CopyAsObject (Type targetType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XPathNavigator CreateNavigator ()
+		{
+			return Clone ();
+		}
+
+		[MonoTODO]
+		public virtual object Evaluate (string xpath, IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual IDictionary GetNamespacesInScope (XmlNamespaceScope scope)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual string LookupNamespace (string prefix)
+		{
+			return LookupNamespace (prefix, false);
+		}
+
+		[MonoTODO]
+		public virtual string LookupNamespace (string prefix, bool atomizedNames)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual string LookupPrefix (string namespaceUri)
+		{
+			return LookupPrefix (namespaceUri, false);
+		}
+
+		[MonoTODO]
+		public virtual string LookupPrefix (string namespaceUri, bool atomizedNames)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XmlReader ReadSubtree ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual XPathNavigator SelectSingleNode (string xpath)
+		{
+			return SelectSingleNode (xpath, null);
+		}
+
+		[MonoTODO]
+		public virtual XPathNavigator SelectSingleNode (string xpath, IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual object ValueAs (Type type)
+		{
+			return ValueAs (type, null);
+		}
+
+		[MonoTODO]
+		public virtual object ValueAs (Type type, IXmlNamespaceResolver nsResolver)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual XmlWriter WriteSubtree ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool HasNamespaceResolver {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public virtual string InnerXml {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual bool IsNode {
+			get { throw new NotImplementedException (); }
+		}
+
+/* FIXME: It should be member, but requires new Collection type.
+		[MonoTODO]
+		public virtual IKeyComparer NavigatorComparer {
+			get { throw new NotImplementedException (); }
+		}
+*/
+		[MonoTODO]
+		public virtual string OuterXml {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public virtual IXmlSchemaInfo SchemaInfo {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public virtual object TypedValue {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public virtual object UnderlyingObject {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual bool ValueAsBoolean {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual DateTime ValueAsDateTime {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual decimal ValueAsDecimal {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual double ValueAsDouble {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual int ValueAsInt32 {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual long ValueAsInt64 {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual ICollection ValueAsList {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual float ValueAsSingle {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual Type ValueType {
+			get { throw new NotImplementedException (); }
+		}
+
+		public virtual XmlSchemaType XmlType {
+			get { throw new NotImplementedException (); }
+		}
+
+		protected XmlReader GetValidatingReader (XmlSchemaSet schemas, ValidationEventHandler handler)
+		{
+			throw new NotImplementedException ();
+		}
+#endif
 	}
 }

+ 19 - 0
mcs/class/System.XML/System.Xml.XPath/XmlChangeFilters.cs

@@ -0,0 +1,19 @@
+//
+// XmlChangeFilters.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+namespace System.Xml.XPath
+{
+	public enum XmlChangeFilters
+	{
+		Updated,
+		Inserted,
+		Deleted,
+		AllChanges
+	}
+}
+#endif

+ 19 - 0
mcs/class/System.XML/System.Xml.XPath/XmlNodeChangeType.cs

@@ -0,0 +1,19 @@
+//
+// XmlNodeChangeType.cs
+//
+// Author:
+//	Atsushi Enomoto <[email protected]>
+//
+#if NET_2_0
+
+namespace System.Xml.XPath
+{
+	public enum XmlNodeChangeType
+	{
+		Updated,
+		Inserted,
+		Deleted,
+		Unchanged
+	}
+}
+#endif