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

◆ ValidateAttributes()

void System.Xml.DocumentSchemaValidator.ValidateAttributes ( XmlElement elementNode)
inlineprivate

Definition at line 362 of file DocumentSchemaValidator.cs.

363 {
364 XmlAttributeCollection attributes = elementNode.Attributes;
365 XmlAttribute xmlAttribute = null;
366 for (int i = 0; i < attributes.Count; i++)
367 {
368 xmlAttribute = (XmlAttribute)(_currentNode = attributes[i]);
369 if (!Ref.Equal(xmlAttribute.NamespaceURI, _nsXmlNs))
370 {
373 {
375 }
376 }
377 }
379 {
380 return;
381 }
382 if (_defaultAttributes == null)
383 {
385 }
386 else
387 {
389 }
391 xmlAttribute = null;
392 for (int j = 0; j < _defaultAttributes.Count; j++)
393 {
395 XmlQualifiedName qualifiedName = xmlSchemaAttribute.QualifiedName;
399 xmlAttribute.AppendChild(_document.CreateTextNode(xmlSchemaAttribute.AttDef.DefaultValueRaw));
400 attributes.Append(xmlAttribute);
401 if (xmlAttribute is XmlUnspecifiedAttribute xmlUnspecifiedAttribute)
402 {
403 xmlUnspecifiedAttribute.SetSpecified(f: false);
404 }
405 }
406 }
void SetDefaultAttributeSchemaInfo(XmlSchemaAttribute schemaAttribute)
string GetDefaultPrefix(string attributeNS)
object? ValidateAttribute(string localName, string namespaceUri, string attributeValue, XmlSchemaInfo? schemaInfo)
void GetUnspecifiedDefaultAttributes(ArrayList defaultAttributes)
virtual XmlText CreateTextNode(string? text)
virtual XmlAttribute CreateDefaultAttribute(string? prefix, string localName, string? namespaceURI)
XmlName AddAttrXmlName(string prefix, string localName, string namespaceURI, IXmlSchemaInfo schemaInfo)

References System.Xml.DocumentSchemaValidator._attributeSchemaInfo, System.Xml.DocumentSchemaValidator._currentNode, System.Xml.DocumentSchemaValidator._defaultAttributes, System.Xml.DocumentSchemaValidator._document, System.Xml.DocumentSchemaValidator._nodeValueGetter, System.Xml.DocumentSchemaValidator._nsXmlNs, System.Xml.DocumentSchemaValidator._psviAugmentation, System.Xml.DocumentSchemaValidator._validator, System.Xml.XmlDocument.AddAttrXmlName(), System.Xml.XmlAttributeCollection.Append(), System.Collections.ArrayList.Clear(), System.Collections.ArrayList.Count, System.Xml.XmlAttributeCollection.Count, System.Xml.XmlDocument.CreateDefaultAttribute(), System.Xml.XmlDocument.CreateTextNode(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.Xml.DocumentSchemaValidator.GetDefaultPrefix(), System.Xml.Schema.XmlSchemaValidator.GetUnspecifiedDefaultAttributes(), System.Xml.DocumentSchemaValidator.SetDefaultAttributeSchemaInfo(), and System.Xml.Schema.XmlSchemaValidator.ValidateAttribute().

Referenced by System.Xml.DocumentSchemaValidator.ValidateElement().