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

◆ CompileAttribute()

override bool System.Xml.Xsl.XsltOld.TemplateAction.CompileAttribute ( Compiler compiler)
inlinepackagevirtual

Reimplemented from System.Xml.Xsl.XsltOld.CompiledAction.

Definition at line 72 of file TemplateAction.cs.

73 {
74 string localName = compiler.Input.LocalName;
75 string value = compiler.Input.Value;
76 if (Ref.Equal(localName, compiler.Atoms.Match))
77 {
79 }
80 else if (Ref.Equal(localName, compiler.Atoms.Name))
81 {
82 _name = compiler.CreateXPathQName(value);
83 }
84 else if (Ref.Equal(localName, compiler.Atoms.Priority))
85 {
86 _priority = XmlConvert.ToXPathDouble(value);
87 if (double.IsNaN(_priority) && !compiler.ForwardCompatibility)
88 {
89 throw XsltException.Create(System.SR.Xslt_InvalidAttrValue, "priority", value);
90 }
91 }
92 else
93 {
94 if (!Ref.Equal(localName, compiler.Atoms.Mode))
95 {
96 return false;
97 }
98 if (compiler.AllowBuiltInMode && value == "*")
99 {
100 _mode = Compiler.BuiltInMode;
101 }
102 else
103 {
104 _mode = compiler.CreateXPathQName(value);
105 }
106 }
107 return true;
108 }
static string Xslt_InvalidAttrValue
Definition SR.cs:1884
Definition SR.cs:7

References System.Xml.Xsl.XsltOld.TemplateAction._matchKey, System.Xml.Xsl.XsltOld.TemplateAction._mode, System.Xml.Xsl.XsltOld.TemplateAction._name, System.Xml.Xsl.XsltOld.TemplateAction._priority, System.Xml.Xsl.XsltOld.Compiler.BuiltInMode, System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.Xml.XmlConvert.ToXPathDouble(), System.value, and System.SR.Xslt_InvalidAttrValue.