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

◆ ValidateElement() [2/2]

void System.Xml.Schema.XmlSchemaValidator.ValidateElement ( string localName,
string namespaceUri,
XmlSchemaInfo? schemaInfo,
string? xsiType,
string? xsiNil,
string? xsiSchemaLocation,
string? xsiNoNamespaceSchemaLocation )
inline

Definition at line 495 of file XmlSchemaValidator.cs.

496 {
497 if (localName == null)
498 {
499 throw new ArgumentNullException("localName");
500 }
501 if (namespaceUri == null)
502 {
503 throw new ArgumentNullException("namespaceUri");
504 }
505 CheckStateTransition(ValidatorState.Element, s_methodNames[4]);
506 ClearPSVI();
507 _contextQName.Init(localName, namespaceUri);
508 XmlQualifiedName contextQName = _contextQName;
511 SchemaElementDecl schemaElementDecl = FastGetElementDecl(contextQName, particle);
514 {
515 _context.Validity = XmlSchemaValidity.Invalid;
516 }
517 if ((_validationFlags & XmlSchemaValidationFlags.ProcessSchemaLocation) != 0 && _xmlResolver != null)
518 {
520 }
521 if (_processContents != XmlSchemaContentProcessing.Skip)
522 {
523 if (schemaElementDecl == null && _partialValidationType == null)
524 {
526 }
527 bool declFound = schemaElementDecl != null;
528 if (xsiType != null || xsiNil != null)
529 {
531 }
532 if (schemaElementDecl == null)
533 {
535 }
536 }
538 XmlSchemaElement schemaElement = null;
539 XmlSchemaType schemaType = null;
540 if (schemaElementDecl != null)
541 {
544 _context.NeedValidateChildren = _processContents != XmlSchemaContentProcessing.Skip;
546 schemaElementDecl.ContentValidator.InitValidation(_context);
547 schemaType = schemaElementDecl.SchemaType;
549 }
550 if (schemaInfo != null)
551 {
552 schemaInfo.SchemaType = schemaType;
556 }
557 if (ProcessSchemaHints && _validatedNamespaces[namespaceUri] == null)
558 {
559 _validatedNamespaces.Add(namespaceUri, namespaceUri);
560 }
561 if (_isRoot)
562 {
563 _isRoot = false;
564 }
565 }
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
SchemaElementDecl GetElementDecl(XmlQualifiedName qname)
void CheckStateTransition(ValidatorState toState, string methodName)
object ValidateElementContext(XmlQualifiedName elementName, out bool invalidElementInContext)
void ThrowDeclNotFoundWarningOrError(bool declFound)
readonly XmlSchemaValidationFlags _validationFlags
void Push(XmlQualifiedName elementName)
SchemaElementDecl CheckXsiTypeAndNil(SchemaElementDecl elementDecl, string xsiType, string xsiNil, ref bool declFound)
void ProcessSchemaLocations(string xsiSchemaLocation, string xsiNoNamespaceSchemaLocation)
SchemaElementDecl FastGetElementDecl(XmlQualifiedName elementName, object particle)
XmlSchemaContentProcessing _processContents
void Init(string name, string ns)

References System.Xml.Schema.XmlSchemaValidator._attPresence, System.Xml.Schema.XmlSchemaValidator._compiledSchemaInfo, System.Xml.Schema.XmlSchemaValidator._context, System.Xml.Schema.XmlSchemaValidator._contextQName, System.Xml.Schema.XmlSchemaValidator._isRoot, System.Xml.Schema.XmlSchemaValidator._partialValidationType, System.Xml.Schema.XmlSchemaValidator._processContents, System.Xml.Schema.XmlSchemaValidator._validatedNamespaces, System.Xml.Schema.XmlSchemaValidator._validationFlags, System.Xml.Schema.XmlSchemaValidator._xmlResolver, System.Collections.Hashtable.Add(), System.Xml.Schema.XmlSchemaValidator.CheckElementProperties(), System.Xml.Schema.XmlSchemaValidator.CheckStateTransition(), System.Xml.Schema.XmlSchemaValidator.CheckXsiTypeAndNil(), System.Collections.Hashtable.Clear(), System.Xml.Schema.XmlSchemaValidator.ClearPSVI(), System.Xml.Dictionary, System.Xml.Schema.XmlSchemaValidator.FastGetElementDecl(), System.Xml.Schema.SchemaInfo.GetElementDecl(), System.Xml.Schema.XmlSchemaValidator.GetSchemaElement(), System.Xml.XmlQualifiedName.Init(), System.Xml.Schema.ValidationState.IsNill, System.Xml.Schema.XmlSchemaValidator.ProcessSchemaHints, System.Xml.Schema.XmlSchemaValidator.ProcessSchemaLocations(), System.Xml.Schema.XmlSchemaValidator.Push(), System.Xml.Schema.XmlSchemaValidator.s_methodNames, System.Xml.Schema.XmlSchemaValidator.ThrowDeclNotFoundWarningOrError(), System.Xml.Schema.XmlSchemaValidator.ValidateElementContext(), System.Xml.Schema.XmlSchemaValidator.ValidateStartElementIdentityConstraints(), and System.Xml.Schema.ValidationState.Validity.