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

◆ ValidateStartElement()

void System.Xml.Schema.XsdValidator.ValidateStartElement ( )
inlineprivate

Definition at line 446 of file XsdValidator.cs.

447 {
448 if (context.ElementDecl != null)
449 {
451 {
453 }
456 {
458 context.IsNill = true;
459 }
460 else
461 {
463 }
465 {
467 }
468 }
470 {
471 return;
472 }
473 do
474 {
475 if ((object)reader.NamespaceURI == _nsXmlNs || (object)reader.NamespaceURI == _nsXsi)
476 {
477 continue;
478 }
479 try
480 {
482 XmlQualifiedName xmlQualifiedName = new XmlQualifiedName(reader.LocalName, reader.NamespaceURI);
483 bool skip = _processContents == XmlSchemaContentProcessing.Skip;
485 if (attributeXsd != null)
486 {
488 {
490 }
492 if (attributeXsd.Datatype != null)
493 {
495 }
497 {
499 }
500 }
501 else if (!skip)
502 {
503 if (context.ElementDecl == null && _processContents == XmlSchemaContentProcessing.Strict && xmlQualifiedName.Namespace.Length != 0 && schemaInfo.Contains(xmlQualifiedName.Namespace))
504 {
506 }
507 else
508 {
510 }
511 }
512 }
513 catch (XmlSchemaException ex)
514 {
515 ex.SetSource(reader.BaseURI, base.PositionInfo.LineNumber, base.PositionInfo.LinePosition);
517 }
518 }
519 while (reader.MoveToNextAttribute());
521 }
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
static string Sch_NoAttributeSchemaFound
Definition SR.cs:788
static string Sch_AbstractElement
Definition SR.cs:870
static string Sch_UndeclaredAttribute
Definition SR.cs:414
Definition SR.cs:7
void SendValidationEvent(string code)
XmlValidatingReaderImpl reader
SchemaAttDef GetAttributeXsd(SchemaElementDecl ed, XmlQualifiedName qname, XmlSchemaObject partialValidationType, out AttributeMatchState attributeMatchState)
object UnWrapUnion(object typedValue)
void AttributeIdentityConstraints(string name, string ns, object obj, string sobj, SchemaAttDef attdef)
XmlSchemaContentProcessing _processContents
void CheckValue(string value, SchemaAttDef attdef)

References System.Xml.Schema.XsdValidator._attPresence, System.Xml.Schema.XsdValidator._nsXmlNs, System.Xml.Schema.XsdValidator._nsXsi, System.Xml.Schema.XsdValidator._processContents, System.Xml.Schema.XsdValidator._startIDConstraint, System.Collections.Hashtable.Add(), System.Xml.Schema.XsdValidator.AttributeIdentityConstraints(), System.Xml.XmlValidatingReaderImpl.BaseURI, System.Xml.Schema.XsdValidator.CheckValue(), System.Collections.Hashtable.Clear(), System.Xml.Schema.SchemaInfo.Contains(), System.Xml.Schema.BaseValidator.context, System.Xml.Schema.SchemaDeclBase.DefaultValueTyped, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.Schema.SchemaInfo.GetAttributeXsd(), System.Xml.Schema.XsdValidator.HasIdentityConstraints, System.Xml.Schema.SchemaElementDecl.HasRequiredAttribute, System.Xml.Schema.SchemaElementDecl.IsAbstract, System.Xml.XmlValidatingReaderImpl.IsEmptyElement, System.Xml.Schema.ValidationState.IsNill, System.Xml.Schema.ValidationState.LocalName, System.Xml.XmlValidatingReaderImpl.LocalName, System.Xml.XmlValidatingReaderImpl.MoveToElement(), System.Xml.XmlValidatingReaderImpl.MoveToFirstAttribute(), System.Xml.XmlValidatingReaderImpl.MoveToNextAttribute(), System.Xml.Schema.ValidationState.Namespace, System.Xml.XmlValidatingReaderImpl.NamespaceURI, System.Xml.Schema.XmlSchemaValidator.QNameString(), System.Xml.Schema.BaseValidator.reader, System.SR.Sch_AbstractElement, System.SR.Sch_NoAttributeSchemaFound, System.SR.Sch_UndeclaredAttribute, System.Xml.Schema.BaseValidator.schemaInfo, System.Xml.Schema.SchemaDeclBase.SchemaType, System.Xml.Schema.BaseValidator.SendValidationEvent(), System.Xml.XmlValidatingReaderImpl.TypedValueObject, System.Xml.Schema.XsdValidator.UnWrapUnion(), and System.Xml.XmlValidatingReaderImpl.Value.

Referenced by System.Xml.Schema.XsdValidator.ProcessElement().