mscorlib(4.0.0.0) API with additions
XmlSchemaAnyAttribute.cs
3 
4 namespace System.Xml.Schema
5 {
8  {
9  private string ns;
10 
11  private XmlSchemaContentProcessing processContents;
12 
13  private NamespaceList namespaceList;
14 
17  [XmlAttribute("namespace")]
18  public string Namespace
19  {
20  get
21  {
22  return ns;
23  }
24  set
25  {
26  ns = value;
27  }
28  }
29 
32  [XmlAttribute("processContents")]
33  [DefaultValue(XmlSchemaContentProcessing.None)]
35  {
36  get
37  {
38  return processContents;
39  }
40  set
41  {
42  processContents = value;
43  }
44  }
45 
46  [XmlIgnore]
47  internal NamespaceList NamespaceList
48  {
49  get
50  {
51  return namespaceList;
52  }
53  }
54 
55  [XmlIgnore]
56  internal XmlSchemaContentProcessing ProcessContentsCorrect
57  {
58  get
59  {
60  if (processContents != 0)
61  {
62  return processContents;
63  }
64  return XmlSchemaContentProcessing.Strict;
65  }
66  }
67 
68  internal void BuildNamespaceList(string targetNamespace)
69  {
70  if (ns != null)
71  {
72  namespaceList = new NamespaceList(ns, targetNamespace);
73  }
74  else
75  {
76  namespaceList = new NamespaceList();
77  }
78  }
79 
80  internal void BuildNamespaceListV1Compat(string targetNamespace)
81  {
82  if (ns != null)
83  {
84  namespaceList = new NamespaceListV1Compat(ns, targetNamespace);
85  }
86  else
87  {
88  namespaceList = new NamespaceList();
89  }
90  }
91 
92  internal bool Allows(XmlQualifiedName qname)
93  {
94  return namespaceList.Allows(qname.Namespace);
95  }
96 
97  internal static bool IsSubset(XmlSchemaAnyAttribute sub, XmlSchemaAnyAttribute super)
98  {
99  return NamespaceList.IsSubset(sub.NamespaceList, super.NamespaceList);
100  }
101 
102  internal static XmlSchemaAnyAttribute Intersection(XmlSchemaAnyAttribute o1, XmlSchemaAnyAttribute o2, bool v1Compat)
103  {
104  NamespaceList namespaceList = NamespaceList.Intersection(o1.NamespaceList, o2.NamespaceList, v1Compat);
105  if (namespaceList != null)
106  {
107  XmlSchemaAnyAttribute xmlSchemaAnyAttribute = new XmlSchemaAnyAttribute();
108  xmlSchemaAnyAttribute.namespaceList = namespaceList;
109  xmlSchemaAnyAttribute.ProcessContents = o1.ProcessContents;
110  xmlSchemaAnyAttribute.Annotation = o1.Annotation;
111  return xmlSchemaAnyAttribute;
112  }
113  return null;
114  }
115 
116  internal static XmlSchemaAnyAttribute Union(XmlSchemaAnyAttribute o1, XmlSchemaAnyAttribute o2, bool v1Compat)
117  {
118  NamespaceList namespaceList = NamespaceList.Union(o1.NamespaceList, o2.NamespaceList, v1Compat);
119  if (namespaceList != null)
120  {
121  XmlSchemaAnyAttribute xmlSchemaAnyAttribute = new XmlSchemaAnyAttribute();
122  xmlSchemaAnyAttribute.namespaceList = namespaceList;
123  xmlSchemaAnyAttribute.processContents = o1.processContents;
124  xmlSchemaAnyAttribute.Annotation = o1.Annotation;
125  return xmlSchemaAnyAttribute;
126  }
127  return null;
128  }
129  }
130 }
Represents the World Wide Web Consortium (W3C) anyAttribute element.
Definition: __Canon.cs:3
Represents an attribute. Valid and default values for the attribute are defined in a document type de...
Definition: XmlAttribute.cs:7
The base class for any element that can contain annotation elements.
XmlSchemaContentProcessing ProcessContents
Gets or sets information about how an application or XML processor should handle the validation of XM...
XmlSchemaContentProcessing
Provides information about the validation mode of any and anyAttribute element replacements.
string Namespace
Gets or sets the namespaces containing the attributes that can be used.