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

◆ PreprocessLocalElement()

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

Definition at line 919 of file SchemaCollectionPreprocessor.cs.

920 {
921 if (element.Name != null)
922 {
923 ValidateNameAttribute(element);
925 element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null));
926 }
927 else
928 {
929 PreprocessAnnotation(element);
930 if (element.RefName.IsEmpty)
931 {
933 }
934 else
935 {
936 ValidateQNameAttribute(element, "ref", element.RefName);
937 }
938 if (!element.SchemaTypeName.IsEmpty || element.IsAbstract || element.Block != XmlSchemaDerivationMethod.None || element.SchemaType != null || element.HasConstraints || element.DefaultValue != null || element.Form != 0 || element.FixedValue != null || element.HasNillableAttribute)
939 {
941 }
942 if (element.DefaultValue != null && element.FixedValue != null)
943 {
945 }
946 element.SetQualifiedName(element.RefName);
947 }
948 if (element.MinOccurs > element.MaxOccurs)
949 {
952 }
953 if (element.IsAbstract)
954 {
956 }
957 if (element.Final != XmlSchemaDerivationMethod.None)
958 {
960 }
961 if (!element.SubstitutionGroup.IsEmpty)
962 {
963 SendValidationEvent(System.SR.Sch_ForbiddenAttribute, "substitutionGroup", element);
964 }
965 ValidateIdAttribute(element);
966 }
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 ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.SchemaCollectionPreprocessor._elementFormDefault, System.Xml.Schema.SchemaCollectionPreprocessor._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.HasConstraints, System.Xml.Schema.XmlSchemaElement.HasNillableAttribute, System.Xml.Schema.XmlSchemaElement.IsAbstract, System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Schema.XmlSchemaParticle.MaxOccurs, System.Xml.Schema.XmlSchemaParticle.MinOccurs, System.Xml.Schema.XmlSchemaElement.Name, System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessAnnotation(), System.Xml.Schema.SchemaCollectionPreprocessor.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.SchemaCollectionPreprocessor.ValidateIdAttribute(), System.Xml.Schema.SchemaCollectionPreprocessor.ValidateNameAttribute(), and System.Xml.Schema.SchemaCollectionPreprocessor.ValidateQNameAttribute().

Referenced by System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessParticle().