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

◆ CompileStylesheetAttributes()

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

Definition at line 22 of file ContainerAction.cs.

23 {
24 NavigatorInput input = compiler.Input;
25 string localName = input.LocalName;
26 string text = null;
27 string text2 = null;
28 if (input.MoveToFirstAttribute())
29 {
30 do
31 {
32 string namespaceURI = input.NamespaceURI;
33 string localName2 = input.LocalName;
34 if (namespaceURI.Length != 0)
35 {
36 continue;
37 }
38 if (Ref.Equal(localName2, input.Atoms.Version))
39 {
40 text2 = input.Value;
41 if (1.0 <= XmlConvert.ToXPathDouble(text2))
42 {
44 }
45 else if (!compiler.ForwardCompatibility)
46 {
47 throw XsltException.Create(System.SR.Xslt_InvalidAttrValue, "version", text2);
48 }
49 }
50 else if (Ref.Equal(localName2, input.Atoms.ExtensionElementPrefixes))
51 {
52 compiler.InsertExtensionNamespace(input.Value);
53 }
54 else if (Ref.Equal(localName2, input.Atoms.ExcludeResultPrefixes))
55 {
56 compiler.InsertExcludedNamespace(input.Value);
57 }
58 else if (!Ref.Equal(localName2, input.Atoms.Id))
59 {
61 }
62 }
63 while (input.MoveToNextAttribute());
64 input.ToParent();
65 }
66 if (text2 == null)
67 {
68 throw XsltException.Create(System.SR.Xslt_MissingAttribute, "version");
69 }
70 if (text != null && !compiler.ForwardCompatibility)
71 {
72 throw XsltException.Create(System.SR.Xslt_InvalidAttribute, text, localName);
73 }
74 }
static string Xslt_MissingAttribute
Definition SR.cs:1882
static string Xslt_InvalidAttrValue
Definition SR.cs:1884
static string Xslt_InvalidAttribute
Definition SR.cs:1880
Definition SR.cs:7

References System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.input, System.Xml.Xsl.XsltOld.NavigatorInput.LocalName, System.text, System.Xml.XmlConvert.ToXPathDouble(), System.SR.Xslt_InvalidAttribute, System.SR.Xslt_InvalidAttrValue, and System.SR.Xslt_MissingAttribute.

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