2002-03-27 Duncan Mak <duncan@ximian.com>
authorDuncan Mak <duncan@mono-cvs.ximian.com>
Wed, 27 Mar 2002 02:06:09 +0000 (02:06 -0000)
committerDuncan Mak <duncan@mono-cvs.ximian.com>
Wed, 27 Mar 2002 02:06:09 +0000 (02:06 -0000)
* *.cs: Updates from Ajay Dwivedi <AjayKumar.Dwivedi@dresdner-bank.com>.

svn path=/trunk/mcs/; revision=3383

46 files changed:
mcs/class/System.XML/System.Xml.Schema/ChangeLog [new file with mode: 0755]
mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAll.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotation.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAny.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnyAttribute.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAppInfo.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttribute.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroup.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaAttributeGroupRef.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaChoice.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollection.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContent.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentExtension.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexType.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaContentProcessing.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDerivationMethod.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDocumentation.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaExternal.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaFacet.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaForm.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroup.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaGroupRef.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaIdentityConstraint.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaImport.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaInclude.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaKeyref.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaNotation.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObject.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectCollection.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaRedefine.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSequence.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContent.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentExtension.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleContentRestriction.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleType.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeList.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeUnion.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaType.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaUse.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaXPath.cs

diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
new file mode 100755 (executable)
index 0000000..07f428e
--- /dev/null
@@ -0,0 +1,3 @@
+2002-03-27  Duncan Mak  <duncan@ximian.com>
+
+       * *.cs: Updates from Ajay Dwivedi <AjayKumar.Dwivedi@dresdner-bank.com>.
\ No newline at end of file
index d2e9fa10717aa4045d88aa780bf8a09896553d2e..e5c021bbdb0a33a015f9783aad3784f8d2e543da 100755 (executable)
@@ -1,7 +1,5 @@
 // Author: Dwivedi, Ajay kumar\r
 //            Adwiv@Yahoo.com\r
-// Author: Dwivedi, Ajay kumar\r
-//            Adwiv@Yahoo.com\r
 using System;\r
 using System.Xml;\r
 using System.IO;\r
@@ -13,11 +11,13 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchema.\r
        /// </summary>\r
