Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AttributeSetAction.cs
Go to the documentation of this file.
2
4
6{
8
10
17
18 internal override bool CompileAttribute(Compiler compiler)
19 {
20 string localName = compiler.Input.LocalName;
21 string value = compiler.Input.Value;
22 if (Ref.Equal(localName, compiler.Atoms.Name))
23 {
24 name = compiler.CreateXPathQName(value);
25 }
26 else
27 {
28 if (!Ref.Equal(localName, compiler.Atoms.UseAttributeSets))
29 {
30 return false;
31 }
32 AddAction(compiler.CreateUseAttributeSetsAction());
33 }
34 return true;
35 }
36
38 {
40 if (!compiler.Recurse())
41 {
42 return;
43 }
44 do
45 {
46 switch (input.NodeType)
47 {
48 case XPathNodeType.Element:
49 {
50 compiler.PushNamespaceScope();
52 string localName = input.LocalName;
53 if (Ref.Equal(namespaceURI, input.Atoms.UriXsl) && Ref.Equal(localName, input.Atoms.Attribute))
54 {
55 AddAction(compiler.CreateAttributeAction());
56 compiler.PopScope();
57 break;
58 }
59 throw compiler.UnexpectedKeyword();
60 }
61 default:
62 throw XsltException.Create(System.SR.Xslt_InvalidContents, "attribute-set");
63 case XPathNodeType.SignificantWhitespace:
64 case XPathNodeType.Whitespace:
65 case XPathNodeType.ProcessingInstruction:
66 case XPathNodeType.Comment:
67 break;
68 }
69 }
70 while (compiler.Advance());
71 compiler.ToParent();
72 }
73
75 {
76 int num = 0;
78 while ((action = attributeAction.GetAction(num)) != null)
79 {
81 num++;
82 }
83 }
84}
static string Xslt_InvalidContents
Definition SR.cs:2076
Definition SR.cs:7
static bool Equal(string strA, string strB)
Definition Ref.cs:5
static XsltException Create(string res, params string[] args)
override void Compile(Compiler compiler)
override bool CompileAttribute(Compiler compiler)
void Merge(AttributeSetAction attributeAction)
void CompileAttributes(Compiler compiler)
void CheckRequiredAttribute(Compiler compiler, object attrValue, string attrName)