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

◆ ValidateElementContext()

object System.Xml.Schema.XmlSchemaValidator.ValidateElementContext ( XmlQualifiedName elementName,
out bool invalidElementInContext )
inlineprivate

Definition at line 1233 of file XmlSchemaValidator.cs.

1234 {
1235 object obj = null;
1236 int errorCode = 0;
1237 XmlSchemaElement xmlSchemaElement = null;
1240 {
1241 if (_context.IsNill)
1242 {
1244 return null;
1245 }
1247 if (contentValidator.ContentType == XmlSchemaContentType.Mixed && _context.ElementDecl.Presence == SchemaDeclBase.Use.Fixed)
1248 {
1250 return null;
1251 }
1252 XmlQualifiedName xmlQualifiedName = elementName;
1253 bool flag = false;
1254 while (true)
1255 {
1257 if (obj != null)
1258 {
1259 break;
1260 }
1261 if (errorCode == -2)
1262 {
1263 SendValidationEvent(System.SR.Sch_AllElement, elementName.ToString());
1265 _processContents = (_context.ProcessContents = XmlSchemaContentProcessing.Skip);
1266 return null;
1267 }
1268 flag = true;
1270 if (xmlSchemaElement == null)
1271 {
1272 break;
1273 }
1274 xmlQualifiedName = xmlSchemaElement.QualifiedName;
1275 }
1276 if (flag)
1277 {
1278 if (!(obj is XmlSchemaElement xmlSchemaElement2))
1279 {
1280 obj = null;
1281 }
1282 else if (xmlSchemaElement2.RefName.IsEmpty)
1283 {
1286 _processContents = (_context.ProcessContents = XmlSchemaContentProcessing.Skip);
1287 }
1288 else
1289 {
1290 obj = _compiledSchemaInfo.GetElement(elementName);
1292 }
1293 }
1294 if (obj == null)
1295 {
1298 _processContents = (_context.ProcessContents = XmlSchemaContentProcessing.Skip);
1299 }
1300 }
1301 return obj;
1302 }
static string Sch_ContentInNill
Definition SR.cs:784
static string Sch_ElementInMixedWithFixed
Definition SR.cs:1072
static string Sch_InvalidElementSubstitution
Definition SR.cs:904
static string Sch_AllElement
Definition SR.cs:594
Definition SR.cs:7
virtual object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode)
XmlSchemaElement GetElement(XmlQualifiedName qname)
static void ElementValidationError(XmlQualifiedName name, ValidationState context, ValidationEventHandler eventHandler, object sender, string sourceUri, int lineNo, int linePos, XmlSchemaSet schemaSet)
XmlSchemaElement GetSubstitutionGroupHead(XmlQualifiedName member)
static string BuildElementName(XmlQualifiedName qname)
XmlSchemaContentProcessing _processContents
static string QNameString(string localName, string ns)
readonly IXmlNamespaceResolver _nsResolver

References System.Xml.Schema.XmlSchemaValidator._compiledSchemaInfo, System.Xml.Schema.XmlSchemaValidator._context, System.Xml.Schema.XmlSchemaValidator._eventHandler, System.Xml.Schema.XmlSchemaValidator._nsResolver, System.Xml.Schema.XmlSchemaValidator._positionInfo, System.Xml.Schema.XmlSchemaValidator._processContents, System.Xml.Schema.XmlSchemaValidator._schemaSet, System.Xml.Schema.XmlSchemaValidator._sourceUriString, System.Xml.Schema.XmlSchemaValidator.BuildElementName(), System.Xml.Schema.SchemaElementDecl.ContentValidator, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.Schema.XmlSchemaValidator.ElementValidationError(), System.Xml.Schema.SchemaInfo.GetElement(), System.Xml.Schema.XmlSchemaValidator.GetSubstitutionGroupHead(), System.Xml.Schema.ValidationState.IsNill, System.Xml.IXmlLineInfo.LineNumber, System.Xml.IXmlLineInfo.LinePosition, System.Xml.Schema.ValidationState.LocalName, System.Xml.Schema.ValidationState.Namespace, System.Xml.Schema.ValidationState.NeedValidateChildren, System.obj, System.Xml.Schema.SchemaDeclBase.Presence, System.Xml.Schema.XmlSchemaValidator.QNameString(), System.SR.Sch_AllElement, System.SR.Sch_ContentInNill, System.SR.Sch_ElementInMixedWithFixed, System.SR.Sch_InvalidElementSubstitution, System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(), System.Xml.XmlQualifiedName.ToString(), and System.Xml.Schema.ContentValidator.ValidateElement().

Referenced by System.Xml.Schema.XmlSchemaValidator.ValidateElement().