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

◆ XDR_EndElementType()

static void System.Xml.Schema.XdrBuilder.XDR_EndElementType ( XdrBuilder builder)
inlinestaticprivate

Definition at line 775 of file XdrBuilder.cs.

776 {
777 SchemaElementDecl elementDecl = builder._ElementDef._ElementDecl;
778 if (builder._UndefinedAttributeTypes != null && builder._ElementDef._AttDefList != null)
779 {
780 DeclBaseInfo declBaseInfo = builder._UndefinedAttributeTypes;
781 DeclBaseInfo declBaseInfo2 = declBaseInfo;
782 while (declBaseInfo != null)
783 {
784 SchemaAttDef schemaAttDef = null;
785 if (declBaseInfo._ElementDecl == elementDecl)
786 {
787 XmlQualifiedName typeName = declBaseInfo._TypeName;
788 schemaAttDef = (SchemaAttDef)builder._ElementDef._AttDefList[typeName];
789 if (schemaAttDef != null)
790 {
792 declBaseInfo._Attdef.Name = typeName;
793 builder.XDR_CheckAttributeDefault(declBaseInfo, schemaAttDef);
794 if (declBaseInfo == builder._UndefinedAttributeTypes)
795 {
798 }
799 else
800 {
803 }
804 }
805 }
806 if (schemaAttDef == null)
807 {
808 if (declBaseInfo != builder._UndefinedAttributeTypes)
809 {
811 }
813 }
814 }
815 }
816 if (builder._ElementDef._MasterGroupRequired)
817 {
818 builder._contentValidator.CloseGroup();
819 if (!builder._ElementDef._ExistTerminal)
820 {
821 if (builder._contentValidator.IsOpen)
822 {
825 }
826 else if (builder._ElementDef._ContentAttr != 3)
827 {
828 builder.SendValidationEvent(System.SR.Sch_ElementMissing);
829 }
830 }
831 else if (builder._GroupDef._Order == 1)
832 {
833 builder._contentValidator.AddStar();
834 }
835 }
836 if (elementDecl.Datatype != null)
837 {
838 XmlTokenizedType tokenizedType = elementDecl.Datatype.TokenizedType;
839 if (tokenizedType == XmlTokenizedType.ENUMERATION && !builder._ElementDef._EnumerationRequired)
840 {
841 builder.SendValidationEvent(System.SR.Sch_MissDtvaluesAttribute);
842 }
843 if (tokenizedType != XmlTokenizedType.ENUMERATION && builder._ElementDef._EnumerationRequired)
844 {
845 builder.SendValidationEvent(System.SR.Sch_RequireEnumeration);
846 }
847 }
848 CompareMinMaxLength(builder._ElementDef._MinLength, builder._ElementDef._MaxLength, builder);
849 elementDecl.MaxLength = builder._ElementDef._MaxLength;
850 elementDecl.MinLength = builder._ElementDef._MinLength;
851 if (builder._contentValidator != null)
852 {
855 }
858 }
static string Sch_ElementMissing
Definition SR.cs:462
static string Sch_RequireEnumeration
Definition SR.cs:456
static string Sch_MissDtvaluesAttribute
Definition SR.cs:450
Definition SR.cs:7
static void CompareMinMaxLength(uint cMin, uint cMax, XdrBuilder builder)

References System.Xml.Schema.ContentValidator.Any, System.Xml.Schema.XdrBuilder.CompareMinMaxLength(), System.Xml.Dictionary, System.SR.Sch_ElementMissing, System.SR.Sch_MissDtvaluesAttribute, and System.SR.Sch_RequireEnumeration.