blob: 46ee40ef02a0aa92573a5310326e6635ec592068 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
//------------------------------------------------------------------------------
// <copyright file="XmlSchemaAttributeGroup.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// <owner current="true" primary="true">Microsoft</owner>
//------------------------------------------------------------------------------
namespace System.Xml.Schema {
using System.Collections;
using System.Xml.Serialization;
/// <include file='doc\XmlSchemaAttributeGroup.uex' path='docs/doc[@for="XmlSchemaAttributeGroup"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public class XmlSchemaAttributeGroup : XmlSchemaAnnotated {
string name;
XmlSchemaObjectCollection attributes = new XmlSchemaObjectCollection();
XmlSchemaAnyAttribute anyAttribute;
XmlQualifiedName qname = XmlQualifiedName.Empty;
XmlSchemaAttributeGroup redefined;
XmlSchemaObjectTable attributeUses;
XmlSchemaAnyAttribute attributeWildcard;
int selfReferenceCount;
/// <include file='doc\XmlSchemaAttributeGroup.uex' path='docs/doc[@for="XmlSchemaAttributeGroup.Name"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlAttribute("name")]
public string Name {
get { return name; }
set { name = value; }
}
/// <include file='doc\XmlSchemaAttributeGroup.uex' path='docs/doc[@for="XmlSchemaAttributeGroup.Attributes"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlElement("attribute", typeof(XmlSchemaAttribute)),
XmlElement("attributeGroup", typeof(XmlSchemaAttributeGroupRef))]
public XmlSchemaObjectCollection Attributes {
get { return attributes; }
}
/// <include file='doc\XmlSchemaAttributeGroup.uex' path='docs/doc[@for="XmlSchemaAttributeGroup.AnyAttribute"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlElement("anyAttribute")]
public XmlSchemaAnyAttribute AnyAttribute {
get { return anyAttribute; }
set { anyAttribute = value; }
}
[XmlIgnore]
public XmlQualifiedName QualifiedName {
get { return qname; }
}
[XmlIgnore]
internal XmlSchemaObjectTable AttributeUses {
get {
if (attributeUses == null) {
attributeUses = new XmlSchemaObjectTable();
}
return attributeUses;
}
}
[XmlIgnore]
internal XmlSchemaAnyAttribute AttributeWildcard {
get { return attributeWildcard; }
set { attributeWildcard = value; }
}
/// <include file='doc\XmlSchemaAttributeGroup.uex' path='docs/doc[@for="XmlSchemaAttributeGroup.RedefinedAttributeGroup"]/*' />
[XmlIgnore]
public XmlSchemaAttributeGroup RedefinedAttributeGroup {
get { return redefined; }
}
[XmlIgnore]
internal XmlSchemaAttributeGroup Redefined {
get { return redefined; }
set { redefined = value; }
}
[XmlIgnore]
internal int SelfReferenceCount {
get { return selfReferenceCount; }
set { selfReferenceCount = value; }
}
[XmlIgnore]
internal override string NameAttribute {
get { return Name; }
set { Name = value; }
}
internal void SetQualifiedName(XmlQualifiedName value) {
qname = value;
}
internal override XmlSchemaObject Clone() {
XmlSchemaAttributeGroup newGroup = (XmlSchemaAttributeGroup)MemberwiseClone();
if (XmlSchemaComplexType.HasAttributeQNameRef(this.attributes)) { //If a ref/type name is present
newGroup.attributes = XmlSchemaComplexType.CloneAttributes(this.attributes);
//Clear compiled tables
newGroup.attributeUses = null;
}
return newGroup;
}
}
}
|