2003-10-01 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchemaExternal.cs
index 2f65395e84c26eeb817bdd145edf3683158cb222..1f691587ea1629dc0e55c00b3504ec836f553241 100755 (executable)
@@ -3,7 +3,7 @@
 using System;\r
 using System.Xml;\r
 using System.Xml.Serialization;\r
-\r
+using System.Collections;\r
 namespace System.Xml.Schema\r
 {\r
        /// <summary>\r
@@ -18,12 +18,12 @@ namespace System.Xml.Schema
 \r
                protected XmlSchemaExternal()\r
                {}\r
-\r
-               [System.Xml.Serialization.XmlAttribute("id")]\r
-               public string Id \r
+               \r
+               [System.Xml.Serialization.XmlAttribute("schemaLocation")]\r
+               public string SchemaLocation \r
                {\r
-                       get{ return  id; }\r
-                       set{ id = value; }\r
+                       get{ return  location; } \r
+                       set{ location = value; }\r
                }\r
 \r
                [XmlIgnore]\r
@@ -32,18 +32,31 @@ namespace System.Xml.Schema
                        get{ return  schema; }\r
                        set{ schema = value; }\r
                }\r
-               \r
-               [System.Xml.Serialization.XmlAttribute("schemaLocation")]\r
-               public string SchemaLocation \r
+\r
+               [System.Xml.Serialization.XmlAttribute("id")]\r
+               public string Id \r
                {\r
-                       get{ return  location; } \r
-                       set{ location = value; }\r
+                       get{ return  id; }\r
+                       set{ id = value; }\r
                }\r
+\r
                [XmlAnyAttribute]\r
                public XmlAttribute[] UnhandledAttributes \r
                {\r
-                       get{ return  unhandledAttributes; }\r
-                       set{ unhandledAttributes = value; }\r
+                       get\r
+                       {\r
+                               if(unhandledAttributeList != null)\r
+                               {\r
+                                       unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));\r
+                                       unhandledAttributeList = null;\r
+                               }\r
+                               return unhandledAttributes;\r
+                       }\r
+                       set\r
+                       { \r
+                               unhandledAttributes = value; \r
+                               unhandledAttributeList = null;\r
+                       }\r
                }\r
        }\r
 }\r