Kaynağa Gözat

Add System.Xml.Schema from Ajay

svn path=/trunk/mcs/; revision=3216
Miguel de Icaza 24 yıl önce
ebeveyn
işleme
aa2c54ee1f
73 değiştirilmiş dosya ile 2823 ekleme ve 0 silme
  1. 1 0
      mcs/class/System.XML/System.XML.build
  2. 37 0
      mcs/class/System.XML/System.Xml.Schema/ValidationEventArgs.cs
  3. 196 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs
  4. 24 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAll.cs
  5. 39 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs
  6. 39 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotation.cs
  7. 36 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAny.cs
  8. 37 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnyAttribute.cs
  9. 36 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAppInfo.cs
  10. 117 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttribute.cs
  11. 48 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroup.cs
  12. 29 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroupRef.cs
  13. 24 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaChoice.cs
  14. 118 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollection.cs
  15. 47 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollectionEnumerator.cs
  16. 32 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContent.cs
  17. 46 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentExtension.cs
  18. 49 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs
  19. 103 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexType.cs
  20. 15 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaContent.cs
  21. 19 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentModel.cs
  22. 22 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentProcessing.cs
  23. 17 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentType.cs
  24. 24 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaDatatype.cs
  25. 31 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaDerivationMethod.cs
  26. 42 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaDocumentation.cs
  27. 149 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs
  28. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaEnumerationFacet.cs
  29. 72 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs
  30. 47 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaExternal.cs
  31. 36 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaFacet.cs
  32. 19 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaForm.cs
  33. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaFractionDigitsFacet.cs
  34. 33 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroup.cs
  35. 19 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroupBase.cs
  36. 31 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroupRef.cs
  37. 47 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaIdentityConstraint.cs
  38. 31 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaImport.cs
  39. 24 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaInclude.cs
  40. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaKey.cs
  41. 26 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaKeyref.cs
  42. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaLengthFacet.cs
  43. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxExclusiveFacet.cs
  44. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxInclusiveFacet.cs
  45. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxLengthFacet.cs
  46. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinExclusiveFacet.cs
  47. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinInclusiveFacet.cs
  48. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinLengthFacet.cs
  49. 39 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaNotation.cs
  50. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaNumericFacet.cs
  51. 47 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaObject.cs
  52. 80 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectCollection.cs
  53. 49 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectEnumerator.cs
  54. 46 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectTable.cs
  55. 76 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs
  56. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaPatternFacet.cs
  57. 42 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaRedefine.cs
  58. 24 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSequence.cs
  59. 25 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContent.cs
  60. 43 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentExtension.cs
  61. 57 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentRestriction.cs
  62. 25 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleType.cs
  63. 17 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeContent.cs
  64. 41 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeList.cs
  65. 40 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs
  66. 33 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeUnion.cs
  67. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaTotalDigitsFacet.cs
  68. 73 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaType.cs
  69. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaUnique.cs
  70. 22 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaUse.cs
  71. 16 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaWhiteSpaceFacet.cs
  72. 27 0
      mcs/class/System.XML/System.Xml.Schema/XmlSchemaXPath.cs
  73. 15 0
      mcs/class/System.XML/System.Xml.Schema/XmlSeverityType.cs

+ 1 - 0
mcs/class/System.XML/System.XML.build

@@ -12,6 +12,7 @@
 			<arg value="/nowarn:1595"/>
 			<!-- Other languages may permit the internal virtual member 'foo' to be overridden -->
 			<arg value="/nowarn:0679"/>
+			<arg value="/nowarn:0649"/>
 			<sources>
 				<includes name="**/*.cs"/> 
 				<excludes name="Test/**"/>

+ 37 - 0
mcs/class/System.XML/System.Xml.Schema/ValidationEventArgs.cs

@@ -0,0 +1,37 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for ValidationEventArgs.
+	/// </summary>
+	public sealed class ValidationEventArgs : EventArgs
+	{
+		private XmlSchemaException exception;
+		private string message;
+		private XmlSeverityType severity;
+
+		private ValidationEventArgs()
+		{}
+
+		public XmlSchemaException Exception 
+		{
+			get{ return exception; }
+		}
+		public string Message 
+		{
+			get{ return message; }
+		}
+		public XmlSeverityType Severity 
+		{
+			get{ return severity; }
+		}
+	}
+	/// <summary>
+	/// 
+	/// </summary>
+	public delegate void ValidationEventHandler(object sender,ValidationEventArgs e);
+
+}

+ 196 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs

