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

◆ PreprocessLocalElement()

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

Definition at line 1170 of file Preprocessor.cs.

1171 {
1172 if (element.Name != null)
1173 {
1174 ValidateNameAttribute(element);
1175 PreprocessElementContent(element);
1176 element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null));
1177 }
1178 else
1179 {
1180 PreprocessAnnotation(element);
1181 if (element.RefName.IsEmpty)
1182 {
1184 }
1185 else
1186 {
1187 ValidateQNameAttribute(element, "ref", element.RefName);
1188 }
1189 if (!element.SchemaTypeName.IsEmpty || element.HasAbstractAttribute || element.Block != XmlSchemaDerivationMethod.None || element.SchemaType != null || element.HasConstraints || element.DefaultValue != null || element.Form != 0 || element.FixedValue != null || element.HasNillableAttribute)
1190 {
1192 }
1193 if (element.DefaultValue != null && element.FixedValue != null)
1194 {
1196 }
1197 element.SetQualifiedName(element.RefName);
1198 }
1199 if (element.MinOccurs > element.MaxOccurs)
1200 {
1203 }
1204 if (element.HasAbstractAttribute)
1205 {
1207 }
1208 if (element.Final != XmlSchemaDerivationMethod.None)
1209 {
1211 }
1212 if (!element.SubstitutionGroup.IsEmpty)
1213 {
1214 SendValidationEvent(System.SR.Sch_ForbiddenAttribute, "substitutionGroup", element);
1215 }
1216 ValidateIdAttribute(element);
1217 }
static string Sch_MinGtMax
Definition SR.cs:834
static string Sch_ElementNameRef
Definition SR.cs:552
static string Sch_DefaultFixedAttributes
Definition SR.cs:536
static string Sch_ForbiddenAttribute
Definition SR.cs:544
static string Sch_InvalidElementRef
Definition SR.cs:832
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void PreprocessAnnotation(XmlSchemaObject schemaObject)
void PreprocessElementContent(XmlSchemaElement element)
void ValidateNameAttribute(XmlSchemaObject xso)
void ValidateIdAttribute(XmlSchemaObject xso)
void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.Preprocessor._elementFormDefault, System.Xml.Schema.Preprocessor._targetNamespace, System.Xml.Schema.XmlSchemaElement.Block, System.Xml.Schema.XmlSchemaElement.DefaultValue, System.Xml.Dictionary, System.Xml.Schema.XmlSchemaElement.Final, System.Xml.Schema.XmlSchemaElement.FixedValue, System.Xml.Schema.XmlSchemaElement.Form, System.Xml.Schema.XmlSchemaElement.HasAbstractAttribute, System.Xml.Schema.XmlSchemaElement.HasConstraints, System.Xml.Schema.XmlSchemaElement.HasNillableAttribute, System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Schema.XmlSchemaParticle.MaxOccurs, System.Xml.Schema.XmlSchemaParticle.MinOccurs, System.Xml.Schema.XmlSchemaElement.Name, System.Xml.Schema.Preprocessor.PreprocessAnnotation(), System.Xml.Schema.Preprocessor.PreprocessElementContent(), System.Xml.Schema.XmlSchemaElement.RefName, System.SR.Sch_DefaultFixedAttributes, System.SR.Sch_ElementNameRef, System.SR.Sch_ForbiddenAttribute, System.SR.Sch_InvalidElementRef, System.SR.Sch_MinGtMax, System.Xml.Schema.XmlSchemaElement.SchemaType, System.Xml.Schema.XmlSchemaElement.SchemaTypeName, System.Xml.Schema.BaseProcessor.SendValidationEvent(), 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.PreprocessParticle().