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

◆ CompileComplexContentRestriction()

void System.Xml.Schema.SchemaCollectionCompiler.CompileComplexContentRestriction ( XmlSchemaComplexType complexType,
XmlSchemaComplexContent complexContent,
XmlSchemaComplexContentRestriction complexRestriction )
inlineprivate

Definition at line 916 of file SchemaCollectionCompiler.cs.

917 {
918 XmlSchemaComplexType xmlSchemaComplexType = null;
919 if (complexType.Redefined != null && complexRestriction.BaseTypeName == complexType.Redefined.QualifiedName)
920 {
921 xmlSchemaComplexType = (XmlSchemaComplexType)complexType.Redefined;
923 }
924 else
925 {
927 if (xmlSchemaComplexType == null)
928 {
930 return;
931 }
932 }
933 if (xmlSchemaComplexType != null && xmlSchemaComplexType.ElementDecl != null && xmlSchemaComplexType.ContentType == XmlSchemaContentType.TextOnly)
934 {
936 return;
937 }
938 complexType.SetBaseSchemaType(xmlSchemaComplexType);
939 if ((xmlSchemaComplexType.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0)
940 {
942 }
943 CompileLocalAttributes(xmlSchemaComplexType, complexType, complexRestriction.Attributes, complexRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction);
945 complexType.SetContentType(GetSchemaContentType(complexType, complexContent, complexType.ContentTypeParticle));
946 if (complexType.ContentType == XmlSchemaContentType.Empty)
947 {
948 _ = xmlSchemaComplexType.ElementDecl;
949 if (xmlSchemaComplexType.ElementDecl != null && !xmlSchemaComplexType.ElementDecl.ContentValidator.IsEmptiable)
950 {
952 }
953 }
954 complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction);
955 }
static string Sch_InvalidContentRestriction
Definition SR.cs:978
static string Sch_NotComplexContent
Definition SR.cs:964
static string Sch_UndefBaseRestriction
Definition SR.cs:972
static string Sch_BaseFinalRestriction
Definition SR.cs:966
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void CompileLocalAttributes(XmlSchemaComplexType baseType, XmlSchemaComplexType derivedType, XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute anyAttribute, XmlSchemaDerivationMethod derivedBy)
XmlSchemaComplexType GetComplexType(XmlQualifiedName name)
XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle particle, bool substitution)
void CompileComplexType(XmlSchemaComplexType complexType)
XmlSchemaContentType GetSchemaContentType(XmlSchemaComplexType complexType, XmlSchemaComplexContent complexContent, XmlSchemaParticle particle)

References System.Xml.Schema.SchemaCollectionCompiler.CompileComplexType(), System.Xml.Schema.SchemaCollectionCompiler.CompileContentTypeParticle(), System.Xml.Schema.SchemaCollectionCompiler.CompileLocalAttributes(), System.Xml.Schema.SchemaCollectionCompiler.GetComplexType(), System.Xml.Schema.SchemaCollectionCompiler.GetSchemaContentType(), System.SR.Sch_BaseFinalRestriction, System.SR.Sch_InvalidContentRestriction, System.SR.Sch_NotComplexContent, System.SR.Sch_UndefBaseRestriction, and System.Xml.Schema.BaseProcessor.SendValidationEvent().

Referenced by System.Xml.Schema.SchemaCollectionCompiler.CompileComplexType().