Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckAtrributeGroupRestriction()

void System.Xml.Schema.Compiler.CheckAtrributeGroupRestriction ( XmlSchemaAttributeGroup baseAttributeGroup,
XmlSchemaAttributeGroup derivedAttributeGroup )
inlineprivate

Definition at line 2036 of file Compiler.cs.

2037 {
2038 XmlSchemaAnyAttribute attributeWildcard = baseAttributeGroup.AttributeWildcard;
2039 XmlSchemaAnyAttribute attributeWildcard2 = derivedAttributeGroup.AttributeWildcard;
2041 {
2043 }
2044 foreach (XmlSchemaAttribute value in baseAttributeGroup.AttributeUses.Values)
2045 {
2046 XmlSchemaAttribute xmlSchemaAttribute2 = (XmlSchemaAttribute)derivedAttributeGroup.AttributeUses[value.QualifiedName];
2047 if (xmlSchemaAttribute2 != null)
2048 {
2049 if (value.Use == XmlSchemaUse.Prohibited && xmlSchemaAttribute2.Use != XmlSchemaUse.Prohibited)
2050 {
2052 }
2053 else if (value.Use == XmlSchemaUse.Required && xmlSchemaAttribute2.Use != XmlSchemaUse.Required)
2054 {
2056 }
2057 else if (xmlSchemaAttribute2.Use != XmlSchemaUse.Prohibited)
2058 {
2059 if (value.AttributeSchemaType == null || xmlSchemaAttribute2.AttributeSchemaType == null || !XmlSchemaType.IsDerivedFrom(xmlSchemaAttribute2.AttributeSchemaType, value.AttributeSchemaType, XmlSchemaDerivationMethod.Empty))
2060 {
2062 }
2063 else if (!IsFixedEqual(value.AttDef, xmlSchemaAttribute2.AttDef))
2064 {
2066 }
2067 }
2068 }
2069 else if (value.Use == XmlSchemaUse.Required)
2070 {
2071 SendValidationEvent(System.SR.Sch_NoDerivedAttribute, value.QualifiedName.ToString(), baseAttributeGroup.QualifiedName.ToString(), derivedAttributeGroup);
2072 }
2073 }
2074 foreach (XmlSchemaAttribute value2 in derivedAttributeGroup.AttributeUses.Values)
2075 {
2076 XmlSchemaAttribute xmlSchemaAttribute4 = (XmlSchemaAttribute)baseAttributeGroup.AttributeUses[value2.QualifiedName];
2077 if (xmlSchemaAttribute4 == null && (attributeWildcard == null || !attributeWildcard.Allows(value2.QualifiedName)))
2078 {
2080 }
2081 }
2082 }
static string Sch_AttributeRestrictionInvalid
Definition SR.cs:1052
static string Sch_NoDerivedAttribute
Definition SR.cs:1060
static string Sch_AttributeRestrictionInvalidFromWildcard
Definition SR.cs:1058
static string Sch_AttributeFixedInvalid
Definition SR.cs:1054
static string Sch_AttributeRestrictionProhibited
Definition SR.cs:1050
static string Sch_InvalidAnyAttributeRestriction
Definition SR.cs:1048
static string Sch_AttributeUseInvalid
Definition SR.cs:1056
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
bool IsProcessContentsRestricted(XmlSchemaComplexType baseType, XmlSchemaAnyAttribute derivedAttributeWildcard, XmlSchemaAnyAttribute baseAttributeWildcard)
Definition Compiler.cs:2084
bool IsFixedEqual(SchemaDeclBase baseDecl, SchemaDeclBase derivedDecl)
Definition Compiler.cs:2770

References System.Xml.Schema.XmlSchemaType.IsDerivedFrom(), System.Xml.Schema.Compiler.IsFixedEqual(), System.Xml.Schema.Compiler.IsProcessContentsRestricted(), System.Xml.Schema.XmlSchemaAnyAttribute.IsSubset(), System.SR.Sch_AttributeFixedInvalid, System.SR.Sch_AttributeRestrictionInvalid, System.SR.Sch_AttributeRestrictionInvalidFromWildcard, System.SR.Sch_AttributeRestrictionProhibited, System.SR.Sch_AttributeUseInvalid, System.SR.Sch_InvalidAnyAttributeRestriction, System.SR.Sch_NoDerivedAttribute, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.

Referenced by System.Xml.Schema.Compiler.RecursivelyCheckRedefinedAttributeGroups().