@@ -0,0 +1,196 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.IO;
+using System.Xml.Serialization;
+using System.ComponentModel;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchema.
+	/// </summary>
+	[XmlRoot] 
+	public class XmlSchema : XmlSchemaObject
+	{
+		//public constants
+		public const string InstanceNamespace = "http://www.w3.org/2001/XMLSchema-instance";
+		public const string Namespace = "http://www.w3.org/2001/XMLSchema";
+
+		//private fields
+		private XmlSchemaForm attributeFormDefault ;
+		private XmlSchemaObjectTable attributeGroups ;
+		private XmlSchemaObjectTable attributes ;
+		private XmlSchemaDerivationMethod blockDefault ;
+		private XmlSchemaForm elementFormDefault ;
+		private XmlSchemaObjectTable elements ;
+		private XmlSchemaDerivationMethod finalDefault ;
+		private XmlSchemaObjectTable groups ;
+		private string id ;
+		private XmlSchemaObjectCollection includes ;
+		private bool isCompiled ;
+		private XmlSchemaObjectCollection items ;
+		private XmlSchemaObjectTable notations ;
+		private XmlSchemaObjectTable schemaTypes ;
+		private string targetNamespace ;
+		private XmlAttribute[] unhandledAttributes ;
+		private string version ;
+
+
+		public XmlSchema()
+		{
+			attributeFormDefault= XmlSchemaForm.None;
+			blockDefault		= XmlSchemaDerivationMethod.None;
+			elementFormDefault	= XmlSchemaForm.None;
+			finalDefault		= XmlSchemaDerivationMethod.None;
+			includes			= new XmlSchemaObjectCollection();
+			isCompiled			= false;
+			items				= new XmlSchemaObjectCollection();
+		}
+		[DefaultValue(XmlSchemaForm.None)]
+		[XmlAttribute]
+		public XmlSchemaForm AttributeFormDefault 
+		{
+			get{ return attributeFormDefault; }
+			set{ this.attributeFormDefault = value;}
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable AttributeGroups 
+		{
+			get{ return attributeGroups; }
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable Attributes 
+		{
+			get{ return attributes;}
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod BlockDefault 
+		{
+			get{ return blockDefault;}
+			set{ blockDefault = value;}
+		}
+		[DefaultValue(XmlSchemaForm.None)]
+		[XmlAttribute]
+		public XmlSchemaForm ElementFormDefault 
+		{
+			get{ return elementFormDefault;}
+			set{ elementFormDefault = value;}
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable Elements 
+		{
+			get{ return elements;}
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod FinalDefault 
+		{
+			get{ return finalDefault;}
+			set{ finalDefault = value;}
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable Groups 
+		{
+			get{ return groups;}
+		}
+		[XmlAttribute]
+		public string Id 
+		{
+			get{ return id;}
+			set{ id = value;}
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Includes 
+		{
+			get{ return includes;}
+		}
+		[XmlIgnore]
+		public bool IsCompiled 
+		{
+			get{ return isCompiled;}
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Items 
+		{
+			get{ return items;}
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable Notations 
+		{
+			get{ return notations;}
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable SchemaTypes 
+		{
+			get{ return schemaTypes;}
+		}
+		[XmlAttribute]
+		public string TargetNamespace 
+		{
+			get{ return targetNamespace;}
+			set{ targetNamespace = value;}
+		}
+		[XmlAnyAttribute]
+		public XmlAttribute[] UnhandledAttributes 
+		{
+			get{ return unhandledAttributes;}
+			set{ unhandledAttributes = value;}
+		}
+		[XmlAttribute]
+		public string Version 
+		{
+			get{ return version;}
+			set{ version = value;}
+		}
+
+		// Methods
+		[MonoTODO]
+		public void Compile(System.Xml.Schema.ValidationEventHandler validationEventHandler)
+		{
+		}
+
+		public static XmlSchema Read(TextReader reader, ValidationEventHandler validationEventHandler)
+		{
+			return Read(new XmlTextReader(reader),validationEventHandler);
+		}
+		public static XmlSchema Read(Stream stream, ValidationEventHandler validationEventHandler)
+		{
+			return Read(new XmlTextReader(stream),validationEventHandler);
+		}
+		[MonoTODO]
+		public static XmlSchema Read(XmlReader reader, ValidationEventHandler validationEventHandler)
+		{
+			return null;
+		}
+
+		public void Write(System.IO.Stream stream)
+		{
+			Write(new XmlTextWriter(stream,null),null);
+		}
+		public void Write(System.IO.TextWriter writer)
+		{
+			Write(new XmlTextWriter(writer),null);
+		}
+		public void Write(System.Xml.XmlWriter writer)
+		{
+			Write(writer,null);
+		}
+		public void Write(System.IO.Stream stream, System.Xml.XmlNamespaceManager namespaceManager)
+		{
+			Write(new XmlTextWriter(stream,null),namespaceManager);
+		}
+		public void Write(System.IO.TextWriter writer, System.Xml.XmlNamespaceManager namespaceManager)
+		{
+			Write(new XmlTextWriter(writer),namespaceManager);
+		}
+		[MonoTODO]
+		public void Write(System.Xml.XmlWriter writer, System.Xml.XmlNamespaceManager namespaceManager)
+		{
+		}
+	}
+}

+ 24 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAll.cs

@@ -0,0 +1,24 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAll.
+	/// </summary>
+	public class XmlSchemaAll : XmlSchemaGroupBase
+	{
+		private XmlSchemaObjectCollection items;
+		public XmlSchemaAll()
+		{
+			items = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public override XmlSchemaObjectCollection Items 
+		{
+			get{ return items; }
+		}
+	}
+}

+ 39 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs

@@ -0,0 +1,39 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAnnotated.
+	/// </summary>
+	public class XmlSchemaAnnotated : XmlSchemaObject
+	{
+		private XmlSchemaAnnotation annotation;
+		private string id;
+		private XmlAttribute[] unhandledAttributes;
+
+		public XmlSchemaAnnotated()
+		{}
+		[XmlElement]
+		public XmlSchemaAnnotation Annotation 
+		{ 
+			get{ return this.annotation; } 
+			set{ this.annotation = value; } 
+		}
+		[XmlAttribute]
+		public string Id 
+		{ 
+			get{ return this.id; } 
+			set{ id = value; } 
+		}
+		[XmlAnyAttribute]
+		public XmlAttribute[] UnhandledAttributes 
+		{ 
+			get{ return unhandledAttributes; } 
+			set{ unhandledAttributes = value; } 
+		}
+	}
+}

+ 39 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotation.cs

@@ -0,0 +1,39 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAnnotation.
+	/// </summary>
+	public class XmlSchemaAnnotation : XmlSchemaObject
+	{
+		private string id;
+		private XmlSchemaObjectCollection items;
+		private XmlAttribute[] unhandledAttributes;
+
+		public XmlSchemaAnnotation()
+		{
+		}
+		[XmlAttribute]
+		public string Id 
+		{
+			get{ return  id; } 
+			set{ id = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Items 
+		{
+			get{ return items; }
+		}
+		[XmlAnyAttribute]
+		public XmlAttribute[] UnhandledAttributes 
+		{
+			get{ return  unhandledAttributes; } 
+			set{ unhandledAttributes = value; }
+		}
+	}
+}

+ 36 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAny.cs

@@ -0,0 +1,36 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+using System.ComponentModel;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAny.
+	/// </summary>
+	public class XmlSchemaAny : XmlSchemaParticle
+	{
+		private string nameSpace;
+		private XmlSchemaContentProcessing processing;
+
+		public XmlSchemaAny()
+		{
+			nameSpace = string.Empty;
+			processing = XmlSchemaContentProcessing.Strict;
+		}
+		[XmlAttribute]
+		public string Namespace 
+		{
+			get{ return  nameSpace; } 
+			set{ nameSpace = value; }
+		}
+		[DefaultValue(XmlSchemaContentProcessing.Strict)]
+		[XmlAttribute]
+		public XmlSchemaContentProcessing ProcessContents 
+		{ 
+			get{ return processing; } 
+			set{ processing = value; }
+		}
+	}
+}

+ 37 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnyAttribute.cs

@@ -0,0 +1,37 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.ComponentModel;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAnyAttribute.
+	/// </summary>
+	public class XmlSchemaAnyAttribute : XmlSchemaAnnotated
+	{
+		private string nameSpace;
+		public XmlSchemaContentProcessing processing;
+
+		public XmlSchemaAnyAttribute()
+		{
+			nameSpace = string.Empty;
+			this.processing = XmlSchemaContentProcessing.Strict;
+		}
+
+		[XmlAttribute]
+		public string Namespace 
+		{ 
+			get{ return nameSpace; } 
+			set{ nameSpace = value; } 
+		}
+		[DefaultValue(XmlSchemaContentProcessing.Strict)]
+		[XmlAttribute]
+		public XmlSchemaContentProcessing ProcessContents 
+		{ 
+			get{ return processing; } 
+			set{ processing = value; }
+		}
+	}
+}

+ 36 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAppInfo.cs

@@ -0,0 +1,36 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAppInfo.
+	/// </summary>
+	public class XmlSchemaAppInfo : XmlSchemaObject
+	{
+		private XmlNode[] markup;
+		private string source;
+
+		public XmlSchemaAppInfo()
+		{
+			source = string.Empty;
+		}
+
+		[XmlAnyElement]
+		[XmlText]
+		public XmlNode[] Markup 
+		{
+			get{ return  markup; }
+			set{ markup = value; }
+		}
+		[XmlAttribute]
+		public string Source 
+		{
+			get{ return  source; } 
+			set{ source = value; }
+		}
+	}
+}

+ 117 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttribute.cs

@@ -0,0 +1,117 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.ComponentModel;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAttribute.
+	/// </summary>
+	public class XmlSchemaAttribute : XmlSchemaAnnotated
+	{
+		private object attributeType;
+		private string defaultValue;
+		private string fixedValue;
+		private XmlSchemaForm form;
+		private string name;
+		private XmlQualifiedName qualifiedName;
+		private XmlQualifiedName refName;
+		private XmlSchemaSimpleType schemaType;
+		private XmlQualifiedName schemaTypeName;
+		private XmlSchemaUse use;
+
+		public XmlSchemaAttribute()
+		{
+			//FIXME: Docs says the default is optional.
+			//Whereas the MS implementation has default None.
+			use = XmlSchemaUse.Optional;
+			qualifiedName = XmlQualifiedName.Empty;
+			refName = XmlQualifiedName.Empty;
+		}
+
+		// Properties
+		[XmlIgnore]
+		public object AttributeType 
+		{ //FIXME: This is not correct. Is it?
+			get{ return attributeType; }
+		}
+		//FIXME: what is the default value?
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string DefaultValue 
+		{
+			get{ return defaultValue;}
+			set
+			{ // Default Value and fixed Value are mutually exclusive
+				fixedValue = null;
+				defaultValue = value;
+			}
+		}
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string FixedValue 
+		{
+			get{ return fixedValue;}
+			set
+			{ // Default Value and fixed Value are mutually exclusive
+				defaultValue = null;
+				fixedValue = value;
+			}
+		}
+		[DefaultValue(XmlSchemaForm.None)]
+		[XmlAttribute]
+		public XmlSchemaForm Form 
+		{
+			get{ return form;}
+			set{ form = value;}
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return name;}
+			set
+			{ // Name and RefName are mutually exclusive
+				refName = null;
+				name  = value;
+			}
+		}
+		[XmlIgnore]
+		public XmlQualifiedName QualifiedName 
+		{
+			get{ return qualifiedName;}
+		}
+
+		[XmlAttribute]
+		public XmlQualifiedName RefName 
+		{
+			get{ return refName;}
+			set
+			{ // Name and RefName are mutually exclusive
+				name = null;
+				refName = value; 
+			}
+		}
+		[XmlElement]
+		public XmlSchemaSimpleType SchemaType 
+		{
+			get{ return schemaType;}
+			set{ schemaType = value;}
+		}
+		[XmlAttribute]
+		public XmlQualifiedName SchemaTypeName 
+		{
+			get{ return schemaTypeName;}
+			set{ schemaTypeName = value;}
+		}
+		[DefaultValue(XmlSchemaUse.Optional)]
+		[XmlAttribute]
+		public XmlSchemaUse Use 
+		{
+			get{ return use;}
+			set{ use = value;}
+		}
+	}
+}

+ 48 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroup.cs

@@ -0,0 +1,48 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAttributeGroup.
+	/// </summary>
+	public class XmlSchemaAttributeGroup : XmlSchemaAnnotated
+	{
+		private XmlSchemaAnyAttribute any;
+		private XmlSchemaObjectCollection attributes;
+		private string name;
+		private XmlSchemaAttributeGroup redefined;
+
+		public XmlSchemaAttributeGroup()
+		{
+			attributes  = new XmlSchemaObjectCollection();
+			//FIXME:
+			redefined  = this;
+		}
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return any;}
+			set{ any = value;}
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes;}
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return name;}
+			set{ name = value;}
+		}
+		//Undocumented property
+		[XmlIgnore]
+		public XmlSchemaAttributeGroup RedefinedAttributeGroup 
+		{
+			get{ return redefined;}
+		}
+	}
+}

