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

◆ LoadTemplate()

void System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate ( NsDecl stylesheetNsList)
inlineprivate

Definition at line 1104 of file XsltLoader.cs.

1105 {
1108 string text = ParseStringAttribute(0, "match");
1110 double num = double.NaN;
1111 if (_input.MoveToXsltAttribute(2, "priority"))
1112 {
1113 num = XPathConvert.StringToDouble(_input.Value);
1114 if (double.IsNaN(num) && !_input.ForwardCompatibility)
1115 {
1117 }
1118 }
1120 if (text == null)
1121 {
1124 mode = nullMode;
1125 if (_input.AttributeExists(2, "priority"))
1126 {
1127 if (V1)
1128 {
1130 }
1131 else
1132 {
1134 }
1135 }
1136 }
1137 if (_input.MoveToXsltAttribute(4, "as"))
1138 {
1139 ReportNYI("xsl:template/@as");
1140 }
1141 _curTemplate = AstFactory.Template(name, text, mode, num, _input.XslVersion);
1145 {
1147 }
1148 _curTemplate = null;
1149 }
static string Xslt_PriorityWithoutMatch
Definition SR.cs:1952
static string Xslt_DupTemplateName
Definition SR.cs:1898
static string Xslt_InvalidAttrValue
Definition SR.cs:1884
static string Xslt_BothMatchNameAbsent
Definition SR.cs:1900
static string Xslt_ModeWithoutMatch
Definition SR.cs:1944
Definition SR.cs:7
bool AddTemplate(Template template)
Definition Stylesheet.cs:73
Template(QilName name, string match, QilName mode, double priority, XslVersion xslVer)
Definition Template.cs:19
readonly QilName Name
Definition XslNode.cs:14
bool AttributeExists(int attNum, string attName)
Definition XsltInput.cs:692
bool MoveToXsltAttribute(int attNum, string attName)
Definition XsltInput.cs:681
void ReportError(string res, params string[] args)
void ReportWarning(string res, params string[] args)
static NsDecl MergeNamespaces(NsDecl thisList, NsDecl parentList)
QilName ParseQNameAttribute(int attNum)
void CheckError(bool cond, string res, params string[] args)
string ParseStringAttribute(int attNum, string attName)
List< XslNode > LoadInstructions()
QilName ParseModeListAttribute(int attNum)
QilName ParseModeAttribute(int attNum)
readonly XsltInput.XsltAttribute[] _templateAttributes
static XslNode SetInfo(XslNode to, List< XslNode > content, XsltInput.ContextInfo info)
List< XslNode > LoadEndTag(List< XslNode > content)

References System.Xml.Xsl.Xslt.XsltLoader._curStylesheet, System.Xml.Xsl.Xslt.XsltLoader._curTemplate, System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader._templateAttributes, System.Xml.Xsl.Xslt.Stylesheet.AddTemplate(), System.Xml.Xsl.Xslt.XsltInput.AttributeExists(), System.Xml.Xsl.Xslt.XsltLoader.CheckError(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.XsltInput.ForwardCompatibility, System.Xml.Xsl.Xslt.XsltInput.GetAttributes(), System.Xml.Xsl.Xslt.XsltLoader.LoadEndTag(), System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(), System.Xml.Xsl.Xslt.XsltLoader.MergeNamespaces(), System.Xml.Xsl.Xslt.XsltInput.MoveToXsltAttribute(), System.Xml.Xsl.Xslt.XslNode.Name, System.Xml.Xsl.Xslt.XsltInput.ContextInfo.nsList, System.Xml.Xsl.Xslt.XsltLoader.nullMode, System.Xml.Xsl.Xslt.XsltLoader.ParseModeAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ParseModeListAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ParseQNameAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ParseStringAttribute(), System.Xml.Xsl.Qil.QilName.QualifiedName, System.Xml.Xsl.Xslt.XsltLoader.ReportError(), System.Xml.Xsl.Xslt.XsltLoader.ReportNYI(), System.Xml.Xsl.Xslt.XsltLoader.ReportWarning(), System.Xml.Xsl.Xslt.XsltLoader.SetInfo(), System.Xml.Xsl.XPathConvert.StringToDouble(), System.Xml.Xsl.Xslt.AstFactory.Template(), System.text, System.Xml.Xsl.Xslt.XsltLoader.V1, System.Xml.Xsl.Xslt.XsltInput.Value, System.SR.Xslt_BothMatchNameAbsent, System.SR.Xslt_DupTemplateName, System.SR.Xslt_InvalidAttrValue, System.SR.Xslt_ModeWithoutMatch, System.SR.Xslt_PriorityWithoutMatch, and System.Xml.Xsl.Xslt.XsltInput.XslVersion.

Referenced by System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet().