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

◆ IsElementFromElement()

bool System.Xml.Schema.Compiler.IsElementFromElement ( XmlSchemaElement derivedElement,
XmlSchemaElement baseElement )
inlineprivate

Definition at line 1496 of file Compiler.cs.

1497 {
1498 XmlSchemaDerivationMethod xmlSchemaDerivationMethod = ((baseElement.ElementDecl.Block == XmlSchemaDerivationMethod.All) ? (XmlSchemaDerivationMethod.Substitution | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction) : baseElement.ElementDecl.Block);
1499 XmlSchemaDerivationMethod xmlSchemaDerivationMethod2 = ((derivedElement.ElementDecl.Block == XmlSchemaDerivationMethod.All) ? (XmlSchemaDerivationMethod.Substitution | XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction) : derivedElement.ElementDecl.Block);
1500 if (!(derivedElement.QualifiedName == baseElement.QualifiedName) || (!baseElement.IsNillable && derivedElement.IsNillable) || !IsValidOccurrenceRangeRestriction(derivedElement, baseElement) || (baseElement.FixedValue != null && !IsFixedEqual(baseElement.ElementDecl, derivedElement.ElementDecl)) || (xmlSchemaDerivationMethod2 | xmlSchemaDerivationMethod) != xmlSchemaDerivationMethod2 || derivedElement.ElementSchemaType == null || baseElement.ElementSchemaType == null || !XmlSchemaType.IsDerivedFrom(derivedElement.ElementSchemaType, baseElement.ElementSchemaType, ~(XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union)))
1501 {
1503 return false;
1504 }
1505 return true;
1506 }
static string Sch_ElementFromElement
Definition SR.cs:1000
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
bool IsFixedEqual(SchemaDeclBase baseDecl, SchemaDeclBase derivedDecl)
Definition Compiler.cs:2770
bool IsValidOccurrenceRangeRestriction(XmlSchemaParticle derivedParticle, XmlSchemaParticle baseParticle)
Definition Compiler.cs:1709

References System.Xml.Schema.Compiler._restrictionErrorMsg, System.Xml.Dictionary, System.SR.Format(), System.Xml.Schema.XmlSchemaType.IsDerivedFrom(), System.Xml.Schema.Compiler.IsFixedEqual(), System.Xml.Schema.Compiler.IsValidOccurrenceRangeRestriction(), and System.SR.Sch_ElementFromElement.

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