+ 29 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroupRef.cs

@@ -0,0 +1,29 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAttributeGroupRef.
+	/// </summary>
+	public class XmlSchemaAttributeGroupRef : XmlSchemaAnnotated
+	{
+		private XmlQualifiedName refName;
+
+		public XmlSchemaAttributeGroupRef()
+		{}
+		
+		[XmlAttribute]
+		public XmlQualifiedName RefName 
+		{
+			get{ return refName;}
+			set
+			{
+				refName = value; 
+			}
+		}
+	}
+}

+ 24 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaChoice.cs

@@ -0,0 +1,24 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaAll.
+	/// </summary>
+	public class XmlSchemaChoice : XmlSchemaGroupBase
+	{
+		private XmlSchemaObjectCollection items;
+		public XmlSchemaChoice()
+		{
+			items = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public override XmlSchemaObjectCollection Items 
+		{
+			get{ return items; }
+		}
+	}
+}

+ 118 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollection.cs

@@ -0,0 +1,118 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Collections;
+using System.Xml;
+
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaCollection.
+	/// </summary>
+	public sealed class XmlSchemaCollection : ICollection, IEnumerable
+	{
+		//private fields
+		private Hashtable htable;
+		private XmlNameTable ntable;
+
+		[MonoTODO]
+		public XmlSchemaCollection()
+		{
+			htable = new Hashtable();
+			ntable = new NameTable();
+		}
+		public XmlSchemaCollection(XmlNameTable nametable)
+		{
+			htable = new Hashtable();
+			ntable = nametable;
+		}
+
+		//properties
+		public int Count 
+		{ 
+			get
+			{ 
+				return this.htable.Count; 
+			}
+		}
+		public XmlSchema this[ string ns ] 
+		{ 
+			get
+			{
+				return (XmlSchema) this.htable[ns];
+			}
+		}
+		public XmlNameTable NameTable 
+		{ 
+			get
+			{
+				return this.ntable;
+			}
+		}
+
+		// Events
+		public event ValidationEventHandler ValidationEventHandler;
+
+		// Methods
+		[MonoTODO]
+		public XmlSchema Add(string ns, XmlReader reader)
+		{
+			return null;
+		}
+		[MonoTODO]
+		public XmlSchema Add(string ns, string uri)
+		{
+			return null;
+		}
+		[MonoTODO]
+		public XmlSchema Add(XmlSchema schema)
+		{
+			return null;
+		}
+
+		public void Add(XmlSchemaCollection schema)
+		{
+			XmlSchemaCollectionEnumerator xenum = schema.GetEnumerator();
+			while(xenum.MoveNext())
+			{
+				this.Add(xenum.Current);
+			}
+		}
+
+		public bool Contains(string ns)
+		{
+			return this.htable.Contains(ns);
+		}
+		public bool Contains(System.Xml.Schema.XmlSchema schema)
+		{
+			return this.htable.Contains(schema.TargetNamespace); 
+		}
+		public void CopyTo(System.Xml.Schema.XmlSchema[] array, int index)
+		{
+
+		}
+		public XmlSchemaCollectionEnumerator GetEnumerator()
+		{
+			return new XmlSchemaCollectionEnumerator(this.htable);
+		}
+		
+		//assembly Methods
+		[MonoTODO]
+		void ICollection.CopyTo(Array array, int index)
+		{
+		}
+		bool ICollection.IsSynchronized
+		{
+			get { return false; }
+		}
+		IEnumerator IEnumerable.GetEnumerator()
+		{
+			return this.htable.GetEnumerator();
+		}
+		Object ICollection.SyncRoot
+		{
+			get { return this; }
+		}
+	}
+}

+ 47 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollectionEnumerator.cs

@@ -0,0 +1,47 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Collections;
+
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaCollectionEnumerator.
+	/// </summary>
+	public class XmlSchemaCollectionEnumerator : IEnumerator
+	{
+		private IDictionaryEnumerator xenum;
+		internal XmlSchemaCollectionEnumerator(Hashtable htable)
+		{
+			this.xenum = htable.GetEnumerator();
+		}
+		// Properties
+		public XmlSchema Current 
+		{ 
+			get
+			{
+				return (XmlSchema) xenum.Current; 
+			}
+		}
+		// Methods
+		public bool MoveNext()
+		{
+			return xenum.MoveNext();
+		}
+
+		//Explicit Interface implementation
+		bool IEnumerator.MoveNext()
+		{
+			return xenum.MoveNext();
+		}
+		void IEnumerator.Reset()
+		{
+			xenum.Reset();
+		}
+		object IEnumerator.Current
+		{
+			get{return (XmlSchema) xenum.Current;}
+		}
+	}
+}

+ 32 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContent.cs

@@ -0,0 +1,32 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaComplexContent.
+	/// </summary>
+	public class XmlSchemaComplexContent : XmlSchemaContentModel
+	{
+		private XmlSchemaContent content;
+		private bool isMixed;
+
+		public XmlSchemaComplexContent()
+		{
+		}
+		[XmlElement]
+		public override XmlSchemaContent Content 
+		{
+			get{ return  content; } 
+			set{ content = value; }
+		}
+		[XmlAttribute]
+		public bool IsMixed 
+		{
+			get{ return  isMixed; } 
+			set{ isMixed = value; }
+		}
+	}
+}

+ 46 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentExtension.cs

@@ -0,0 +1,46 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaComplexContentExtension.
+	/// </summary>
+	public class XmlSchemaComplexContentExtension : XmlSchemaContent
+	{
+		private XmlSchemaAnyAttribute any;
+		private XmlSchemaObjectCollection attributes;
+		private XmlQualifiedName baseTypeName;
+		private XmlSchemaParticle particle;
+		public XmlSchemaComplexContentExtension()
+		{
+			attributes = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return any; }
+			set{ any = value;}
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName BaseTypeName 
+		{
+			get{ return  baseTypeName; }
+			set{ baseTypeName = value; }
+		}
+		[XmlElement]
+		public XmlSchemaParticle Particle
+		{
+			get{ return  particle; }
+			set{ particle = value; }
+		}
+	}
+}