-       [XmlRoot\r
+       [XmlRoot("schema",Namespace="http://www.w3.org/2001/XMLSchema")]\r
        public class XmlSchema : XmlSchemaObject\r
        {\r
                //public constants\r
+               [XmlIgnore]\r
                public const string InstanceNamespace = "http://www.w3.org/2001/XMLSchema-instance";\r
+               [XmlIgnore]\r
                public const string Namespace = "http://www.w3.org/2001/XMLSchema";\r
 \r
                //private fields\r
@@ -37,8 +37,8 @@ namespace System.Xml.Schema
                private XmlSchemaObjectTable schemaTypes ;\r
                private string targetNamespace ;\r
                private XmlAttribute[] unhandledAttributes ;\r
-               private string version ;\r
-\r
+               private string version;\r
+               private string language;\r
 \r
                public XmlSchema()\r
                {\r
@@ -50,108 +50,150 @@ namespace System.Xml.Schema
                        isCompiled                      = false;\r
                        items                           = new XmlSchemaObjectCollection();\r
                }\r
+\r
+               #region Properties\r
+\r
                [DefaultValue(XmlSchemaForm.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("attributeFormDefault")]\r
                public XmlSchemaForm AttributeFormDefault \r
                {\r
                        get{ return attributeFormDefault; }\r
                        set{ this.attributeFormDefault = value;}\r
                }\r
+\r
                [XmlIgnore]\r
                public XmlSchemaObjectTable AttributeGroups \r
                {\r
                        get{ return attributeGroups; }\r
                }\r
+               \r
                [XmlIgnore]\r
                public XmlSchemaObjectTable Attributes \r
                {\r
                        get{ return attributes;}\r
                }\r
+               \r
                [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("blockDefault")]\r
                public XmlSchemaDerivationMethod BlockDefault \r
                {\r
                        get{ return blockDefault;}\r
                        set{ blockDefault = value;}\r
                }\r
+               \r
                [DefaultValue(XmlSchemaForm.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("elementFormDefault")]\r
                public XmlSchemaForm ElementFormDefault \r
                {\r
                        get{ return elementFormDefault;}\r
                        set{ elementFormDefault = value;}\r
                }\r
+\r
                [XmlIgnore]\r
                public XmlSchemaObjectTable Elements \r
                {\r
                        get{ return elements;}\r
                }\r
+\r
                [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("finalDefault")]\r
                public XmlSchemaDerivationMethod FinalDefault \r
                {\r
                        get{ return finalDefault;}\r
                        set{ finalDefault = value;}\r
                }\r
+\r
                [XmlIgnore]\r
                public XmlSchemaObjectTable Groups \r
                {\r
                        get{ return groups;}\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("id")]\r
                public string Id \r
                {\r
                        get{ return id;}\r
                        set{ id = value;}\r
                }\r
-               [XmlElement]\r
+               \r
+               [XmlElement("include",typeof(XmlSchemaInclude),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("import",typeof(XmlSchemaImport),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("redefine",typeof(XmlSchemaRedefine),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Includes \r
                {\r
                        get{ return includes;}\r
                }\r
+               \r
                [XmlIgnore]\r
                public bool IsCompiled \r
                {\r
                        get{ return isCompiled;}\r
                }\r
-               [XmlElement]\r
+               \r
+               [XmlElement("simpleType",typeof(XmlSchemaSimpleType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("complexType",typeof(XmlSchemaComplexType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("group",typeof(XmlSchemaGroup),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               //Only Schema's attributeGroup has type XmlSchemaAttributeGroup.\r
+               //Others (complextype, restrictions etc) must have XmlSchemaAttributeGroupRef\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroup),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("element",typeof(XmlSchemaElement),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("notation",typeof(XmlSchemaNotation),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("annotation",typeof(XmlSchemaAnnotation),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Items \r
                {\r
                        get{ return items;}\r
                }\r
+               \r
                [XmlIgnore]\r
                public XmlSchemaObjectTable Notations \r
                {\r
                        get{ return notations;}\r
                }\r
+               \r
                [XmlIgnore]\r
                public XmlSchemaObjectTable SchemaTypes \r
                {\r
                        get{ return schemaTypes;}\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("targetNamespace")]\r
                public string TargetNamespace \r
                {\r
                        get{ return targetNamespace;}\r
                        set{ targetNamespace = value;}\r
                }\r
+               \r
                [XmlAnyAttribute]\r
                public XmlAttribute[] UnhandledAttributes \r
                {\r
                        get{ return unhandledAttributes;}\r
                        set{ unhandledAttributes = value;}\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("version")]\r
                public string Version \r
                {\r
                        get{ return version;}\r
                        set{ version = value;}\r
                }\r
 \r
+               // New attribute defined in W3C schema element\r
+               [System.Xml.Serialization.XmlAttribute("xml:lang")]\r
+               public string Language\r
+               {\r
+                       get{ return  language; }\r
+                       set{ language = value; }\r
+               }\r
+\r
+               #endregion\r
+\r
                // Methods\r
                [MonoTODO]\r
-               public void Compile(System.Xml.Schema.ValidationEventHandler validationEventHandler)\r
+               public void Compile(ValidationEventHandler validationEventHandler)\r
                {\r
+                       attributeGroups = null;\r
+\r
                }\r
 \r
                public static XmlSchema Read(TextReader reader, ValidationEventHandler validationEventHandler)\r
@@ -162,19 +204,54 @@ namespace System.Xml.Schema
                {\r
                        return Read(new XmlTextReader(stream),validationEventHandler);\r
                }\r
+               //<ToBeRemoved>\r
+               private static void Serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e)\r
+               {\r
+                       Console.WriteLine("Unknown Attribute");\r
+                       Console.WriteLine("\t" + e.Attr.Name + " " + e.Attr.InnerXml);\r
+                       Console.WriteLine("\t LineNumber: " + e.LineNumber);\r
+                       Console.WriteLine("\t LinePosition: " + e.LinePosition);\r
+               }\r
+               private static void Serializer_UnknownElement(object sender, XmlElementEventArgs e)\r
+               {\r
+                       Console.WriteLine("Unknown Element");\r
+                       Console.WriteLine("\t" + e.Element.Name + " " + e.Element.InnerXml);\r
+                       Console.WriteLine("\t LineNumber: " + e.LineNumber);\r
+                       Console.WriteLine("\t LinePosition: " + e.LinePosition);\r
+               }\r
+               private static void Serializer_UnknownNode(object sender, XmlNodeEventArgs e)\r
+               {\r
+                       Console.WriteLine("Unknown Node");\r
+                       Console.WriteLine("\t" + e.Name + " " + e.Text);\r
+                       Console.WriteLine("\t LineNumber: " + e.LineNumber);\r
+                       Console.WriteLine("\t LinePosition: " + e.LinePosition);\r
+               }\r
+               private static void Serializer_UnknownAttribute(object sender, UnreferencedObjectEventArgs e)\r
+               {\r
+                       Console.WriteLine("Unknown");\r
+                       Console.WriteLine("\t" + e.UnreferencedId);\r
+                       Console.WriteLine("\t" + e.UnreferencedObject);\r
+               }\r
+               //</ToBeRemoved>\r
                [MonoTODO]\r
                public static XmlSchema Read(XmlReader reader, ValidationEventHandler validationEventHandler)\r
                {\r
-                       return null;\r
+                       XmlSerializer xser = new XmlSerializer(typeof(XmlSchema));\r
+                       //<ToBeRemoved>\r
+                       xser.UnknownAttribute +=  new XmlAttributeEventHandler(Serializer_UnknownAttribute);\r
+                       xser.UnknownElement +=  new XmlElementEventHandler(Serializer_UnknownElement);\r
+                       xser.UnknownNode +=  new XmlNodeEventHandler(Serializer_UnknownNode);\r
+                       xser.UnreferencedObject +=  new UnreferencedObjectEventHandler(Serializer_UnknownAttribute);\r
+                       //</ToBeRemoved>\r
+                       return (XmlSchema) xser.Deserialize(reader);\r
                }\r
-\r
                public void Write(System.IO.Stream stream)\r
                {\r
-                       Write(new XmlTextWriter(stream,null),null);\r
+                       Write(stream,null);\r
                }\r
                public void Write(System.IO.TextWriter writer)\r
                {\r
-                       Write(new XmlTextWriter(writer),null);\r
+                       Write(writer,null);\r
                }\r
                public void Write(System.Xml.XmlWriter writer)\r
                {\r
@@ -186,11 +263,41 @@ namespace System.Xml.Schema
                }\r
                public void Write(System.IO.TextWriter writer, System.Xml.XmlNamespaceManager namespaceManager)\r
                {\r
-                       Write(new XmlTextWriter(writer),namespaceManager);\r
+                       XmlTextWriter xwriter = new XmlTextWriter(writer);\r
+                       // This is why the Write was not writing schema with line breaks\r
+                       xwriter.Formatting = Formatting.Indented;\r
+                       Write(xwriter,namespaceManager);\r
                }\r
                [MonoTODO]\r
                public void Write(System.Xml.XmlWriter writer, System.Xml.XmlNamespaceManager namespaceManager)\r
                {\r
+                       XmlSerializerNamespaces xns;\r
+                       \r
+                       if(Namespaces != null)\r
+                       {\r
+                               xns = new XmlSerializerNamespaces(this.Namespaces);\r
+                       }\r
+                       else\r
+                       {\r
+                               xns = new XmlSerializerNamespaces();\r
+                       }\r
+\r
+                       if(namespaceManager != null)\r
+                       {\r
+                               foreach(string name in namespaceManager)\r
+                               {\r
+                                       //xml and xmlns namespaced are added by default in namespaceManager. \r
+                                       //So we should ignore them\r
+                                       if(name!="xml" && name != "xmlns")\r
+                                               xns.Add(name,namespaceManager.LookupNamespace(name));\r
+                               }\r
+                       }\r
+                       \r
+                       this.Namespaces = xns;\r
+                       \r
+                       XmlSerializer xser = new XmlSerializer(typeof(XmlSchema));\r
+                       xser.Serialize(writer,this,xns);\r
+                       writer.Flush();\r
                }\r
        }\r
 }\r
index 63951b717548c7b1ef850d60243a82404294738d..c5b1d1c27901e068e2443a44a178a43d922c7f74 100755 (executable)
@@ -15,7 +15,7 @@ namespace System.Xml.Schema
                {\r
                        items = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+               [XmlElement("element",typeof(XmlSchemaElement),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public override XmlSchemaObjectCollection Items \r
                {\r
                        get{ return items; }\r
index b5ced7daf040f41157066f90203a7fef00be3c92..ab179dcdd0ac3f1730433d1767af8b2d83fa8caa 100755 (executable)
@@ -9,6 +9,21 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchemaAnnotated.\r
        /// </summary>\r
+       // Include all childrens of this class\r
+//     [XmlInclude(typeof(XmlSchemaAnyAttribute)),\r
+//     XmlInclude(typeof(XmlSchemaAttribute)),\r
+//     XmlInclude(typeof(XmlSchemaAttributeGroup)),\r
+//     XmlInclude(typeof(XmlSchemaAttributeGroupRef)),\r
+//     XmlInclude(typeof(XmlSchemaContent)),\r
+//     XmlInclude(typeof(XmlSchemaContentModel)),\r
+//     XmlInclude(typeof(XmlSchemaFacet)),\r
+//     XmlInclude(typeof(XmlSchemaGroup)),\r
+//     XmlInclude(typeof(XmlSchemaIdentityConstraint)),\r
+//     XmlInclude(typeof(XmlSchemaNotation)),\r
+//     XmlInclude(typeof(XmlSchemaParticle)),\r
+//     XmlInclude(typeof(XmlSchemaSimpleTypeContent)),\r
+//     XmlInclude(typeof(XmlSchemaType)),\r
+//     XmlInclude(typeof(XmlSchemaXPath))]\r
        public class XmlSchemaAnnotated : XmlSchemaObject\r
        {\r
                private XmlSchemaAnnotation annotation;\r
@@ -17,18 +32,21 @@ namespace System.Xml.Schema
 \r
                public XmlSchemaAnnotated()\r
                {}\r
-               [XmlElement]\r
+               \r
+               [XmlElement("annotation",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnnotation Annotation \r
                { \r
-                       get{ return this.annotation; } \r
-                       set{ this.annotation = value; } \r
+                       get{ return  annotation; } \r
+                       set{ annotation = value; } \r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("id")]\r
                public string Id \r
                { \r
-                       get{ return this.id; } \r
+                       get{ return  id; } \r
                        set{ id = value; } \r
                }\r
+               \r
                [XmlAnyAttribute]\r
                public XmlAttribute[] UnhandledAttributes \r
                { \r
index a543ff28da402161395311632723cc4423e698e5..3b53f03a616df2070e1aa6d7273b68556b59a3f2 100755 (executable)
@@ -17,18 +17,23 @@ namespace System.Xml.Schema
 \r
                public XmlSchemaAnnotation()\r
                {\r
+                       items = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("id")]\r
                public string Id \r
                {\r
                        get{ return  id; } \r
                        set{ id = value; }\r
                }\r
-               [XmlElement]\r
-               public XmlSchemaObjectCollection Items \r
+               \r
+               [XmlElement("appinfo",typeof(XmlSchemaAppInfo),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("documentation",typeof(XmlSchemaDocumentation),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaObjectCollection Items\r
                {\r
                        get{ return items; }\r
                }\r
+               \r
                [XmlAnyAttribute]\r
                public XmlAttribute[] UnhandledAttributes \r
                {\r
index bc9ad5d1128decc6261aa7738845027946d8fe3e..80ce461990217e9e6f9d5d396f3dffd0f5978b23 100755 (executable)
@@ -17,17 +17,18 @@ namespace System.Xml.Schema
                public XmlSchemaAny()\r
                {\r
                        nameSpace = string.Empty;\r
-                       processing = XmlSchemaContentProcessing.Strict;\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("namespace")]\r
                public string Namespace \r
                {\r
                        get{ return  nameSpace; } \r
                        set{ nameSpace = value; }\r
                }\r
-               [DefaultValue(XmlSchemaContentProcessing.Strict)]\r
-               [XmlAttribute]\r
-               public XmlSchemaContentProcessing ProcessContents \r
+               \r
+               [DefaultValue(XmlSchemaContentProcessing.None)]\r
+               [System.Xml.Serialization.XmlAttribute("processContents")]\r
+               public XmlSchemaContentProcessing ProcessContents\r
                { \r
                        get{ return processing; } \r
                        set{ processing = value; }\r
index 4dcb06abb59e64302994fd287b9f014242f828a2..6392c84ebb0be993985619097edddbf6c8b9ef03 100755 (executable)
@@ -12,22 +12,22 @@ namespace System.Xml.Schema
        public class XmlSchemaAnyAttribute : XmlSchemaAnnotated\r
        {\r
                private string nameSpace;\r
-               public XmlSchemaContentProcessing processing;\r
+               private XmlSchemaContentProcessing processing;\r
 \r
                public XmlSchemaAnyAttribute()\r
                {\r
                        nameSpace = string.Empty;\r
-                       this.processing = XmlSchemaContentProcessing.Strict;\r
                }\r
 \r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("namespace")]\r
                public string Namespace \r
                { \r
                        get{ return nameSpace; } \r
                        set{ nameSpace = value; } \r
                }\r
-               [DefaultValue(XmlSchemaContentProcessing.Strict)]\r
-               [XmlAttribute]\r
+               \r
+               [DefaultValue(XmlSchemaContentProcessing.None)]\r
+               [System.Xml.Serialization.XmlAttribute("processContents")]\r
                public XmlSchemaContentProcessing ProcessContents \r
                { \r
                        get{ return processing; } \r
index 504be4e66cb59800d95a223e780718c465f81c73..ae060eb723849b4fc64c01b902c73de28f9cd6c2 100755 (executable)
@@ -26,7 +26,8 @@ namespace System.Xml.Schema
                        get{ return  markup; }\r
                        set{ markup = value; }\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("source")]\r
                public string Source \r
                {\r
                        get{ return  source; } \r
index 48a67f0234bdd04c8b0cfb39630a397ed8e5aef1..41b122de80a35dbf8536f35dab4c1cf2e866b2bd 100755 (executable)
@@ -27,7 +27,7 @@ namespace System.Xml.Schema
                {\r
                        //FIXME: Docs says the default is optional.\r
                        //Whereas the MS implementation has default None.\r
-                       use = XmlSchemaUse.Optional;\r
+                       use = XmlSchemaUse.None;\r
                        qualifiedName = XmlQualifiedName.Empty;\r
                        refName = XmlQualifiedName.Empty;\r
                }\r
@@ -38,9 +38,9 @@ namespace System.Xml.Schema
                { //FIXME: This is not correct. Is it?\r
                        get{ return attributeType; }\r
                }\r
-               //FIXME: what is the default value?\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+\r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("default")]\r
                public string DefaultValue \r
                {\r
                        get{ return defaultValue;}\r
@@ -50,8 +50,9 @@ namespace System.Xml.Schema
                                defaultValue = value;\r
                        }\r
                }\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+\r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("fixed")]\r
                public string FixedValue \r
                {\r
                        get{ return fixedValue;}\r
@@ -61,14 +62,16 @@ namespace System.Xml.Schema
                                fixedValue = value;\r
                        }\r
                }\r
+\r
                [DefaultValue(XmlSchemaForm.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("form")]\r
                public XmlSchemaForm Form \r
                {\r
                        get{ return form;}\r
                        set{ form = value;}\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return name;}\r
@@ -84,7 +87,7 @@ namespace System.Xml.Schema
                        get{ return qualifiedName;}\r
                }\r
 \r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("ref")]\r
                public XmlQualifiedName RefName \r
                {\r
                        get{ return refName;}\r
@@ -94,20 +97,23 @@ namespace System.Xml.Schema
                                refName = value; \r
                        }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("simpleType",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaSimpleType SchemaType \r
                {\r
                        get{ return schemaType;}\r
                        set{ schemaType = value;}\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("type")]\r
                public XmlQualifiedName SchemaTypeName \r
                {\r
                        get{ return schemaTypeName;}\r
                        set{ schemaTypeName = value;}\r
                }\r
-               [DefaultValue(XmlSchemaUse.Optional)]\r
-               [XmlAttribute]\r
+\r
+               [DefaultValue(XmlSchemaUse.None)]\r
+               [System.Xml.Serialization.XmlAttribute("use")]\r
                public XmlSchemaUse Use \r
                {\r
                        get{ return use;}\r
index a01edc0db7ed102866d23d852e21d49af8b393fd..1a8795e354d3523c6a22a1011660c5fa470c6565 100755 (executable)
@@ -21,23 +21,28 @@ namespace System.Xml.Schema
                        //FIXME:\r
                        redefined  = this;\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return any;}\r
                        set{ any = value;}\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes;}\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return name;}\r
                        set{ name = value;}\r
                }\r
+\r
                //Undocumented property\r
                [XmlIgnore]\r
                public XmlSchemaAttributeGroup RedefinedAttributeGroup \r
index a129cc031bbf112a7c7e8f9fb828b1d8b915d4fb..371f30fe0ae27398860696acace17e0889c70205 100755 (executable)
@@ -16,14 +16,11 @@ namespace System.Xml.Schema
                public XmlSchemaAttributeGroupRef()\r
                {}\r
                \r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("ref")]\r
                public XmlQualifiedName RefName \r
                {\r
-                       get{ return refName;}\r
-                       set\r
-                       {\r
-                               refName = value; \r
-                       }\r
+                       get{ return  refName; }\r
+                       set{ refName = value; }\r
                }\r
        }\r
 }\r
index e208d1c73fd674788255c8f3ed6deb7f53f3d33b..372f6b5ffdfdad421e580553f3d320a3571a8ce4 100755 (executable)
@@ -15,7 +15,12 @@ namespace System.Xml.Schema
                {\r
                        items = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("element",typeof(XmlSchemaElement),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("group",typeof(XmlSchemaGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("any",typeof(XmlSchemaAny),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public override XmlSchemaObjectCollection Items \r
                {\r
                        get{ return items; }\r
index 71c2aad390cae30676fcc69f901d86746d6ec303..68e1c6b4f7ec97c347eef47c2dad2a500c3ab26c 100755 (executable)
@@ -84,11 +84,11 @@ namespace System.Xml.Schema
                {\r
                        return this.htable.Contains(ns);\r
                }\r
-               public bool Contains(System.Xml.Schema.XmlSchema schema)\r
+               public bool Contains(XmlSchema schema)\r
                {\r
                        return this.htable.Contains(schema.TargetNamespace); \r
                }\r
-               public void CopyTo(System.Xml.Schema.XmlSchema[] array, int index)\r
+               public void CopyTo(XmlSchema[] array, int index)\r
                {\r
 \r
                }\r
index 5a3adc5406756861eae5b9226416881d9b79788c..e66cde088b20c0532886fc88addba7d6e16f8cef 100755 (executable)
@@ -14,15 +14,17 @@ namespace System.Xml.Schema
                private bool isMixed;\r
 \r
                public XmlSchemaComplexContent()\r
-               {\r
-               }\r
-               [XmlElement]\r
+               {}\r
+\r
+               [XmlElement("restriction",typeof(XmlSchemaComplexContentRestriction),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("extension",typeof(XmlSchemaComplexContentExtension),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public override XmlSchemaContent Content \r
                {\r
                        get{ return  content; } \r
                        set{ content = value; }\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("mixed")]\r
                public bool IsMixed \r
                {\r
                        get{ return  isMixed; } \r
index 5e4f0b003652e3695d06fa5579928288acaa889c..95e4d2c50951323d699c08a65fea5762e50a8a83 100755 (executable)
@@ -19,24 +19,31 @@ namespace System.Xml.Schema
                {\r
                        attributes = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("base")]\r
+               public XmlQualifiedName BaseTypeName \r
+               {\r
+                       get{ return  baseTypeName; }\r
+                       set{ baseTypeName = value; }\r
+               }\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return any; }\r
                        set{ any = value;}\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes; }\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName BaseTypeName \r
-               {\r
-                       get{ return  baseTypeName; }\r
-                       set{ baseTypeName = value; }\r
-               }\r
-               [XmlElement]\r
+\r
+               [XmlElement("group",typeof(XmlSchemaGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("all",typeof(XmlSchemaAll),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaParticle Particle\r
                {\r
                        get{ return  particle; }\r
index ab221f458329fffc1782463e457bdea673228dcf..043704b55f3110bce71756893ed7eb1b1b84da29 100755 (executable)
@@ -9,7 +9,7 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchemaComplexContentRestriction.\r
        /// </summary>\r
-       public class XmlSchemaComplexContentRestriction\r
+       public class XmlSchemaComplexContentRestriction : XmlSchemaContent\r
        {\r
                private XmlSchemaAnyAttribute any;\r
                private XmlSchemaObjectCollection attributes;\r
@@ -22,24 +22,31 @@ namespace System.Xml.Schema
                        attributes       = new XmlSchemaObjectCollection();\r
                }\r
 \r
-               [XmlElement]\r
+               [System.Xml.Serialization.XmlAttribute("base")]\r
+               public XmlQualifiedName BaseTypeName \r
+               {\r
+                       get{ return  baseTypeName; }\r
+                       set{ baseTypeName = value; }\r
+               }\r
+\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return  any; }\r
                        set{ any = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes; }\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName BaseTypeName \r
-               {\r
-                       get{ return  baseTypeName; }\r
-                       set{ baseTypeName = value; }\r
-               }\r
-               [XmlElement]\r
+\r
+               [XmlElement("group",typeof(XmlSchemaGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("all",typeof(XmlSchemaAll),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaParticle Particle \r
                {\r
                        get{ return  particle; }\r
index e38bc25cfe9547d2e27ec2ac5bd59740bd704fa3..76821253c8321f4d9f81f182c90e73fe921fd094 100755 (executable)
@@ -27,20 +27,72 @@ namespace System.Xml.Schema
 \r
                public XmlSchemaComplexType()\r
                {\r
+                       attributes = new XmlSchemaObjectCollection();\r
                        block = XmlSchemaDerivationMethod.None;\r
                }\r
 \r
-               [XmlElement]\r
+               #region Attributes\r
+\r
+               [DefaultValue(XmlSchemaDerivationMethod.None)]\r
+               [System.Xml.Serialization.XmlAttribute("block")]\r
+               public XmlSchemaDerivationMethod Block\r
+               {\r
+                       get{ return  block; }\r
+                       set{ block = value; }\r
+               }\r
+               [DefaultValue(false)]\r
+               [System.Xml.Serialization.XmlAttribute("abstract")]\r
+               public bool IsAbstract \r
+               {\r
+                       get{ return  isAbstract; }\r
+                       set{ isAbstract = value; }\r
+               }\r
+               [DefaultValue(false)]\r
+               [System.Xml.Serialization.XmlAttribute("mixed")]\r
+               public override bool IsMixed\r
+               {\r
+                       get{ return  isMixed; }\r
+                       set{ isMixed = value; }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region Elements\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return  anyAttribute; }\r
                        set{ anyAttribute = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes; }\r
                }\r
+               \r
+               [XmlElement("simpleContent",typeof(XmlSchemaSimpleContent),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("complexContent",typeof(XmlSchemaComplexContent),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaContentModel ContentModel \r
+               {\r
+                       get{ return  contentModel; } \r
+                       set{ contentModel = value; }\r
+               }\r
+\r
+               [XmlElement("group",typeof(XmlSchemaGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("all",typeof(XmlSchemaAll),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaParticle Particle \r
+               {\r
+                       get{ return  particle; } \r
+                       set{ particle = value; }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region XmlIgnore\r
                [XmlIgnore]\r
                public XmlSchemaObjectTable AttributeUses \r
                {\r
@@ -51,24 +103,11 @@ namespace System.Xml.Schema
                {\r
                        get{ return attributeWildcard; }\r
                }\r
-               [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
-               public XmlSchemaDerivationMethod Block \r
-               {\r
-                       get{ return  block; }\r
-                       set{ block = value; }\r
-               }\r
                [XmlIgnore]\r
                public XmlSchemaDerivationMethod BlockResolved \r
                {\r
                        get{ return blockResolved; }\r
                }\r
-               [XmlElement]\r
-               public XmlSchemaContentModel ContentModel \r
-               {\r
-                       get{ return  contentModel; } \r
-                       set{ contentModel = value; }\r
-               }\r
                [XmlIgnore]\r
                public XmlSchemaContentType ContentType \r
                {\r
@@ -79,25 +118,6 @@ namespace System.Xml.Schema
                {\r
                        get{ return contentTypeParticle; }\r
                }\r
-               [DefaultValue(true)]\r
-               [XmlAttribute]\r
-               public bool IsAbstract \r
-               {\r
-                       get{ return  isAbstract; }\r
-                       set{ isAbstract = value; }\r
-               }\r
-               [DefaultValue(true)]\r
-               [XmlAttribute]\r
-               public override bool IsMixed\r
-               {\r
-                       get{ return  isMixed; }\r
-                       set{ isMixed = value; }\r
-               }\r
-               [XmlElement]\r
-               public XmlSchemaParticle Particle \r
-               {\r
-                       get{ return  particle; } \r
-                       set{ particle = value; }\r
-               }\r
+               #endregion\r
        }\r
 }\r
index 2f4b9b6248b6b985ac746d361a7a1f63b44ed5c1..2cd60231a0373ecc568bf0fd0f9e021406585590 100755 (executable)
@@ -12,11 +12,11 @@ namespace System.Xml.Schema
        {\r
                [XmlIgnore]\r
                None    = 0,\r
-               [XmlEnum]\r
+               [XmlEnum("skip")]\r
                Skip    = 1,\r
-               [XmlEnum]\r
+               [XmlEnum("lax")]\r
                Lax             = 2, \r
-               [XmlEnum]\r
+               [XmlEnum("strict")]\r
                Strict  = 3, \r
        }\r
 }\r
index e4d498d8521fd7a8623dc2a43bcfbcf8ed74a003..4f2fba2da5a22f332de6790d662bd7fa184f4e21 100755 (executable)
@@ -11,19 +11,19 @@ namespace System.Xml.Schema
        [Flags]\r
        public enum XmlSchemaDerivationMethod\r
        {\r
-               [XmlEnum]\r
+               [XmlEnum("empty")]\r
                Empty           = 0x00000000, \r
-               [XmlEnum]\r
+               [XmlEnum("substitution")]\r
                Substitution= 0x00000001, \r
-               [XmlEnum]\r
+               [XmlEnum("extension")]\r
                Extension       = 0x00000002, \r
-               [XmlEnum]\r
+               [XmlEnum("restriction")]\r
                Restriction     = 0x00000004, \r
-               [XmlEnum]\r
+               [XmlEnum("list")]\r
                List            = 0x00000008, \r
-               [XmlEnum]\r
+               [XmlEnum("union")]\r
                Union           = 0x00000010, \r
-               [XmlEnum]\r
+               [XmlEnum("#all")]\r
                All                     = 0x000000FF,\r
                [XmlIgnore]\r
                None            = 0x00000100, \r
index 2ad0790c9067fec47173e074555c1b5dab47f7cc..183ffbab19318a1ade9775656f82b5920095aac8 100755 (executable)
@@ -19,12 +19,7 @@ namespace System.Xml.Schema
                {\r
                        source = string.Empty;\r
                }\r
-               [XmlAttribute]\r
-               public string Language \r
-               {\r
-                       get{ return  language; }\r
-                       set{ language = value; }\r
-               }\r
+\r
                [XmlAnyElement]\r
                [XmlText]\r
                public XmlNode[] Markup \r
@@ -32,11 +27,19 @@ namespace System.Xml.Schema
                        get{ return  markup; }\r
                        set{ markup = value; }\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("source")]\r
                public string Source \r
                {\r
                        get{ return  source; } \r
                        set{ source = value; }\r
                }\r
+\r
+               [System.Xml.Serialization.XmlAttribute("xml:lang")]\r
+               public string Language \r
+               {\r
+                       get{ return  language; }\r
+                       set{ language = value; }\r
+               }\r
        }\r
 }\r
index 2e946d694f8c1683e5780ec43d48c58e7c94d0d1..fd859cbc6a3145b51f10cacbf384ed3497a4b16e 100755 (executable)
@@ -33,117 +33,146 @@ namespace System.Xml.Schema
                public XmlSchemaElement()\r
                {\r
                        block = XmlSchemaDerivationMethod.None;\r
-                       constraints = new XmlSchemaObjectCollection();\r
                        final = XmlSchemaDerivationMethod.None;\r
-                       finalResolved = XmlSchemaDerivationMethod.None;\r
-                       name = string.Empty;\r
+                       constraints = new XmlSchemaObjectCollection();\r
                        qName = XmlQualifiedName.Empty;\r
                        substitutionGroup = XmlQualifiedName.Empty;\r
                }\r
+\r
+               #region Attributes\r
+               \r
+               [DefaultValue(false)]\r
+               [System.Xml.Serialization.XmlAttribute("abstract")]\r
+               public bool IsAbstract \r
+               {\r
+                       get{ return  isAbstract; }\r
+                       set{ isAbstract = value; }\r
+               }\r
+\r
                [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("block")]\r
                public XmlSchemaDerivationMethod Block \r
                {\r
                        get{ return  block; }\r
                        set{ block = value; }\r
                }\r
-               [XmlIgnore]\r
-               public XmlSchemaDerivationMethod BlockResolved \r
-               {\r
-                       get{ return blockResolved; }\r
-               }\r
-               [XmlElement]\r
-               public XmlSchemaObjectCollection Constraints \r
-               {\r
-                       get{ return constraints; }\r
-               }\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+               \r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("default")]\r
                public string DefaultValue \r
                {\r
                        get{ return  defaultValue; }\r
                        set{ defaultValue = value; }\r
                }\r
-               [XmlIgnore]\r
-               public object ElementType \r
-               {\r
-                       get{ return elementType; }\r
-               }\r
+               \r
                [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("final")]\r
                public XmlSchemaDerivationMethod Final \r
                {\r
                        get{ return  final; }\r
                        set{ final = value; }\r
                }\r
-               [XmlIgnore]\r
-               public XmlSchemaDerivationMethod FinalResolved \r
-               {\r
-                       get{ return finalResolved; }\r
-               }\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+\r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("fixed")]\r
                public string FixedValue \r
                {\r
                        get{ return  fixedValue; }\r
                        set{ fixedValue = value; }\r
                }\r
                [DefaultValue(XmlSchemaForm.None)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("form")]\r
                public XmlSchemaForm Form \r
                {\r
                        get{ return  form; }\r
                        set{ form = value; }\r
                }\r
-               [DefaultValue(true)]\r
-               [XmlAttribute]\r
-               public bool IsAbstract \r
-               {\r
-                       get{ return  isAbstract; }\r
-                       set{ isAbstract = value; }\r
-               }\r
+\r
                [DefaultValue(false)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("nillable")]\r
                public bool IsNillable \r
                {\r
                        get{ return  isNillable; }\r
                        set{ isNillable = value; }\r
                }\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+\r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return  name; }\r
                        set{ name = value; }\r
                }\r
-               [XmlIgnore]\r
-               public XmlQualifiedName QualifiedName \r
-               {\r
-                       get{ return qName; }\r
-               }\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("ref")]\r
                public XmlQualifiedName RefName \r
                {\r
                        get{ return  refName; }\r
                        set{ refName = value;}\r
                }\r
-               [XmlElement]\r
-               public XmlSchemaType SchemaType \r
-               {\r
-                       get{ return  schemaType; }\r
-                       set{ schemaType = value; }\r
-               }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("type")]\r
                public XmlQualifiedName SchemaTypeName \r
                {\r
                        get{ return  schemaTypeName; }\r
                        set{ schemaTypeName = value; }\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName SubstitutionGroup \r
+\r
+               [System.Xml.Serialization.XmlAttribute("substitutionGroup")]\r
+               public XmlQualifiedName SubstitutionGroup\r
                {\r
                        get{ return  substitutionGroup; }\r
                        set{ substitutionGroup = value; }\r
                }\r
+\r
+\r
+               #endregion\r
+\r
+               #region Elements\r
+               \r
+               [XmlElement("unique",typeof(XmlSchemaUnique),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("key",typeof(XmlSchemaKey),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("keyref",typeof(XmlSchemaKeyref),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaObjectCollection Constraints \r
+               {\r
+                       get{ return constraints; }\r
+               }\r
+\r
+               [XmlElement("simpleType",typeof(XmlSchemaSimpleType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("complexType",typeof(XmlSchemaComplexType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaType SchemaType \r
+               {\r
+                       get{ return  schemaType; }\r
+                       set{ schemaType = value; }\r
+               }\r
+               \r
+               #endregion\r
+\r
+               #region XmlIgnore\r
+               [XmlIgnore]\r
+               public XmlSchemaDerivationMethod BlockResolved \r
+               {\r
+                       get{ return blockResolved; }\r
+               }\r
+\r
+               [XmlIgnore]\r
+               public object ElementType \r
+               {\r
+                       get{ return elementType; }\r
+               }\r
+               \r
+               [XmlIgnore]\r
+               public XmlSchemaDerivationMethod FinalResolved \r
+               {\r
+                       get{ return finalResolved; }\r
+               }\r
+\r
+               [XmlIgnore]\r
+               public XmlQualifiedName QualifiedName \r
+               {\r
+                       get{ return qName; }\r
+               }\r
+\r
+\r
+               #endregion\r
        }\r
 }\r
index 35fe954e742bce512f7e9101493c34acbabe2275..2f65395e84c26eeb817bdd145edf3683158cb222 100755 (executable)
@@ -17,21 +17,23 @@ namespace System.Xml.Schema
                private XmlAttribute[] unhandledAttributes;\r
 \r
                protected XmlSchemaExternal()\r
-               {\r
-               }\r
-               [XmlAttribute]\r
+               {}\r
+\r
+               [System.Xml.Serialization.XmlAttribute("id")]\r
                public string Id \r
                {\r
                        get{ return  id; }\r
                        set{ id = value; }\r
                }\r
+\r
                [XmlIgnore]\r
                public XmlSchema Schema \r
                {\r
                        get{ return  schema; }\r
                        set{ schema = value; }\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("schemaLocation")]\r
                public string SchemaLocation \r
                {\r
                        get{ return  location; } \r
index 7f139de7f63157a3801a8ac7a0d51526adb50d52..ed684395714faaac085e4a3dafdbd12ac8d320fa 100755 (executable)
@@ -20,14 +20,14 @@ namespace System.Xml.Schema
                        val = string.Empty;\r
                }\r
                [DefaultValue(false)]\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("fixed")]\r
                public virtual bool IsFixed \r
                {\r
                        get{ return  isFixed; }\r
                        set{ isFixed = value; }\r
                }\r
-               [XmlAttribute]\r
-               public string Value \r
+               [System.Xml.Serialization.XmlAttribute("value")]\r
+               public string Value\r
                {\r
                        get{ return  val; } \r
                        set{ val = value; }\r
index 766e3a072e967b0c3e96cba910faaf412867da91..8efb7e3d5483d5564bb08f98b575007a0b18c93e 100755 (executable)
@@ -11,9 +11,9 @@ namespace System.Xml.Schema
        {\r
                [XmlIgnore]\r
                None = 0x00000000, \r
-               [XmlEnum]\r
+               [XmlEnum("qualified")]\r
                Qualified = 0x00000001, \r
-               [XmlEnum]\r
+               [XmlEnum("unqualified")]\r
                Unqualified = 0x00000002, \r
        }\r
 }\r
index 5e2d7a16a35a267ef0a38d65deebfa77f5d62480..f7abc1f13b40a2f7b2fc29079b4e50eca6d5b3f2 100755 (executable)
@@ -15,15 +15,18 @@ namespace System.Xml.Schema
 \r
                public XmlSchemaGroup()\r
                {\r
-                       name = string.Empty;\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return  name; } \r
                        set{ name = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("all",typeof(XmlSchemaAll),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaGroupBase Particle\r
                {\r
                        get{ return  particle; }\r
index 081acf1ea122dfaf2a95ee1f70ed6625a710d1b7..f8b73c6f34a098eec06c85709ee8f7a699b79171 100755 (executable)
@@ -21,7 +21,7 @@ namespace System.Xml.Schema
                {\r
                        get{ return particle; }\r
                }\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("ref")]\r
                public XmlQualifiedName RefName \r
                {\r
                        get{ return  refName; } \r
index 5865dd976aa7440c0a3d0806104efc21f8787402..f7e20a7c1843f91a7b542964409481e74c1e1c60 100755 (executable)
@@ -21,27 +21,31 @@ namespace System.Xml.Schema
                        fields = new XmlSchemaObjectCollection();\r
                        qName = XmlQualifiedName.Empty;\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("field",typeof(XmlSchemaXPath),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Fields \r
                {\r
                        get{ return fields; }\r
                }\r
-               [XmlAttribute]\r
+\r
+               [XmlElement("selector",typeof(XmlSchemaXPath),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               public XmlSchemaXPath Selector \r
+               {\r
+                       get{ return  selector; } \r
+                       set{ selector = value; }\r
+               }\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return  name; } \r
                        set{ name = value; }\r
                }\r
+               \r
                [XmlIgnore]\r
                public XmlQualifiedName QualifiedName \r
                {\r
                        get{ return  qName; }\r
                }\r
-               [XmlElement]\r
-               public XmlSchemaXPath Selector \r
-               {\r
-                       get{ return  selector; } \r
-                       set{ selector = value; }\r
-               }\r
        }\r
 }\r
index 6ef493456d299ea39fa7b6729a12e50ea00eec38..82798cacaf9c7f8b0e05d2e1f485e8281db4fa28 100755 (executable)
@@ -15,13 +15,15 @@ namespace System.Xml.Schema
                public XmlSchemaImport()\r
                {\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("annotation",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnnotation Annotation \r
                {\r
                        get{ return  annotation; } \r
                        set{ annotation = value; }\r
                }\r
-               [XmlAttribute]\r
+               \r
+               [System.Xml.Serialization.XmlAttribute("namespace")]\r
                public string Namespace \r
                {\r
                        get{ return  nameSpace; } \r
index 095518b9169913e36bf8c4bd8a76bbc6de4e0351..405af045a0b9053894dd05b559faa9fc8b87be94 100755 (executable)
@@ -14,7 +14,7 @@ namespace System.Xml.Schema
                public XmlSchemaInclude()\r
                {\r
                }\r
-               [XmlElement]\r
+               [XmlElement("annotation",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnnotation Annotation \r
                {\r
                        get{ return  annotation; } \r
index d9785ac11587b3857f075f799f38e16d7abdb958..cc3a06792ed97c81a5a6e8304adc39288344caf0 100755 (executable)
@@ -16,8 +16,9 @@ namespace System.Xml.Schema
                public XmlSchemaKeyref()\r
                {\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName Refer \r
+\r
+               [System.Xml.Serialization.XmlAttribute("refer")]\r
+               public XmlQualifiedName Refer\r
                {\r
                        get{ return  refer; } \r
                        set{ refer = value; }\r
index daa90211f04721da9abb1918c3336100de59ab54..2320a909d6b166039259f658d86f406320961828 100755 (executable)
@@ -17,19 +17,19 @@ namespace System.Xml.Schema
                public XmlSchemaNotation()\r
                {\r
                }\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
                public string Name \r
                {\r
                        get{ return  name; } \r
                        set{ name = value; }\r
                }\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("public")]\r
                public string Public \r
                {\r
                        get{ return  pub; } \r
                        set{ pub = value; }\r
                }\r
-               [XmlAttribute]\r
+               [System.Xml.Serialization.XmlAttribute("system")]\r
                public string System \r
                {\r
                        get{ return  system; } \r
index 01f4d3ef3151db1554bb1f4dca48ceb963469451..b0485a2a519c199769da3b0a5011ba912b79871f 100755 (executable)
@@ -8,6 +8,12 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchemaObject.\r
        /// </summary>\r
+//     [XmlInclude(typeof(XmlSchema)),\r
+//     XmlInclude(typeof(XmlSchemaAnnotated)),\r
+//     XmlInclude(typeof(XmlSchemaAnnotation)),\r
+//     XmlInclude(typeof(XmlSchemaAppInfo)),\r
+//     XmlInclude(typeof(XmlSchemaDocumentation)),\r
+//     XmlInclude(typeof(XmlSchemaExternal))]\r
        public abstract class XmlSchemaObject\r
        {\r
                private int lineNumber;\r
@@ -36,6 +42,7 @@ namespace System.Xml.Schema
                        get{ return sourceUri; } \r
                        set{ sourceUri = value; } \r
                }\r
+\r
                // Undocumented Property\r
                [XmlNamespaceDeclarations]\r
                public XmlSerializerNamespaces Namespaces \r
index f9ffd7c3eebc4e9a89f0901a0cf1ee0ffad47339..dade4c20cd4c64030891dbffb6f46096adcaa101 100755 (executable)
@@ -10,12 +10,14 @@ namespace System.Xml.Schema
        /// </summary>\r
        public class XmlSchemaObjectCollection : System.Collections.CollectionBase\r
        {\r
+               private XmlSchemaObject parent;\r
+\r
                public XmlSchemaObjectCollection()\r
                {\r
                }\r
-               [MonoTODO]\r
                public XmlSchemaObjectCollection(XmlSchemaObject parent)\r
                {\r
+                       this.parent = parent;\r
                }\r
 \r
                // Properties\r
@@ -32,17 +34,17 @@ namespace System.Xml.Schema
                }\r
 \r
                // Methods\r
-               public int Add(System.Xml.Schema.XmlSchemaObject item)\r
+               public int  Add(XmlSchemaObject item)\r
                {\r
                        return this.List.Add(item);\r
                }\r
                \r
-               public bool Contains(System.Xml.Schema.XmlSchemaObject item)\r
+               public bool Contains(XmlSchemaObject item)\r
                {\r
                        return this.List.Contains(item);\r
                }\r
                \r
-               public void CopyTo(System.Xml.Schema.XmlSchemaObject[] array, int index)\r
+               public void CopyTo(XmlSchemaObject[] array, int index)\r
                {\r
                        this.List.CopyTo(array,index);\r
                }\r
@@ -53,12 +55,12 @@ namespace System.Xml.Schema
                        return (XmlSchemaObjectEnumerator) new object();\r
                }\r
                \r
-               public int IndexOf(System.Xml.Schema.XmlSchemaObject item)\r
+               public int IndexOf(XmlSchemaObject item)\r
                {\r
                        return this.List.IndexOf(item);\r
                }\r
                \r
-               public void Insert(int index, System.Xml.Schema.XmlSchemaObject item)\r
+               public void Insert(int index, XmlSchemaObject item)\r
                {\r
                        this.List.Insert(index, item);\r
                }\r
@@ -72,7 +74,7 @@ namespace System.Xml.Schema
                [MonoTODO]\r
                protected override void OnSet(int index,object oldValue,object newValue){}\r
 \r
-               public void Remove(System.Xml.Schema.XmlSchemaObject item)\r
+               public void Remove(XmlSchemaObject item)\r
                {\r
                        this.List.Remove(item);\r
                }\r
index 714920440ed390770ec77796c7a4b9f3aa6b3742..2a3f38b86b8b211cd6a18cab48c64aedcbf80070 100755 (executable)
@@ -18,59 +18,80 @@ namespace System.Xml.Schema
                        minOccurs = decimal.One;\r
                        maxOccurs = decimal.One;\r
                }\r
-               [XmlIgnore]\r
-               public decimal MaxOccurs \r
+\r
+               #region Attributes\r
+\r
+               [System.Xml.Serialization.XmlAttribute("maxOccurs")]\r
+               public string MaxOccursString\r
                {\r
-                       get{ return  maxOccurs; } \r
+                       get{ return maxstr; }\r
                        set\r
                        {\r
-                               if(value >= 0 && (value == Decimal.Truncate(value)))\r
-                                       maxOccurs = value;\r
+                               if(value == "unbounded")\r
+                               {\r
+                                       maxstr = value;\r
+                                       maxOccurs = decimal.MaxValue;\r
+                               }\r
                                else\r
-                                       throw new XmlSchemaException("MaxOccurs must be a non-negative number",null);\r
+                               {\r
+                                       decimal val = decimal.Parse(value);\r
+                                       if(val >= 0 && (val == Decimal.Truncate(val)))\r
+                                       {\r
+                                               maxOccurs = val;\r
+                                               maxstr = value;\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               throw new XmlSchemaException\r
+                                                       ("MaxOccurs must be a non-negative integer",null);\r
+                                       }\r
+                               }\r
                        }\r
                }\r
-               [XmlAttribute]\r
-               public string MaxOccursString \r
+\r
+               [System.Xml.Serialization.XmlAttribute("minOccurs")]\r
+               public string MinOccursString\r
                {\r
-                       get{ return maxstr; }\r
+                       get{ return minstr; }\r
                        set\r
                        {\r
-                               if(value == "unbounded")\r
+                               decimal val = decimal.Parse(value);\r
+                               if(val >= 0 && (val == Decimal.Truncate(val)))\r
                                {\r
-                                       maxstr = value;\r
-                                       maxOccurs = decimal.MaxValue;\r
+                                       minOccurs = val;\r
+                                       minstr   = value;\r
                                }\r
                                else\r
                                {\r
-                                       decimal val = decimal.Parse(value);\r
-                                       //Setting through the property\r
-                                       MaxOccurs = val;\r
-                                       maxstr = value;\r
+                                       throw new XmlSchemaException\r
+                                               ("MinOccursString must be a non-negative number",null);                                         \r
                                }\r
                        }\r
                }\r
+\r
+               #endregion\r
+\r
+               #region XmlIgnore\r
+\r
                [XmlIgnore]\r
-               public decimal MinOccurs\r
+               public decimal MaxOccurs \r
                {\r
-                       get{ return  minOccurs; }\r
+                       get{ return  maxOccurs; } \r
                        set\r
                        {\r
-                               if(value >= 0 && (value == Decimal.Truncate(value)))\r
-                                       minOccurs = value;\r
-                               else\r
-                                       throw new XmlSchemaException("MinOccursString must be a non-negative number",null);                                     \r
+                               MaxOccursString = value.ToString();\r
                        }\r
                }\r
-               [XmlAttribute]\r
-               public string MinOccursString\r
+\r
+               [XmlIgnore]\r
+               public decimal MinOccurs\r
                {\r
-                       get{ return minstr; }\r
+                       get{ return  minOccurs; }\r
                        set\r
                        {\r
-                               MinOccurs = decimal.Parse(value);\r
-                               minstr = value;\r
+                               MinOccursString = value.ToString();\r
                        }\r
                }\r
+               #endregion\r
        }\r
 }
\ No newline at end of file
index b2286808de8ea202d16dfe55845e97b07fc25697..29c358207a0ad68d15005d90daa51e40f728d81f 100755 (executable)
@@ -28,7 +28,12 @@ namespace System.Xml.Schema
                {\r
                        get{ return groups; }\r
                }\r
-               [XmlElement]\r
+               [XmlElement("annotation",typeof(XmlSchemaAnnotation),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("simpleType",typeof(XmlSchemaSimpleType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("complexType",typeof(XmlSchemaComplexType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("group",typeof(XmlSchemaGroup),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               //NOTE: AttributeGroup and not AttributeGroupRef\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroup),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Items \r
                {\r
                        get{ return items; }\r
index 01ebfaea3dbbe6ed1331e2a36bf129d46b1eefe7..66295e2d2b1a2fdfcd22548e13dca23909bb5a02 100755 (executable)
@@ -15,7 +15,12 @@ namespace System.Xml.Schema
                {\r
                        items = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("element",typeof(XmlSchemaElement),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("group",typeof(XmlSchemaGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("choice",typeof(XmlSchemaChoice),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("sequence",typeof(XmlSchemaSequence),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("any",typeof(XmlSchemaAny),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public override XmlSchemaObjectCollection Items \r
                {\r
                        get{ return items; }\r
index 5ebe049603022e9c85656fbf3189d504bfdabaf5..827a37075c34e468eae3853f3c406ed4b303463c 100755 (executable)
@@ -15,7 +15,9 @@ namespace System.Xml.Schema
                public XmlSchemaSimpleContent()\r
                {\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("restriction",typeof(XmlSchemaSimpleContentRestriction),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("extension",typeof(XmlSchemaSimpleContentExtension),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public override XmlSchemaContent Content \r
                {\r
                        get{ return  content; } \r
index 3e6fa8292d377922737310746025ecd50c8335b7..eacb8c5bf166f786c19aa959945e59c0e7f62a7b 100755 (executable)
@@ -22,18 +22,21 @@ namespace System.Xml.Schema
                        attributes       = new XmlSchemaObjectCollection();\r
                }\r
 \r
-               [XmlElement]\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return  any; }\r
                        set{ any = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes; }\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("base")]\r
                public XmlQualifiedName BaseTypeName \r
                {\r
                        get{ return  baseTypeName; }\r
index c173a3aa72e39b4cd86c0e9a0bc921fb08b28311..98e6bb7afd1a74971a18c3a511089f06651eba21 100755 (executable)
@@ -25,30 +25,47 @@ namespace System.Xml.Schema
                        facets           = new XmlSchemaObjectCollection();\r
                }\r
 \r
-               [XmlElement]\r
+               [System.Xml.Serialization.XmlAttribute("base")]\r
+               public XmlQualifiedName BaseTypeName \r
+               {\r
+                       get{ return  baseTypeName; }\r
+                       set{ baseTypeName = value; }\r
+               }\r
+\r
+               [XmlElement("anyAttribute",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaAnyAttribute AnyAttribute \r
                {\r
                        get{ return  any; }\r
                        set{ any = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("attribute",typeof(XmlSchemaAttribute),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("attributeGroup",typeof(XmlSchemaAttributeGroupRef),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Attributes \r
                {\r
                        get{ return attributes; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("simpleType",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaSimpleType BaseType \r
                { \r
                        get{ return  baseType; } \r
                        set{ baseType = value; } \r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName BaseTypeName \r
-               {\r
-                       get{ return  baseTypeName; }\r
-                       set{ baseTypeName = value; }\r
-               }\r
-               [XmlElement]\r
+               \r
+               \r
+               [XmlElement("minExclusive",typeof(XmlSchemaMinExclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("minInclusive",typeof(XmlSchemaMinInclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")] \r
+               [XmlElement("maxExclusive",typeof(XmlSchemaMaxExclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("maxInclusive",typeof(XmlSchemaMaxInclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("totalDigits",typeof(XmlSchemaTotalDigitsFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("fractionDigits",typeof(XmlSchemaFractionDigitsFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("length",typeof(XmlSchemaLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("minLength",typeof(XmlSchemaMinLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("maxLength",typeof(XmlSchemaMaxLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("enumeration",typeof(XmlSchemaEnumerationFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("whiteSpace",typeof(XmlSchemaWhiteSpaceFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("pattern",typeof(XmlSchemaPatternFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Facets \r
                { \r
                        get{ return facets; } \r
index 2171964b1098df65a640e25cf20d3fee62e94831..cd4ffaf62b6ed9e040e3d060a06d32c483bb4cc5 100755 (executable)
@@ -8,14 +8,17 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchemaSimpleType.\r
        /// </summary>\r
-       public class XmlSchemaSimpleType\r
+       public class XmlSchemaSimpleType : XmlSchemaType\r
        {\r
                private XmlSchemaSimpleTypeContent content;\r
 \r
                public XmlSchemaSimpleType()\r
                {\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("restriction",typeof(XmlSchemaSimpleTypeRestriction),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("list",typeof(XmlSchemaSimpleTypeList),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("union",typeof(XmlSchemaSimpleTypeUnion),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaSimpleTypeContent Content\r
                {\r
                        get{ return  content; } \r
index ff476b812139f0bab237d13b0402e5c0419a444e..560e3551ebaad7db1f767a3365d1e127794b73dd 100755 (executable)
@@ -17,7 +17,8 @@ namespace System.Xml.Schema
 \r
                public XmlSchemaSimpleTypeList()\r
                {}\r
-               [XmlElement]\r
+\r
+               [XmlElement("simpleType",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaSimpleType ItemType \r
                {\r
                        get{ return itemType; } \r
@@ -27,8 +28,9 @@ namespace System.Xml.Schema
                                itemTypeName = null;\r
                        }\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName ItemTypeName \r
+\r
+               [System.Xml.Serialization.XmlAttribute("itemType")]\r
+               public XmlQualifiedName ItemTypeName\r
                {\r
                        get{ return itemTypeName; } \r
                        set\r
index 65bee4c64b993f7964f9c702d71833e1cab4e138..fb764b71b2e7304fe91815387fd0895e5445aa7b 100755 (executable)
@@ -19,19 +19,33 @@ namespace System.Xml.Schema
                {\r
                        facets = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("simpleType",Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaSimpleType BaseType \r
                {\r
                        get{ return  baseType; } \r
                        set{ baseType = value; }\r
                }\r
-               [XmlAttribute]\r
+\r
+               [System.Xml.Serialization.XmlAttribute("base")]\r
                public XmlQualifiedName BaseTypeName \r
                {\r
                        get{ return  baseTypeName; } \r
                        set{ baseTypeName = value; }\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("minExclusive",typeof(XmlSchemaMinExclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("minInclusive",typeof(XmlSchemaMinInclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")] \r
+               [XmlElement("maxExclusive",typeof(XmlSchemaMaxExclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("maxInclusive",typeof(XmlSchemaMaxInclusiveFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("totalDigits",typeof(XmlSchemaTotalDigitsFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("fractionDigits",typeof(XmlSchemaFractionDigitsFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("length",typeof(XmlSchemaLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("minLength",typeof(XmlSchemaMinLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("maxLength",typeof(XmlSchemaMaxLengthFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("enumeration",typeof(XmlSchemaEnumerationFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("whiteSpace",typeof(XmlSchemaWhiteSpaceFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
+               [XmlElement("pattern",typeof(XmlSchemaPatternFacet),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection Facets \r
                {\r
                        get{ return facets; }\r
index 1dffd3e9f258373b79ed8954c43d4f4019143805..bca18331f88025d00b52b282ec64380b331aa535 100755 (executable)
@@ -18,13 +18,15 @@ namespace System.Xml.Schema
                {\r
                        baseTypes = new XmlSchemaObjectCollection();\r
                }\r
-               [XmlElement]\r
+\r
+               [XmlElement("simpleType",typeof(XmlSchemaSimpleType),Namespace="http://www.w3.org/2001/XMLSchema")]\r
                public XmlSchemaObjectCollection BaseTypes \r
                {\r
                        get{ return baseTypes; }\r
                }\r
-               [XmlAttribute]\r
-               public XmlQualifiedName[] MemberTypes \r
+\r
+               [System.Xml.Serialization.XmlAttribute("memberTypes")]\r
+               public XmlQualifiedName[] MemberTypes\r
                {\r
                        get{ return  memberTypes; } \r
                        set{ memberTypes = value; }\r
index 3536547682614c90eb83074b125c1a2a5ddad5a1..24009448e245f336dea527c9cc355cdfa40b4383 100755 (executable)
@@ -10,6 +10,7 @@ namespace System.Xml.Schema
        /// <summary>\r
        /// Summary description for XmlSchemaType.\r
        /// </summary>\r
+       [XmlInclude(typeof(XmlSchemaSimpleType))]\r
        public class XmlSchemaType : XmlSchemaAnnotated\r
        {\r
                private object baseSchemaType;\r
@@ -25,6 +26,24 @@ namespace System.Xml.Schema
                {\r
                        final = XmlSchemaDerivationMethod.None;\r
                }\r
+\r
+               #region Attributes\r
+               [System.Xml.Serialization.XmlAttribute("name")]\r
+               public string Name \r
+               {\r
+                       get{ return name; }\r
+                       set{ name = value; }\r
+               }\r
+               [DefaultValue(XmlSchemaDerivationMethod.None)]\r
+               [System.Xml.Serialization.XmlAttribute("final")]\r
+               public XmlSchemaDerivationMethod Final \r
+               {\r
+                       get{ return  final; }\r
+                       set{ final = value; }\r
+               }\r
+               #endregion\r
+\r
+               #region XmlIgnore\r
                [XmlIgnore]\r
                public object BaseSchemaType \r
                {\r
@@ -40,13 +59,6 @@ namespace System.Xml.Schema
                {\r
                        get{ return derivedBy; }\r
                }\r
-               [DefaultValue(XmlSchemaDerivationMethod.None)]\r
-               [XmlAttribute]\r
-               public XmlSchemaDerivationMethod Final \r
-               {\r
-                       get{ return  final; }\r
-                       set{ final = value; }\r
-               }\r
                [XmlIgnore]\r
                public XmlSchemaDerivationMethod FinalResolved \r
                {\r
@@ -58,16 +70,11 @@ namespace System.Xml.Schema
                        get{ return  isMixed; }\r
                        set{ isMixed = value; } \r
                }\r
-               [XmlAttribute]\r
-               public string Name \r
-               {\r
-                       get{ return name; }\r
-                       set{ name = value; }\r
-               }\r
                [XmlIgnore]\r
                public XmlQualifiedName QualifiedName \r
                {\r
                        get{ return qName; }\r
                }\r
+               #endregion\r
        }\r
 }\r
index c71039195bc0b74d18065db4a8c075fefcbde696..8015edd8ed298ff4ff5d157c7637d13b64a44473 100755 (executable)
@@ -12,11 +12,11 @@ namespace System.Xml.Schema
        {\r
                [XmlIgnore]\r
                None = 0x00000000, \r
-               [XmlEnum]\r
+               [XmlEnum("optional")]\r
                Optional = 0x00000001, \r
-               [XmlEnum]\r
+               [XmlEnum("prohibited")]\r
                Prohibited = 0x00000002, \r
-               [XmlEnum]\r
+               [XmlEnum("required")]\r
                Required = 0x00000003, \r
        }\r
 }\r
index 1831be27fd2e1336361812ba82efd38a0cbcc77a..6f3d7c77c19ab1fff26ec98f7bf2032b3b8ec1c7 100755 (executable)
@@ -16,8 +16,8 @@ namespace System.Xml.Schema
                public XmlSchemaXPath()\r
                {\r
                }\r
-               [DefaultValue("")]\r
-               [XmlAttribute]\r
+               [DefaultValue(null)]\r
+               [System.Xml.Serialization.XmlAttribute("xpath")]\r
                public string XPath \r
                {\r
                        get{ return  xpath; } \r