1 // Author: Dwivedi, Ajay kumar
\r
5 using System.ComponentModel;
\r
6 using System.Xml.Serialization;
\r
8 namespace System.Xml.Schema
\r
11 /// Summary description for XmlSchemaAttribute.
\r
13 public class XmlSchemaAttribute : XmlSchemaAnnotated
\r
15 private object attributeType;
\r
16 private string defaultValue;
\r
17 private string fixedValue;
\r
18 private XmlSchemaForm form;
\r
19 private string name;
\r
20 private XmlQualifiedName qualifiedName;
\r
21 private XmlQualifiedName refName;
\r
22 private XmlSchemaSimpleType schemaType;
\r
23 private XmlQualifiedName schemaTypeName;
\r
24 private XmlSchemaUse use;
\r
26 public XmlSchemaAttribute()
\r
28 //FIXME: Docs says the default is optional.
\r
29 //Whereas the MS implementation has default None.
\r
30 use = XmlSchemaUse.None;
\r
31 qualifiedName = XmlQualifiedName.Empty;
\r
32 refName = XmlQualifiedName.Empty;
\r
37 public object AttributeType
\r
38 { //FIXME: This is not correct. Is it?
\r
39 get{ return attributeType; }
\r
42 [DefaultValue(null)]
\r
43 [System.Xml.Serialization.XmlAttribute("default")]
\r
44 public string DefaultValue
\r
46 get{ return defaultValue;}
\r
48 { // Default Value and fixed Value are mutually exclusive
\r
50 defaultValue = value;
\r
54 [DefaultValue(null)]
\r
55 [System.Xml.Serialization.XmlAttribute("fixed")]
\r
56 public string FixedValue
\r
58 get{ return fixedValue;}
\r
60 { // Default Value and fixed Value are mutually exclusive
\r
61 defaultValue = null;
\r
66 [DefaultValue(XmlSchemaForm.None)]
\r
67 [System.Xml.Serialization.XmlAttribute("form")]
\r
68 public XmlSchemaForm Form
\r
74 [System.Xml.Serialization.XmlAttribute("name")]
\r
79 { // Name and RefName are mutually exclusive
\r
85 public XmlQualifiedName QualifiedName
\r
87 get{ return qualifiedName;}
\r
90 [System.Xml.Serialization.XmlAttribute("ref")]
\r
91 public XmlQualifiedName RefName
\r
93 get{ return refName;}
\r
95 { // Name and RefName are mutually exclusive
\r
101 [XmlElement("simpleType",Namespace="http://www.w3.org/2001/XMLSchema")]
\r
102 public XmlSchemaSimpleType SchemaType
\r
104 get{ return schemaType;}
\r
105 set{ schemaType = value;}
\r
108 [System.Xml.Serialization.XmlAttribute("type")]
\r
109 public XmlQualifiedName SchemaTypeName
\r
111 get{ return schemaTypeName;}
\r
112 set{ schemaTypeName = value;}
\r
115 [DefaultValue(XmlSchemaUse.None)]
\r
116 [System.Xml.Serialization.XmlAttribute("use")]
\r
117 public XmlSchemaUse Use
\r