+ 49 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs

@@ -0,0 +1,49 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaComplexContentRestriction.
+	/// </summary>
+	public class XmlSchemaComplexContentRestriction
+	{
+		private XmlSchemaAnyAttribute any;
+		private XmlSchemaObjectCollection attributes;
+		private XmlQualifiedName baseTypeName;
+		private XmlSchemaParticle particle;
+
+		public XmlSchemaComplexContentRestriction()
+		{
+			baseTypeName = XmlQualifiedName.Empty;
+			attributes	 = new XmlSchemaObjectCollection();
+		}
+
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return  any; }
+			set{ any = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName BaseTypeName 
+		{
+			get{ return  baseTypeName; }
+			set{ baseTypeName = value; }
+		}
+		[XmlElement]
+		public XmlSchemaParticle Particle 
+		{
+			get{ return  particle; }
+			set{ particle = value; }
+		}
+	}
+}

+ 103 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexType.cs

@@ -0,0 +1,103 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.ComponentModel;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaComplexType.
+	/// </summary>
+	public class XmlSchemaComplexType : XmlSchemaType
+	{
+		private XmlSchemaAnyAttribute anyAttribute;
+		private XmlSchemaObjectCollection attributes;
+		private XmlSchemaObjectTable attributeUses;
+		private XmlSchemaAnyAttribute attributeWildcard;
+		private XmlSchemaDerivationMethod block;
+		private XmlSchemaDerivationMethod blockResolved;
+		private XmlSchemaContentModel contentModel;
+		private XmlSchemaContentType contentType;
+		private XmlSchemaParticle contentTypeParticle;
+		private bool isAbstract;
+		private bool isMixed;
+		private XmlSchemaParticle particle;
+
+		public XmlSchemaComplexType()
+		{
+			block = XmlSchemaDerivationMethod.None;
+		}
+
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return  anyAttribute; }
+			set{ anyAttribute = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes; }
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable AttributeUses 
+		{
+			get{ return attributeUses; }
+		}
+		[XmlIgnore]
+		public XmlSchemaAnyAttribute AttributeWildcard 
+		{
+			get{ return attributeWildcard; }
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod Block 
+		{
+			get{ return  block; }
+			set{ block = value; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDerivationMethod BlockResolved 
+		{
+			get{ return blockResolved; }
+		}
+		[XmlElement]
+		public XmlSchemaContentModel ContentModel 
+		{
+			get{ return  contentModel; } 
+			set{ contentModel = value; }
+		}
+		[XmlIgnore]
+		public XmlSchemaContentType ContentType 
+		{
+			get{ return contentType; }
+		}
+		[XmlIgnore]
+		public XmlSchemaParticle ContentTypeParticle 
+		{
+			get{ return contentTypeParticle; }
+		}
+		[DefaultValue(true)]
+		[XmlAttribute]
+		public bool IsAbstract 
+		{
+			get{ return  isAbstract; }
+			set{ isAbstract = value; }
+		}
+		[DefaultValue(true)]
+		[XmlAttribute]
+		public override bool IsMixed
+		{
+			get{ return  isMixed; }
+			set{ isMixed = value; }
+		}
+		[XmlElement]
+		public XmlSchemaParticle Particle 
+		{
+			get{ return  particle; } 
+			set{ particle = value; }
+		}
+	}
+}

+ 15 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaContent.cs

@@ -0,0 +1,15 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaContent.
+	/// </summary>
+	public abstract class XmlSchemaContent : XmlSchemaAnnotated
+	{
+		protected XmlSchemaContent()
+		{}
+	}
+}

+ 19 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentModel.cs

@@ -0,0 +1,19 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaContentModel.
+	/// </summary>
+	public abstract class XmlSchemaContentModel : XmlSchemaAnnotated
+	{
+		protected XmlSchemaContentModel()
+		{
+		}
+		[XmlIgnore]
+		public abstract XmlSchemaContent Content {get; set;}
+	}
+}

+ 22 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentProcessing.cs

@@ -0,0 +1,22 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaContentProcessing.
+	/// </summary>
+	public enum XmlSchemaContentProcessing 
+	{
+		[XmlIgnore]
+		None	= 0,
+		[XmlEnum]
+		Skip	= 1,
+		[XmlEnum]
+		Lax		= 2, 
+		[XmlEnum]
+		Strict	= 3, 
+	}
+}

+ 17 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentType.cs

@@ -0,0 +1,17 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaContentType.
+	/// </summary>
+	public enum XmlSchemaContentType 
+	{
+		TextOnly	= 0, 
+		Empty		= 1, 
+		ElementOnly = 2, 
+		Mixed		= 3, 
+	}
+}

+ 24 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDatatype.cs

@@ -0,0 +1,24 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaDatatype.
+	/// </summary>
+	public abstract class XmlSchemaDatatype
+	{
+		protected XmlSchemaDatatype()
+		{
+		}
+		
+		public abstract XmlTokenizedType TokenizedType {  get; }
+		public abstract Type ValueType {  get; }
+
+		// Methods
+		public abstract object ParseValue(string s, 
+			XmlNameTable nameTable, XmlNamespaceManager nsmgr);
+	}
+}

+ 31 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDerivationMethod.cs

@@ -0,0 +1,31 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaDerivationMethod.
+	/// </summary>
+	[Flags]
+	public enum XmlSchemaDerivationMethod
+	{
+		[XmlEnum]
+		Empty		= 0x00000000, 
+		[XmlEnum]
+		Substitution= 0x00000001, 
+		[XmlEnum]
+		Extension	= 0x00000002, 
+		[XmlEnum]
+		Restriction	= 0x00000004, 
+		[XmlEnum]
+		List		= 0x00000008, 
+		[XmlEnum]
+		Union		= 0x00000010, 
+		[XmlEnum]
+		All			= 0x000000FF,
+		[XmlIgnore]
+		None		= 0x00000100, 
+	}
+}

+ 42 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDocumentation.cs

@@ -0,0 +1,42 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaDocumentation.
+	/// </summary>
+	public class XmlSchemaDocumentation : XmlSchemaObject
+	{
+		private string language;
+		private XmlNode[] markup;
+		private string source;
+
+		public XmlSchemaDocumentation()
+		{
+			source = string.Empty;
+		}
+		[XmlAttribute]
+		public string Language 
+		{
+			get{ return  language; }
+			set{ language = value; }
+		}
+		[XmlAnyElement]
+		[XmlText]
+		public XmlNode[] Markup 
+		{
+			get{ return  markup; }
+			set{ markup = value; }
+		}
+		[XmlAttribute]
+		public string Source 
+		{
+			get{ return  source; } 
+			set{ source = value; }
+		}
+	}
+}

+ 149 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs

