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

◆ CompileSingleTemplate()

void System.Xml.Xsl.XsltOld.ContainerAction.CompileSingleTemplate ( Compiler compiler)
inlinepackageinherited

Definition at line 76 of file ContainerAction.cs.

77 {
78 NavigatorInput input = compiler.Input;
79 string text = null;
80 if (input.MoveToFirstAttribute())
81 {
82 do
83 {
84 string namespaceURI = input.NamespaceURI;
85 string localName = input.LocalName;
86 if (Ref.Equal(namespaceURI, input.Atoms.UriXsl) && Ref.Equal(localName, input.Atoms.Version))
87 {
88 text = input.Value;
89 }
90 }
91 while (input.MoveToNextAttribute());
92 input.ToParent();
93 }
94 if (text == null)
95 {
96 if (Ref.Equal(input.LocalName, input.Atoms.Stylesheet) && input.NamespaceURI == "http://www.w3.org/TR/WD-xsl")
97 {
98 throw XsltException.Create(System.SR.Xslt_WdXslNamespace);
99 }
100 throw XsltException.Create(System.SR.Xslt_WrongStylesheetElement);
101 }
102 compiler.AddTemplate(compiler.CreateSingleTemplateAction());
103 }
static string Xslt_WrongStylesheetElement
Definition SR.cs:1866
static string Xslt_WdXslNamespace
Definition SR.cs:1868
Definition SR.cs:7

References System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.input, System.Xml.Xsl.XsltOld.NavigatorInput.NamespaceURI, System.text, System.SR.Xslt_WdXslNamespace, and System.SR.Xslt_WrongStylesheetElement.

Referenced by System.Xml.Xsl.XsltOld.ContainerAction.CompileDocument().