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

◆ CompileComplexContentRestriction()

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

Definition at line 993 of file Compiler.cs.

994 {
995 XmlSchemaComplexType xmlSchemaComplexType = null;
996 if (complexType.Redefined != null && complexRestriction.BaseTypeName == complexType.Redefined.QualifiedName)
997 {
998 xmlSchemaComplexType = (XmlSchemaComplexType)complexType.Redefined;
1000 }
1001 else
1002 {
1004 if (xmlSchemaComplexType == null)
1005 {
1007 return;
1008 }
1009 }
1010 complexType.SetBaseSchemaType(xmlSchemaComplexType);
1011 if ((xmlSchemaComplexType.FinalResolved & XmlSchemaDerivationMethod.Restriction) != 0)
1012 {
1014 }
1015 CompileLocalAttributes(xmlSchemaComplexType, complexType, complexRestriction.Attributes, complexRestriction.AnyAttribute, XmlSchemaDerivationMethod.Restriction);
1016 complexType.SetContentTypeParticle(CompileContentTypeParticle(complexRestriction.Particle));
1017 XmlSchemaContentType schemaContentType = GetSchemaContentType(complexType, complexContent, complexType.ContentTypeParticle);
1018 complexType.SetContentType(schemaContentType);
1019 switch (schemaContentType)
1020 {
1021 case XmlSchemaContentType.Empty:
1022 if (xmlSchemaComplexType.ElementDecl != null && !xmlSchemaComplexType.ElementDecl.ContentValidator.IsEmptiable)
1023 {
1025 }
1026 break;
1027 case XmlSchemaContentType.Mixed:
1028 if (xmlSchemaComplexType.ContentType != XmlSchemaContentType.Mixed)
1029 {
1031 }
1032 break;
1033 }
1034 complexType.SetDerivedBy(XmlSchemaDerivationMethod.Restriction);
1035 }
static string Sch_InvalidContentRestrictionDetailed
Definition SR.cs:980
static string Sch_InvalidBaseToMixed
Definition SR.cs:984
static string Sch_UndefBaseRestriction
Definition SR.cs:972
static string Sch_InvalidBaseToEmpty
Definition SR.cs:982
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)
Definition Compiler.cs:1907
XmlSchemaContentType GetSchemaContentType(XmlSchemaComplexType complexType, XmlSchemaComplexContent complexContent, XmlSchemaParticle particle)
Definition Compiler.cs:1828
void CompileComplexType(XmlSchemaComplexType complexType)
Definition Compiler.cs:730
XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle particle)
Definition Compiler.cs:1092
XmlSchemaComplexType GetComplexType(XmlQualifiedName name)
Definition Compiler.cs:2730

References System.Xml.Schema.Compiler.CompileComplexType(), System.Xml.Schema.Compiler.CompileContentTypeParticle(), System.Xml.Schema.Compiler.CompileLocalAttributes(), System.Xml.Schema.Compiler.GetComplexType(), System.Xml.Schema.Compiler.GetSchemaContentType(), System.SR.Sch_BaseFinalRestriction, System.SR.Sch_InvalidBaseToEmpty, System.SR.Sch_InvalidBaseToMixed, System.SR.Sch_InvalidContentRestrictionDetailed, System.SR.Sch_UndefBaseRestriction, and System.Xml.Schema.BaseProcessor.SendValidationEvent().

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