@@ -0,0 +1,149 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.ComponentModel;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaElement.
+	/// </summary>
+	public class XmlSchemaElement : XmlSchemaParticle
+	{
+		private XmlSchemaDerivationMethod block;
+		private XmlSchemaDerivationMethod blockResolved;
+		private XmlSchemaObjectCollection constraints;
+		private string defaultValue;
+		private object elementType;
+		private XmlSchemaDerivationMethod final;
+		private XmlSchemaDerivationMethod finalResolved;
+		private string fixedValue;
+		private XmlSchemaForm form;
+		private bool isAbstract;
+		private bool isNillable;
+		private string name;
+		private XmlQualifiedName qName;
+		private XmlQualifiedName refName;
+		private XmlSchemaType schemaType;
+		private XmlQualifiedName schemaTypeName;
+		private XmlQualifiedName substitutionGroup;
+
+		public XmlSchemaElement()
+		{
+			block = XmlSchemaDerivationMethod.None;
+			constraints = new XmlSchemaObjectCollection();
+			final = XmlSchemaDerivationMethod.None;
+			finalResolved = XmlSchemaDerivationMethod.None;
+			name = string.Empty;
+			qName = XmlQualifiedName.Empty;
+			substitutionGroup = XmlQualifiedName.Empty;
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod Block 
+		{
+			get{ return  block; }
+			set{ block = value; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDerivationMethod BlockResolved 
+		{
+			get{ return blockResolved; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Constraints 
+		{
+			get{ return constraints; }
+		}
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string DefaultValue 
+		{
+			get{ return  defaultValue; }
+			set{ defaultValue = value; }
+		}
+		[XmlIgnore]
+		public object ElementType 
+		{
+			get{ return elementType; }
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod Final 
+		{
+			get{ return  final; }
+			set{ final = value; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDerivationMethod FinalResolved 
+		{
+			get{ return finalResolved; }
+		}
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string FixedValue 
+		{
+			get{ return  fixedValue; }
+			set{ fixedValue = value; }
+		}
+		[DefaultValue(XmlSchemaForm.None)]
+		[XmlAttribute]
+		public XmlSchemaForm Form 
+		{
+			get{ return  form; }
+			set{ form = value; }
+		}
+		[DefaultValue(true)]
+		[XmlAttribute]
+		public bool IsAbstract 
+		{
+			get{ return  isAbstract; }
+			set{ isAbstract = value; }
+		}
+		[DefaultValue(false)]
+		[XmlAttribute]
+		public bool IsNillable 
+		{
+			get{ return  isNillable; }
+			set{ isNillable = value; }
+		}
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return  name; }
+			set{ name = value; }
+		}
+		[XmlIgnore]
+		public XmlQualifiedName QualifiedName 
+		{
+			get{ return qName; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName RefName 
+		{
+			get{ return  refName; }
+			set{ refName = value;}
+		}
+		[XmlElement]
+		public XmlSchemaType SchemaType 
+		{
+			get{ return  schemaType; }
+			set{ schemaType = value; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName SchemaTypeName 
+		{
+			get{ return  schemaTypeName; }
+			set{ schemaTypeName = value; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName SubstitutionGroup 
+		{
+			get{ return  substitutionGroup; }
+			set{ substitutionGroup = value; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaEnumerationFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaEnumerationFacet.
+	/// </summary>
+	public class XmlSchemaEnumerationFacet : XmlSchemaFacet
+	{
+		public XmlSchemaEnumerationFacet()
+		{
+		}
+	}
+}

+ 72 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs

@@ -0,0 +1,72 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Runtime.Serialization;
+
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaException.
+	/// </summary>
+	[Serializable]
+	public class XmlSchemaException : System.SystemException
+	{
+		//fields
+		private int lineNumber;
+		private int linePosition;
+		private XmlSchemaObject sourceObj;
+		private string sourceUri;
+
+		[MonoTODO]
+		protected XmlSchemaException(SerializationInfo info, StreamingContext context){}
+		
+		protected XmlSchemaException(string message, int lineNumber, int linePosition,
+			XmlSchemaObject sourceObject, string sourceUri, Exception innerException)
+			: base(message, innerException)
+		{
+			this.lineNumber		= lineNumber;
+			this.linePosition	= linePosition;
+			this.sourceObj		= sourceObject;
+			this.sourceUri		= sourceUri;
+		}
+		protected XmlSchemaException(string message, XmlSchemaObject sourceObject,
+			Exception innerException)
+			: base(message, innerException)
+		{
+			this.lineNumber = sourceObject.LineNumber;
+			this.linePosition = sourceObject.LinePosition;
+			this.sourceObj	=	sourceObject;
+			this.sourceUri	=	sourceObject.SourceUri;
+		}
+
+		public XmlSchemaException(string message, Exception innerException)
+			: base(message,innerException){}
+
+		// Properties
+		public int LineNumber 
+		{ 
+			get{ return this.lineNumber;} 
+		}
+		public int LinePosition 
+		{ 
+			get{ return this.linePosition;} 
+		}
+		public override string Message 
+		{  
+			get{ return this.Message; } 
+		}
+		public XmlSchemaObject SourceSchemaObject 
+		{
+			get{ return this.sourceObj; } 
+		}
+		public string SourceUri 
+		{ 
+			get{ return this.sourceUri; } 
+		}
+
+		// Methods
+		[MonoTODO]
+		public override void GetObjectData(SerializationInfo info, StreamingContext context){}
+	}
+}

+ 47 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaExternal.cs

@@ -0,0 +1,47 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaExternal.
+	/// </summary>
+	public abstract class XmlSchemaExternal : XmlSchemaObject
+	{
+		private string id;
+		private XmlSchema schema;
+		private string location;
+		private XmlAttribute[] unhandledAttributes;
+
+		protected XmlSchemaExternal()
+		{
+		}
+		[XmlAttribute]
+		public string Id 
+		{
+			get{ return  id; }
+			set{ id = value; }
+		}
+		[XmlIgnore]
+		public XmlSchema Schema 
+		{
+			get{ return  schema; }
+			set{ schema = value; }
+		}
+		[XmlAttribute]
+		public string SchemaLocation 
+		{
+			get{ return  location; } 
+			set{ location = value; }
+		}
+		[XmlAnyAttribute]
+		public XmlAttribute[] UnhandledAttributes 
+		{
+			get{ return  unhandledAttributes; }
+			set{ unhandledAttributes = value; }
+		}
+	}
+}

+ 36 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaFacet.cs

@@ -0,0 +1,36 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+using System.ComponentModel;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaFacet.
+	/// </summary>
+	public abstract class XmlSchemaFacet : XmlSchemaAnnotated
+	{
+		private bool isFixed;
+		private string val;
+
+		protected XmlSchemaFacet()
+		{
+			val = string.Empty;
+		}
+		[DefaultValue(false)]
+		[XmlAttribute]
+		public virtual bool IsFixed 
+		{
+			get{ return  isFixed; }
+			set{ isFixed = value; }
+		}
+		[XmlAttribute]
+		public string Value 
+		{
+			get{ return  val; } 
+			set{ val = value; }
+		}
+	}
+}

+ 19 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaForm.cs

@@ -0,0 +1,19 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaForm.
+	/// </summary>
+	public enum XmlSchemaForm 
+	{
+		[XmlIgnore]
+		None = 0x00000000, 
+		[XmlEnum]
+		Qualified = 0x00000001, 
+		[XmlEnum]
+		Unqualified = 0x00000002, 
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaFractionDigitsFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaFractionDigitsFacet.
+	/// </summary>
+	public class XmlSchemaFractionDigitsFacet : XmlSchemaNumericFacet
+	{
+		public XmlSchemaFractionDigitsFacet()
+		{
+		}
+	}
+}

+ 33 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroup.cs

@@ -0,0 +1,33 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaGroup.
+	/// </summary>
+	public class XmlSchemaGroup : XmlSchemaAnnotated
+	{
+		private string name;
+		private XmlSchemaGroupBase particle;
+
+		public XmlSchemaGroup()
+		{
+			name = string.Empty;
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return  name; } 
+			set{ name = value; }
+		}
+		[XmlElement]
+		public XmlSchemaGroupBase Particle
+		{
+			get{ return  particle; }
+			set{ particle = value; }
+		}
+	}
+}

+ 19 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroupBase.cs

@@ -0,0 +1,19 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaGroupBase.
+	/// </summary>
+	public abstract class XmlSchemaGroupBase : XmlSchemaParticle
+	{
+		protected XmlSchemaGroupBase()
+		{
+		}
+		[XmlIgnore]
+		public abstract XmlSchemaObjectCollection Items { get; }
+	}
+}

+ 31 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroupRef.cs

@@ -0,0 +1,31 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaGroupRef.
+	/// </summary>
+	public class XmlSchemaGroupRef : XmlSchemaParticle
+	{
+		private XmlSchemaGroupBase particle;
+		private XmlQualifiedName refName;
+		public XmlSchemaGroupRef()
+		{
+		}
+		[XmlIgnore]
+		public XmlSchemaGroupBase Particle 
+		{
+			get{ return particle; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName RefName 
+		{
+			get{ return  refName; } 
+			set{ refName = value; }
+		}
+	}
+}

+ 47 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaIdentityConstraint.cs

@@ -0,0 +1,47 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaIdentityConstraint.
+	/// </summary>
+	public class XmlSchemaIdentityConstraint : XmlSchemaAnnotated
+	{
+		private XmlSchemaObjectCollection fields;
+		private string name;
+		private XmlQualifiedName qName;
+		private XmlSchemaXPath selector;
+
+		public XmlSchemaIdentityConstraint()
+		{
+			fields = new XmlSchemaObjectCollection();
+			qName = XmlQualifiedName.Empty;
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Fields 
+		{
+			get{ return fields; }
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return  name; } 
+			set{ name = value; }
+		}
+		[XmlIgnore]
+		public XmlQualifiedName QualifiedName 
+		{
+			get{ return  qName; }
+		}
+		[XmlElement]
+		public XmlSchemaXPath Selector 
+		{
+			get{ return  selector; } 
+			set{ selector = value; }
+		}
+	}
+}

+ 31 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaImport.cs

@@ -0,0 +1,31 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaImport.
+	/// </summary>
+	public class XmlSchemaImport : XmlSchemaExternal
+	{
+		private XmlSchemaAnnotation annotation;
+		private string nameSpace;
+		public XmlSchemaImport()
+		{
+		}
+		[XmlElement]
+		public XmlSchemaAnnotation Annotation 
+		{
+			get{ return  annotation; } 
+			set{ annotation = value; }
+		}
+		[XmlAttribute]
+		public string Namespace 
+		{
+			get{ return  nameSpace; } 
+			set{ nameSpace = value; }
+		}
+	}
+}

+ 24 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaInclude.cs

@@ -0,0 +1,24 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaInclude.
+	/// </summary>
+	public class XmlSchemaInclude : XmlSchemaExternal
+	{
+		private XmlSchemaAnnotation annotation;
+		public XmlSchemaInclude()
+		{
+		}
+		[XmlElement]
+		public XmlSchemaAnnotation Annotation 
+		{
+			get{ return  annotation; } 
+			set{ annotation = value; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaKey.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaKey.
+	/// </summary>
+	public class XmlSchemaKey : XmlSchemaIdentityConstraint
+	{
+		public XmlSchemaKey()
+		{
+		}
+	}
+}

+ 26 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaKeyref.cs

@@ -0,0 +1,26 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaKeyref.
+	/// </summary>
+	public class XmlSchemaKeyref : XmlSchemaIdentityConstraint
+	{
+		private XmlQualifiedName refer;
+
+		public XmlSchemaKeyref()
+		{
+		}
+		[XmlAttribute]
+		public XmlQualifiedName Refer 
+		{
+			get{ return  refer; } 
+			set{ refer = value; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaLengthFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaLengthFacet.
+	/// </summary>
+	public class XmlSchemaLengthFacet : XmlSchemaNumericFacet
+	{
+		public XmlSchemaLengthFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxExclusiveFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMaxExclusiveFacet.
+	/// </summary>
+	public class XmlSchemaMaxExclusiveFacet : XmlSchemaFacet
+	{
+		public XmlSchemaMaxExclusiveFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxInclusiveFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMaxInclusiveFacet.
+	/// </summary>
+	public class XmlSchemaMaxInclusiveFacet : XmlSchemaFacet
+	{
+		public XmlSchemaMaxInclusiveFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMaxLengthFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMaxLengthFacet.
+	/// </summary>
+	public class XmlSchemaMaxLengthFacet : XmlSchemaNumericFacet
+	{
+		public XmlSchemaMaxLengthFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinExclusiveFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMinExclusiveFacet.
+	/// </summary>
+	public class XmlSchemaMinExclusiveFacet : XmlSchemaFacet
+	{
+		public XmlSchemaMinExclusiveFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinInclusiveFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMinInclusiveFacet.
+	/// </summary>
+	public class XmlSchemaMinInclusiveFacet : XmlSchemaFacet
+	{
+		public XmlSchemaMinInclusiveFacet()
+		{
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaMinLengthFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaMinLengthFacet.
+	/// </summary>
+	public class XmlSchemaMinLengthFacet : XmlSchemaNumericFacet
+	{
+		public XmlSchemaMinLengthFacet()
+		{
+		}
+	}
+}

+ 39 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaNotation.cs

@@ -0,0 +1,39 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaNotation.
+	/// </summary>
+	public class XmlSchemaNotation : XmlSchemaAnnotated
+	{
+		private string name;
+		private string pub;
+		private string system;
+
+		public XmlSchemaNotation()
+		{
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return  name; } 
+			set{ name = value; }
+		}
+		[XmlAttribute]
+		public string Public 
+		{
+			get{ return  pub; } 
+			set{ pub = value; }
+		}
+		[XmlAttribute]
+		public string System 
+		{
+			get{ return  system; } 
+			set{ system = value; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaNumericFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaNumericFacet.
+	/// </summary>
+	public abstract class XmlSchemaNumericFacet : XmlSchemaFacet
+	{
+		protected XmlSchemaNumericFacet()
+		{
+		}
+	}
+}

+ 47 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObject.cs

@@ -0,0 +1,47 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaObject.
+	/// </summary>
+	public abstract class XmlSchemaObject
+	{
+		private int lineNumber;
+		private int linePosition;
+		private string sourceUri;
+		private XmlSerializerNamespaces namespaces;
+
+		protected XmlSchemaObject()
+		{
+		}
+		[XmlIgnore]
+		public int LineNumber 
+		{ 
+			get{ return lineNumber; } 
+			set{ lineNumber = value; } 
+		}
+		[XmlIgnore]
+		public int LinePosition 
+		{ 
+			get{ return linePosition; } 
+			set{ linePosition = value; } 
+		}
+		[XmlIgnore]
+		public string SourceUri 
+		{ 
+			get{ return sourceUri; } 
+			set{ sourceUri = value; } 
+		}
+		// Undocumented Property
+		[XmlNamespaceDeclarations]
+		public XmlSerializerNamespaces Namespaces 
+		{ 
+			get{ return namespaces; } 
+			set{ namespaces = value; } 
+		}
+	}
+}

+ 80 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectCollection.cs

@@ -0,0 +1,80 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Collections;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaObjectCollection.
+	/// </summary>
+	public class XmlSchemaObjectCollection : System.Collections.CollectionBase
+	{
+		public XmlSchemaObjectCollection()
+		{
+		}
+		[MonoTODO]
+		public XmlSchemaObjectCollection(XmlSchemaObject parent)
+		{
+		}
+
+		// Properties
+		public virtual XmlSchemaObject this[ int index ] 
+		{  
+			get
+			{
+				return (XmlSchemaObject) this.List[index];
+			} 
+			set
+			{
+				this.List[index] = value;
+			}
+		}
+
+		// Methods
+		public int Add(System.Xml.Schema.XmlSchemaObject item)
+		{
+			return this.List.Add(item);
+		}
+		
+		public bool Contains(System.Xml.Schema.XmlSchemaObject item)
+		{
+			return this.List.Contains(item);
+		}
+		
+		public void CopyTo(System.Xml.Schema.XmlSchemaObject[] array, int index)
+		{
+			this.List.CopyTo(array,index);
+		}
+		
+		[MonoTODO]
+		public new XmlSchemaObjectEnumerator GetEnumerator()
+		{
+			return (XmlSchemaObjectEnumerator) new object();
+		}
+		
+		public int IndexOf(System.Xml.Schema.XmlSchemaObject item)
+		{
+			return this.List.IndexOf(item);
+		}
+		
+		public void Insert(int index, System.Xml.Schema.XmlSchemaObject item)
+		{
+			this.List.Insert(index, item);
+		}
+		
+		[MonoTODO]
+		protected override void OnClear(){}
+		[MonoTODO]
+		protected override void OnInsert(int index,object item){}
+		[MonoTODO]
+		protected override void OnRemove(int index,object item){}
+		[MonoTODO]
+		protected override void OnSet(int index,object oldValue,object newValue){}
+
+		public void Remove(System.Xml.Schema.XmlSchemaObject item)
+		{
+			this.List.Remove(item);
+		}
+	}
+}

+ 49 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectEnumerator.cs

@@ -0,0 +1,49 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Collections;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaObjectEnumerator.
+	/// </summary>
+	public sealed class XmlSchemaObjectEnumerator : IEnumerator
+	{
+		private IDictionaryEnumerator xenum;
+		internal XmlSchemaObjectEnumerator(Hashtable htable)
+		{
+			this.xenum = htable.GetEnumerator();
+		}
+		// Properties
+		public XmlSchemaObject Current
+		{ 
+			get
+			{
+				return (XmlSchema) xenum.Current; 
+			}
+		}
+		// Methods
+		public bool MoveNext()
+		{
+			return xenum.MoveNext();
+		}
+		public void Reset()
+		{
+			xenum.Reset();
+		}
+		//Explicit Interface implementation
+		bool IEnumerator.MoveNext()
+		{
+			return xenum.MoveNext();
+		}
+		void IEnumerator.Reset()
+		{
+			xenum.Reset();
+		}
+		object IEnumerator.Current
+		{
+			get{return (XmlSchema) xenum.Current;}
+		}
+	}
+}

+ 46 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectTable.cs

@@ -0,0 +1,46 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Collections;
+using System.Xml;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaObjectTable.
+	/// </summary>
+	public class XmlSchemaObjectTable
+	{
+		private Hashtable table;
+
+		protected XmlSchemaObjectTable()
+		{
+			table = new Hashtable(); 
+		}
+		public int Count 
+		{
+			get{ return table.Count; }
+		}
+		public XmlSchemaObject this[XmlQualifiedName name] 
+		{
+			get{ return (XmlSchemaObject) table[name]; }
+		}
+		public ICollection Names 
+		{
+			get{ return table.Keys; }
+		}
+		public ICollection Values 
+		{
+			get{ return table.Values;}
+		}
+
+		public bool Contains(XmlQualifiedName name)
+		{
+			return table.Contains(name);
+		}
+		public IDictionaryEnumerator GetEnumerator()
+		{
+			return table.GetEnumerator();
+		}
+	}
+}

+ 76 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs

@@ -0,0 +1,76 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaParticle.
+	/// </summary>
+	public abstract class XmlSchemaParticle : XmlSchemaAnnotated
+	{
+		decimal minOccurs, maxOccurs;
+		string  minstr, maxstr;
+
+		protected XmlSchemaParticle()
+		{
+			minOccurs = decimal.One;
+			maxOccurs = decimal.One;
+		}
+		[XmlIgnore]
+		public decimal MaxOccurs 
+		{
+			get{ return  maxOccurs; } 
+			set
+			{
+				if(value >= 0 && (value == Decimal.Truncate(value)))
+					maxOccurs = value;
+				else
+					throw new XmlSchemaException("MaxOccurs must be a non-negative number",null);
+			}
+		}
+		[XmlAttribute]
+		public string MaxOccursString 
+		{
+			get{ return maxstr; }
+			set
+			{
+				if(value == "unbounded")
+				{
+					maxstr = value;
+					maxOccurs = decimal.MaxValue;
+				}
+				else
+				{
+					decimal val = decimal.Parse(value);
+					//Setting through the property
+					MaxOccurs = val;
+					maxstr = value;
+				}
+			}
+		}
+		[XmlIgnore]
+		public decimal MinOccurs
+		{
+			get{ return  minOccurs; }
+			set
+			{
+				if(value >= 0 && (value == Decimal.Truncate(value)))
+					minOccurs = value;
+				else
+					throw new XmlSchemaException("MinOccursString must be a non-negative number",null); 					
+			}
+		}
+		[XmlAttribute]
+		public string MinOccursString
+		{
+			get{ return minstr; }
+			set
+			{
+				MinOccurs = decimal.Parse(value);
+				minstr = value;
+			}
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaPatternFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaPatternFacet.
+	/// </summary>
+	public class XmlSchemaPatternFacet : XmlSchemaFacet
+	{
+		public XmlSchemaPatternFacet()
+		{
+		}
+	}
+}

+ 42 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaRedefine.cs

@@ -0,0 +1,42 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaRedefine.
+	/// </summary>
+	public class XmlSchemaRedefine : XmlSchemaExternal
+	{
+		private XmlSchemaObjectTable attributeGroups;
+		private XmlSchemaObjectTable groups;
+		private XmlSchemaObjectCollection items;
+		private XmlSchemaObjectTable schemaTypes;
+
+		public XmlSchemaRedefine()
+		{
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable AttributeGroups 
+		{
+			get{ return attributeGroups; }
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable Groups 
+		{
+			get{ return groups; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Items 
+		{
+			get{ return items; }
+		}
+		[XmlIgnore]
+		public XmlSchemaObjectTable SchemaTypes 
+		{
+			get{ return schemaTypes; }
+		}
+	}
+}

+ 24 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSequence.cs

@@ -0,0 +1,24 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSequence.
+	/// </summary>
+	public class XmlSchemaSequence : XmlSchemaGroupBase
+	{
+		private XmlSchemaObjectCollection items;
+		public XmlSchemaSequence()
+		{
+			items = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public override XmlSchemaObjectCollection Items 
+		{
+			get{ return items; }
+		}
+	}
+}

+ 25 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContent.cs

@@ -0,0 +1,25 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleContent.
+	/// </summary>
+	public class XmlSchemaSimpleContent : XmlSchemaContentModel
+	{
+		private XmlSchemaContent content;
+
+		public XmlSchemaSimpleContent()
+		{
+		}
+		[XmlElement]
+		public override XmlSchemaContent Content 
+		{
+			get{ return  content; } 
+			set{ content = value; }
+		}
+	}
+}

+ 43 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentExtension.cs

@@ -0,0 +1,43 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleContentExtension.
+	/// </summary>
+	public class XmlSchemaSimpleContentExtension : XmlSchemaContent
+	{
+
+		private XmlSchemaAnyAttribute any;
+		private XmlSchemaObjectCollection attributes;
+		private XmlQualifiedName baseTypeName;
+
+		public XmlSchemaSimpleContentExtension()
+		{
+			baseTypeName = XmlQualifiedName.Empty;
+			attributes	 = new XmlSchemaObjectCollection();
+		}
+
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return  any; }
+			set{ any = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName BaseTypeName 
+		{
+			get{ return  baseTypeName; }
+			set{ baseTypeName = value; }
+		}
+	}
+}

+ 57 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentRestriction.cs

@@ -0,0 +1,57 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleContentRestriction.
+	/// </summary>
+	public class XmlSchemaSimpleContentRestriction : XmlSchemaContent
+	{
+		
+		private XmlSchemaAnyAttribute any;
+		private XmlSchemaObjectCollection attributes;
+		private XmlSchemaSimpleType baseType;
+		private XmlQualifiedName baseTypeName;
+		private XmlSchemaObjectCollection facets;
+
+		public XmlSchemaSimpleContentRestriction()
+		{
+			baseTypeName = XmlQualifiedName.Empty;
+			attributes	 = new XmlSchemaObjectCollection();
+			facets		 = new XmlSchemaObjectCollection();
+		}
+
+		[XmlElement]
+		public XmlSchemaAnyAttribute AnyAttribute 
+		{
+			get{ return  any; }
+			set{ any = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Attributes 
+		{
+			get{ return attributes; }
+		}
+		[XmlElement]
+		public XmlSchemaSimpleType BaseType 
+		{ 
+			get{ return  baseType; } 
+			set{ baseType = value; } 
+		}
+		[XmlAttribute]
+		public XmlQualifiedName BaseTypeName 
+		{
+			get{ return  baseTypeName; }
+			set{ baseTypeName = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Facets 
+		{ 
+			get{ return facets; } 
+		}
+	}
+}

+ 25 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleType.cs

@@ -0,0 +1,25 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleType.
+	/// </summary>
+	public class XmlSchemaSimpleType
+	{
+		private XmlSchemaSimpleTypeContent content;
+
+		public XmlSchemaSimpleType()
+		{
+		}
+		[XmlElement]
+		public XmlSchemaSimpleTypeContent Content
+		{
+			get{ return  content; } 
+			set{ content = value; }
+		}
+	}
+}

+ 17 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeContent.cs

@@ -0,0 +1,17 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleTypeContent.
+	/// </summary>
+	public abstract class XmlSchemaSimpleTypeContent : XmlSchemaAnnotated
+	{
+		protected XmlSchemaSimpleTypeContent()
+		{
+		}
+
+	}
+}

+ 41 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeList.cs

@@ -0,0 +1,41 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleTypeList.
+	/// </summary>
+	public class XmlSchemaSimpleTypeList : XmlSchemaSimpleTypeContent
+	{
+		private XmlSchemaSimpleType itemType;
+		private XmlQualifiedName itemTypeName;
+
+		public XmlSchemaSimpleTypeList()
+		{}
+		[XmlElement]
+		public XmlSchemaSimpleType ItemType 
+		{
+			get{ return itemType; } 
+			set
+			{
+				itemType = value;
+				itemTypeName = null;
+			}
+		}
+		[XmlAttribute]
+		public XmlQualifiedName ItemTypeName 
+		{
+			get{ return itemTypeName; } 
+			set
+			{
+				itemTypeName = value;
+				itemType = null;
+			}
+		}
+	}
+}

+ 40 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs

@@ -0,0 +1,40 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleTypeRestriction.
+	/// </summary>
+	public class XmlSchemaSimpleTypeRestriction : XmlSchemaSimpleTypeContent
+	{
+		private XmlSchemaSimpleType baseType;
+		private XmlQualifiedName baseTypeName;
+		private XmlSchemaObjectCollection facets;
+		public XmlSchemaSimpleTypeRestriction()
+		{
+			facets = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public XmlSchemaSimpleType BaseType 
+		{
+			get{ return  baseType; } 
+			set{ baseType = value; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName BaseTypeName 
+		{
+			get{ return  baseTypeName; } 
+			set{ baseTypeName = value; }
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection Facets 
+		{
+			get{ return facets; }
+		}
+	}
+}

+ 33 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeUnion.cs

@@ -0,0 +1,33 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaSimpleTypeUnion.
+	/// </summary>
+	public class XmlSchemaSimpleTypeUnion : XmlSchemaSimpleTypeContent
+	{
+		private XmlSchemaObjectCollection baseTypes;
+		private XmlQualifiedName[] memberTypes;
+
+		public XmlSchemaSimpleTypeUnion()
+		{
+			baseTypes = new XmlSchemaObjectCollection();
+		}
+		[XmlElement]
+		public XmlSchemaObjectCollection BaseTypes 
+		{
+			get{ return baseTypes; }
+		}
+		[XmlAttribute]
+		public XmlQualifiedName[] MemberTypes 
+		{
+			get{ return  memberTypes; } 
+			set{ memberTypes = value; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaTotalDigitsFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaTotalDigitsFacet.
+	/// </summary>
+	public class XmlSchemaTotalDigitsFacet : XmlSchemaNumericFacet
+	{
+		public XmlSchemaTotalDigitsFacet()
+		{
+		}
+	}
+}

+ 73 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaType.cs

@@ -0,0 +1,73 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml;
+using System.ComponentModel;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaType.
+	/// </summary>
+	public class XmlSchemaType : XmlSchemaAnnotated
+	{
+		private object baseSchemaType;
+		private XmlSchemaDatatype datatype;
+		private XmlSchemaDerivationMethod derivedBy;
+		private XmlSchemaDerivationMethod final;
+		private XmlSchemaDerivationMethod finalResolved;
+		private bool isMixed;
+		private string name;
+		private XmlQualifiedName qName;
+
+		public XmlSchemaType()
+		{
+			final = XmlSchemaDerivationMethod.None;
+		}
+		[XmlIgnore]
+		public object BaseSchemaType 
+		{
+			get{ return  baseSchemaType; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDatatype Datatype 
+		{
+			get{ return datatype; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDerivationMethod DerivedBy 
+		{
+			get{ return derivedBy; }
+		}
+		[DefaultValue(XmlSchemaDerivationMethod.None)]
+		[XmlAttribute]
+		public XmlSchemaDerivationMethod Final 
+		{
+			get{ return  final; }
+			set{ final = value; }
+		}
+		[XmlIgnore]
+		public XmlSchemaDerivationMethod FinalResolved 
+		{
+			get{ return finalResolved; }
+		}
+		[XmlIgnore]
+		public virtual bool IsMixed 
+		{  
+			get{ return  isMixed; }
+			set{ isMixed = value; } 
+		}
+		[XmlAttribute]
+		public string Name 
+		{
+			get{ return name; }
+			set{ name = value; }
+		}
+		[XmlIgnore]
+		public XmlQualifiedName QualifiedName 
+		{
+			get{ return qName; }
+		}
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaUnique.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaUnique.
+	/// </summary>
+	public class XmlSchemaUnique : XmlSchemaIdentityConstraint
+	{
+		public XmlSchemaUnique()
+		{
+		}
+	}
+}

+ 22 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaUse.cs

@@ -0,0 +1,22 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaUse.
+	/// </summary>
+	public enum XmlSchemaUse 
+	{
+		[XmlIgnore]
+		None = 0x00000000, 
+		[XmlEnum]
+		Optional = 0x00000001, 
+		[XmlEnum]
+		Prohibited = 0x00000002, 
+		[XmlEnum]
+		Required = 0x00000003, 
+	}
+}

+ 16 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaWhiteSpaceFacet.cs

@@ -0,0 +1,16 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaWhiteSpaceFacet.
+	/// </summary>
+	public class XmlSchemaWhiteSpaceFacet : XmlSchemaFacet
+	{
+		public XmlSchemaWhiteSpaceFacet()
+		{
+		}
+	}
+}

+ 27 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSchemaXPath.cs

@@ -0,0 +1,27 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+using System.Xml.Serialization;
+using System.ComponentModel;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSchemaXPath.
+	/// </summary>
+	public class XmlSchemaXPath : XmlSchemaAnnotated
+	{
+		private string xpath;
+
+		public XmlSchemaXPath()
+		{
+		}
+		[DefaultValue("")]
+		[XmlAttribute]
+		public string XPath 
+		{
+			get{ return  xpath; } 
+			set{ xpath = value; }
+		}
+	}
+}

+ 15 - 0
mcs/class/System.XML/System.Xml.Schema/XmlSeverityType.cs

@@ -0,0 +1,15 @@
+// Author: Dwivedi, Ajay kumar
+//            [email protected]
+using System;
+
+namespace System.Xml.Schema
+{
+	/// <summary>
+	/// Summary description for XmlSeverityType.
+	/// </summary>
+	public enum XmlSeverityType 
+	{
+		Error = 0x00000000, 
+		Warning = 0x00000001, 
+	}
+}