Reformat changes, and add some small debugging information to catch errors
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchemaComplexContent.cs
index c11dd9813f80dead8309dcb207a83b1cf59d5ab5..45b07b3b1f008023d39970c006b6ae6105507c17 100755 (executable)
@@ -18,6 +18,13 @@ namespace System.Xml.Schema
                public XmlSchemaComplexContent()\r
                {}\r
 \r
+               [System.Xml.Serialization.XmlAttribute("mixed")]\r
+               public bool IsMixed \r
+               {\r
+                       get{ return  isMixed; } \r
+                       set{ isMixed = value; }\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
@@ -26,13 +33,6 @@ namespace System.Xml.Schema
                        set{ content = value; }\r
                }\r
 \r
-               [System.Xml.Serialization.XmlAttribute("mixed")]\r
-               public bool IsMixed \r
-               {\r
-                       get{ return  isMixed; } \r
-                       set{ isMixed = value; }\r
-               }\r
-\r
                /// <remarks>\r
                /// 1. Content must be present\r
                /// </remarks>\r
@@ -104,17 +104,13 @@ namespace System.Xml.Schema
                                        if(innerex != null)\r
                                                error(h,reader.Value + " is an invalid value for mixed",innerex);\r
                                }\r
-                               else if(reader.NamespaceURI == "" || reader.NamespaceURI == XmlSchema.Namespace)\r
+                               else if((reader.NamespaceURI == "" && reader.Name != "xmlns") || reader.NamespaceURI == XmlSchema.Namespace)\r
                                {\r
                                        error(h,reader.Name + " is not a valid attribute for complexContent",null);\r
                                }\r
                                else\r
                                {\r
-                                       if(reader.Prefix == "xmlns")\r
-                                               complex.Namespaces.Add(reader.LocalName, reader.Value);\r
-                                       else if(reader.Name == "xmlns")\r
-                                               complex.Namespaces.Add("",reader.Value);\r
-                                       //TODO: Add to Unhandled attributes\r
+                                       XmlSchemaUtil.ReadUnhandledAttribute(reader,complex);\r
                                }\r
                        }\r
                        \r