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

◆ ValidateAttributes()

void System.Xml.Schema.XNodeValidator.ValidateAttributes ( XElement e)
inlineprivate

Definition at line 283 of file XNodeValidator.cs.

284 {
287 if (xAttribute != null)
288 {
289 do
290 {
291 xAttribute = xAttribute.next;
292 if (!xAttribute.IsNamespaceDeclaration)
293 {
295 }
296 }
297 while (xAttribute != e.lastAttr);
298 source = e;
299 }
300 if (addSchemaInfo)
301 {
302 if (defaultAttributes == null)
303 {
305 }
306 else
307 {
309 }
311 foreach (XmlSchemaAttribute defaultAttribute in defaultAttributes)
312 {
313 xAttribute = new XAttribute(XNamespace.Get(defaultAttribute.QualifiedName.Namespace).GetName(defaultAttribute.QualifiedName.Name), GetDefaultValue(defaultAttribute));
315 e.Add(xAttribute);
316 }
317 }
319 }
void Add(object? content)
static XNamespace Get(string namespaceName)
Definition XNamespace.cs:51
void RestoreLineInfo(IXmlLineInfo originalLineInfo)
void ReplaceSchemaInfo(XObject o, XmlSchemaInfo schemaInfo)
IXmlLineInfo SaveLineInfo(XObject source)
XmlSchemaInfo GetDefaultAttributeSchemaInfo(XmlSchemaAttribute sa)
string GetDefaultValue(XmlSchemaAttribute sa)
void GetUnspecifiedDefaultAttributes(ArrayList defaultAttributes)

References System.Xml.Linq.XContainer.Add(), System.Xml.Schema.XNodeValidator.addSchemaInfo, System.Collections.ArrayList.Clear(), System.Xml.Schema.XNodeValidator.defaultAttributes, System.Xml.Linq.XNamespace.Get(), System.Xml.Schema.XNodeValidator.GetDefaultAttributeSchemaInfo(), System.Xml.Schema.XNodeValidator.GetDefaultValue(), System.Xml.Schema.XmlSchemaValidator.GetUnspecifiedDefaultAttributes(), System.Xml.Linq.XElement.lastAttr, System.Xml.Schema.XNodeValidator.ReplaceSchemaInfo(), System.Xml.Schema.XNodeValidator.RestoreLineInfo(), System.Xml.Schema.XNodeValidator.SaveLineInfo(), System.Xml.Schema.XNodeValidator.source, System.Xml.Schema.XNodeValidator.ValidateAttribute(), and System.Xml.Schema.XNodeValidator.validator.

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