2004-11-25 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 26 Nov 2004 02:47:17 +0000 (02:47 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 26 Nov 2004 02:47:17 +0000 (02:47 -0000)
* XmlSchemaElement.cs,
  XmlSchemaComplexType.cs,
  XmlSchema.cs,
  XmlSchemaChoice.cs,
  XmlSchemaSimpleType.cs,
  XmlSchemaObjectTable.cs,
  XmlSchemaObjectCollection.cs,
  XmlSchemaCollection.cs,
  : All changes are just for warning removal.

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

mcs/class/System.XML/System.Xml.Schema/ChangeLog
mcs/class/System.XML/System.Xml.Schema/XmlSchema.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/XmlSchemaComplexType.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaElement.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectCollection.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaObjectTable.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleType.cs

index e9398db1baa0848d8349c719e0e154ee661478a1..3e4001877788e9083586cc11ebdde18ef5167376 100755 (executable)
@@ -1,3 +1,15 @@
+2004-11-25  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XmlSchemaElement.cs,
+         XmlSchemaComplexType.cs,
+         XmlSchema.cs,
+         XmlSchemaChoice.cs,
+         XmlSchemaSimpleType.cs,
+         XmlSchemaObjectTable.cs,
+         XmlSchemaObjectCollection.cs,
+         XmlSchemaCollection.cs,
+         : All changes are just for warning removal.
+
 2004-11-24  Atsushi Enomoto <atsushi@ximian.com>
 
        * XmlSchemaDatatype.cs : added ParseValue() override.
index 005f76ebe68ff1762747bb8ddb5023e838cc58a7..69f70630e087d3f141be55a8ed75768d9974f920 100755 (executable)
@@ -63,7 +63,6 @@ namespace System.Xml.Schema
                private string targetNamespace ;
                private XmlAttribute[] unhandledAttributes ;
                private string version;
-               private string language;
 
                // other post schema compilation infoset
                private Hashtable idCollection;
@@ -267,7 +266,6 @@ namespace System.Xml.Schema
                ///             3. id must be of type ID
                ///             4. targetNamespace should be any uri
                ///             5. version should be a normalizedString
-               ///             6. xml:lang should be a language
                /// </remarks>
                public void Compile (ValidationEventHandler handler)
                {
@@ -341,8 +339,6 @@ namespace System.Xml.Schema
                        if (!XmlSchemaUtil.CheckNormalizedString(Version))
                                error(handler, Version + "is not a valid value for version attribute of schema");
 
-                       //6. xml:lang must be a language (removed)
-
                        // Compile the content of this schema
 
                        compilationItems = new XmlSchemaObjectCollection ();
@@ -712,9 +708,6 @@ namespace System.Xml.Schema
                                        case "version":
                                                schema.version = reader.Value;
                                                break;
-                                       case "xml:lang":
-                                               schema.language = reader.Value;
-                                               break;
                                        default:
                                                if((reader.NamespaceURI == "" && reader.Name != "xmlns") || reader.NamespaceURI == XmlSchema.Namespace)
                                                        error(h, reader.Name + " attribute is not allowed in schema element",null);
index eb3dda8bfce776e7bc6343ad6565766e3440b282..907080eb7cf0a1e79a1c2db0a01d0f387feaf398 100755 (executable)
@@ -198,7 +198,7 @@ namespace System.Xml.Schema
                                return true;\r
 \r
                        if (pd != null) {\r
-                               XmlSchemaElement el = pd as XmlSchemaElement;\r
+//                             XmlSchemaElement el = pd as XmlSchemaElement;\r
                                XmlSchemaParticle pdx = pd;\r
 //                             if (el != null && el.SubstitutingElements.Count > 0)\r
 //                                     pdx = el.SubstitutingChoice;\r
index 4f7aa31318e67ccdabffba5f41f07f4e513149d2..1f360d0723b2adb386e0d500fd4a21ce506a0016 100755 (executable)
@@ -135,7 +135,6 @@ namespace System.Xml.Schema
                        if (!schema.IsCompiled)
                                return null;
 
-                       string ns = GetSafeNs (schema.TargetNamespace);
                        lock (schemaSet) {
                                // consider imported schemas.
                                schemaSet.Add (schema.Schemas);
index 63438e4b090df3fc8451e9ae9441f305118e757d..69666fe3060e14821ed5459da4554164ae926557 100755 (executable)
@@ -323,17 +323,13 @@ namespace System.Xml.Schema
                                        error(h,"attributes, particles or anyattribute is not allowed if ContentModel is present");\r
                                errorCount += contentModel.Compile (h, schema);\r
 \r
-                               XmlQualifiedName baseTypeName = null;\r
                                XmlSchemaSimpleContent smodel = ContentModel as XmlSchemaSimpleContent;\r
                                if(smodel != null)\r
                                {\r
                                        XmlSchemaSimpleContentExtension sscx = smodel.Content as XmlSchemaSimpleContentExtension;\r
-                                       if (sscx != null)\r
-                                               baseTypeName = sscx.BaseTypeName;\r
-                                       else {\r
+                                       if (sscx == null) {\r
                                                XmlSchemaSimpleContentRestriction sscr = smodel.Content as XmlSchemaSimpleContentRestriction;\r
                                                if (sscr != null) {\r
-                                                       baseTypeName = sscr.BaseTypeName;\r
                                                        if (sscr.BaseType != null) {\r
                                                                sscr.BaseType.Compile (h, schema);\r
                                                                BaseXmlSchemaTypeInternal = sscr.BaseType;\r
@@ -341,20 +337,6 @@ namespace System.Xml.Schema
                                                }\r
                                        }\r
                                }\r
-                               else\r
-                               {\r
-                                       XmlSchemaComplexContent cmodel = (XmlSchemaComplexContent) ContentModel;\r
-                                       XmlSchemaComplexContentExtension sccx = cmodel.Content as XmlSchemaComplexContentExtension;\r
-                                       if (sccx != null) {\r
-                                               baseTypeName = sccx.BaseTypeName;\r
-                                       }\r
-                                       else {\r
-                                               XmlSchemaComplexContentRestriction sccr = (XmlSchemaComplexContentRestriction) cmodel.Content;\r
-                                               if (sccr != null) {\r
-                                                       baseTypeName = sccr.BaseTypeName;\r
-                                               }\r
-                                       }\r
-                               }\r
                        }\r
                        else\r
                        {\r
@@ -760,7 +742,7 @@ namespace System.Xml.Schema
                                        // do nothing for particle.\r
                                }\r
                                // otherwise, it might be missing sub components.\r
-                               else if (baseType == null && !schema.IsNamespaceAbsent (BaseSchemaTypeName.Namespace))// && schema.Schemas [baseTypeName.Namespace] != null)\r
+                               else if (baseType == null && !schema.IsNamespaceAbsent (BaseSchemaTypeName.Namespace))\r
                                        error (h, "Referenced base schema type " + BaseSchemaTypeName + " was not found in the corresponding schema.");\r
 \r
                                // 3.4.3 Complex Type Definition Representation OK :: 2.\r
index 9ccb00f4a0d65383513c47985897194b9cdb8751..3130423f8dc5a8b6263e69c9969c8b3a60898ac6 100755 (executable)
@@ -63,7 +63,7 @@ namespace System.Xml.Schema
                private XmlQualifiedName qName;\r
                private XmlSchemaDerivationMethod blockResolved;\r
                private XmlSchemaDerivationMethod finalResolved;\r
-               private XmlSchemaParticle substChoice;\r
+//             private XmlSchemaParticle substChoice;\r
                private XmlSchemaElement referencedElement;\r
                private ArrayList substitutingElements = new ArrayList ();\r
                private XmlSchemaElement substitutionGroupElement;\r
@@ -92,7 +92,7 @@ namespace System.Xml.Schema
 //                     parentIsSchema = false; ... it is set in Schema's Compile()\r
                        blockResolved = XmlSchemaDerivationMethod.None;\r
                        finalResolved = XmlSchemaDerivationMethod.None;\r
-                       substChoice = null;\r
+//                     substChoice = null;\r
                        referencedElement = null;\r
                        substitutingElements.Clear ();\r
                        substitutionGroupElement = null;\r
@@ -567,7 +567,7 @@ namespace System.Xml.Schema
                                XmlSchemaChoice choice = new XmlSchemaChoice ();\r
                                choice.MinOccurs = MinOccurs;\r
                                choice.MaxOccurs = MaxOccurs;\r
-                               substChoice = choice;\r
+//                             substChoice = choice;\r
                                choice.Compile (null, schema); // compute Validated Min/Max Occurs.\r
                                XmlSchemaElement item = this.MemberwiseClone () as XmlSchemaElement;\r
                                item.MinOccurs = 1;\r
index 14a4a4d7331c7f1a3a0a9835c73d92b3f605bd6b..9748825a2521d1fcfe18c3807343e0e74d7e5616 100755 (executable)
@@ -31,14 +31,16 @@ namespace System.Xml.Schema
        /// </summary>\r
        public class XmlSchemaObjectCollection : System.Collections.CollectionBase\r
        {\r
-               private XmlSchemaObject parent;\r
+//             private XmlSchemaObject parent;\r
 \r
                public XmlSchemaObjectCollection()\r
                {\r
                }\r
+\r
                public XmlSchemaObjectCollection(XmlSchemaObject parent)\r
                {\r
-                       this.parent = parent;\r
+                       // FIXME: how is it used publicly?\r
+//                     this.parent = parent;\r
                }\r
 \r
                // Properties\r
index f4db39d45f032a1b0aa5044b43cca23a3f5a6937..601f4fa21f9f6de7df65297e9aff94aeb1cfbdfe 100755 (executable)
@@ -86,10 +86,8 @@ namespace System.Xml.Schema
                {\r
                        private IDictionaryEnumerator xenum;\r
                        IEnumerable tmp;\r
-                       XmlSchemaObjectTable table;\r
                        internal XmlSchemaObjectTableEnumerator (XmlSchemaObjectTable table)\r
                        {\r
-                               this.table = table;\r
                                tmp = (IEnumerable) table.table;\r
                                xenum = (IDictionaryEnumerator) tmp.GetEnumerator ();\r
                        }\r
index f660e8d9a02216a7b5a55ac8ab1ffb8d60ce869c..75d33c15ff5d03ebe99eee80e970a3e34ca91747 100755 (executable)
@@ -440,8 +440,8 @@ namespace System.Xml.Schema
                                // TODO: 1.3 facet restriction valid.
                                break;
                        case XmlSchemaDerivationMethod.List:
+                               /*\r
                                XmlSchemaSimpleTypeList thisList = Content as XmlSchemaSimpleTypeList;
-                               /*
                                // 2.1 item list type not allowed
                                if (baseSimpleType != null && baseSimpleType.resolvedDerivedBy == XmlSchemaDerivationMethod.List)
                                        error (h, "Base list schema type is not allowed.");