implementing XmlElement.SetAttributeNode(localName, namespaceURI) and
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchemaExternal.cs
1 // Author: Dwivedi, Ajay kumar\r
2 //            Adwiv@Yahoo.com\r
3 using System;\r
4 using System.Xml;\r
5 using System.Xml.Serialization;\r
6 using System.Collections;\r
7 namespace System.Xml.Schema\r
8 {\r
9         /// <summary>\r
10         /// Summary description for XmlSchemaExternal.\r
11         /// </summary>\r
12         public abstract class XmlSchemaExternal : XmlSchemaObject\r
13         {\r
14                 private string id;\r
15                 private XmlSchema schema;\r
16                 private string location;\r
17                 private XmlAttribute[] unhandledAttributes;\r
18 \r
19                 protected XmlSchemaExternal()\r
20                 {}\r
21                 \r
22                 [System.Xml.Serialization.XmlAttribute("schemaLocation")]\r
23                 public string SchemaLocation \r
24                 {\r
25                         get{ return  location; } \r
26                         set{ location = value; }\r
27                 }\r
28 \r
29                 [XmlIgnore]\r
30                 public XmlSchema Schema \r
31                 {\r
32                         get{ return  schema; }\r
33                         set{ schema = value; }\r
34                 }\r
35 \r
36                 [System.Xml.Serialization.XmlAttribute("id")]\r
37                 public string Id \r
38                 {\r
39                         get{ return  id; }\r
40                         set{ id = value; }\r
41                 }\r
42 \r
43                 [XmlAnyAttribute]\r
44                 public XmlAttribute[] UnhandledAttributes \r
45                 {\r
46                         get\r
47                         {\r
48                                 if(unhandledAttributeList != null)\r
49                                 {\r
50                                         unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));\r
51                                         unhandledAttributeList = null;\r
52                                 }\r
53                                 return unhandledAttributes;\r
54                         }\r
55                         set\r
56                         { \r
57                                 unhandledAttributes = value; \r
58                                 unhandledAttributeList = null;\r
59                         }\r
60                 }\r
61         }\r
62 }\r