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

◆ PreprocessElement()

void System.Xml.Schema.Preprocessor.PreprocessElement ( XmlSchemaElement element)
inlineprivate

Definition at line 1116 of file Preprocessor.cs.

1117 {
1118 if (element.Name != null)
1119 {
1120 ValidateNameAttribute(element);
1121 element.SetQualifiedName(new XmlQualifiedName(element.Name, _targetNamespace));
1122 }
1123 else
1124 {
1126 }
1127 PreprocessElementContent(element);
1128 if (element.Final == XmlSchemaDerivationMethod.All)
1129 {
1130 element.SetFinalResolved(XmlSchemaDerivationMethod.All);
1131 }
1132 else if (element.Final == XmlSchemaDerivationMethod.None)
1133 {
1134 if (_finalDefault == XmlSchemaDerivationMethod.All)
1135 {
1136 element.SetFinalResolved(XmlSchemaDerivationMethod.All);
1137 }
1138 else
1139 {
1140 element.SetFinalResolved(_finalDefault & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1141 }
1142 }
1143 else
1144 {
1145 if (((uint)element.Final & 0xFFFFFFF9u) != 0)
1146 {
1148 }
1149 element.SetFinalResolved(element.Final & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1150 }
1151 if (element.Form != 0)
1152 {
1154 }
1155 if (element.MinOccursString != null)
1156 {
1157 SendValidationEvent(System.SR.Sch_ForbiddenAttribute, "minOccurs", element);
1158 }
1159 if (element.MaxOccursString != null)
1160 {
1161 SendValidationEvent(System.SR.Sch_ForbiddenAttribute, "maxOccurs", element);
1162 }
1163 if (!element.SubstitutionGroup.IsEmpty)
1164 {
1165 ValidateQNameAttribute(element, "type", element.SubstitutionGroup);
1166 }
1167 ValidateIdAttribute(element);
1168 }
static string Sch_ForbiddenAttribute
Definition SR.cs:544
static string Sch_InvalidElementFinalValue
Definition SR.cs:512
static string Sch_MissRequiredAttribute
Definition SR.cs:490
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void PreprocessElementContent(XmlSchemaElement element)
void ValidateNameAttribute(XmlSchemaObject xso)
void ValidateIdAttribute(XmlSchemaObject xso)
XmlSchemaDerivationMethod _finalDefault
void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.Preprocessor._finalDefault, System.Xml.Schema.Preprocessor._targetNamespace, System.Xml.Schema.XmlSchemaElement.Final, System.Xml.Schema.XmlSchemaElement.Form, System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Schema.XmlSchemaParticle.MaxOccursString, System.Xml.Schema.XmlSchemaParticle.MinOccursString, System.Xml.Schema.XmlSchemaElement.Name, System.Xml.Schema.Preprocessor.PreprocessElementContent(), System.SR.Sch_ForbiddenAttribute, System.SR.Sch_InvalidElementFinalValue, System.SR.Sch_MissRequiredAttribute, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.Xml.Schema.XmlSchemaElement.SetFinalResolved(), System.Xml.Schema.XmlSchemaElement.SetQualifiedName(), System.Xml.Schema.XmlSchemaElement.SubstitutionGroup, System.Xml.Schema.Preprocessor.ValidateIdAttribute(), System.Xml.Schema.Preprocessor.ValidateNameAttribute(), and System.Xml.Schema.Preprocessor.ValidateQNameAttribute().

Referenced by System.Xml.Schema.Preprocessor.Preprocess().