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

◆ GetSingleAttribute()

string System.Xml.Xsl.XsltOld.Compiler.GetSingleAttribute ( string attributeAtom)
inlinepackage

Definition at line 402 of file Compiler.cs.

403 {
404 NavigatorInput input = Input;
405 string localName = input.LocalName;
406 string text = null;
407 if (input.MoveToFirstAttribute())
408 {
409 do
410 {
411 string namespaceURI = input.NamespaceURI;
412 string localName2 = input.LocalName;
413 if (namespaceURI.Length == 0)
414 {
415 if (Ref.Equal(localName2, attributeAtom))
416 {
417 text = input.Value;
418 }
419 else if (!ForwardCompatibility)
420 {
421 throw XsltException.Create(System.SR.Xslt_InvalidAttribute, localName2, localName);
422 }
423 }
424 }
425 while (input.MoveToNextAttribute());
426 input.ToParent();
427 }
428 if (text == null)
429 {
430 throw XsltException.Create(System.SR.Xslt_MissingAttribute, attributeAtom);
431 }
432 return text;
433 }
static string Xslt_MissingAttribute
Definition SR.cs:1882
static string Xslt_InvalidAttribute
Definition SR.cs:1880
Definition SR.cs:7

References System.Xml.Xsl.XsltException.Create(), System.Xml.Ref.Equal(), System.Xml.Xsl.XsltOld.Compiler.ForwardCompatibility, System.input, System.Xml.Xsl.XsltOld.Compiler.Input, System.Xml.Xsl.XsltOld.NavigatorInput.LocalName, System.text, System.SR.Xslt_InvalidAttribute, and System.SR.Xslt_MissingAttribute.