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

◆ CompileKey()

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

Definition at line 246 of file ContainerAction.cs.

247 {
248 NavigatorInput input = compiler.Input;
249 string localName = input.LocalName;
250 int num = -1;
251 int num2 = -1;
252 XmlQualifiedName xmlQualifiedName = null;
253 if (input.MoveToFirstAttribute())
254 {
255 do
256 {
257 string namespaceURI = input.NamespaceURI;
258 string localName2 = input.LocalName;
259 string value = input.Value;
260 if (namespaceURI.Length == 0)
261 {
262 if (Ref.Equal(localName2, input.Atoms.Name))
263 {
264 xmlQualifiedName = compiler.CreateXPathQName(value);
265 }
266 else if (Ref.Equal(localName2, input.Atoms.Match))
267 {
268 num = compiler.AddQuery(value, allowVar: false, allowKey: false, isPattern: true);
269 }
270 else if (Ref.Equal(localName2, input.Atoms.Use))
271 {
273 }
274 else if (!compiler.ForwardCompatibility)
275 {
276 throw XsltException.Create(System.SR.Xslt_InvalidAttribute, localName2, localName);
277 }
278 }
279 }
280 while (input.MoveToNextAttribute());
281 input.ToParent();
282 }
283 CheckRequiredAttribute(compiler, num != -1, "match");
284 CheckRequiredAttribute(compiler, num2 != -1, "use");
286 compiler.InsertKey(xmlQualifiedName, num, num2);
287 }
static string Xslt_InvalidAttribute
Definition SR.cs:1880
Definition SR.cs:7
void CheckRequiredAttribute(Compiler compiler, object attrValue, string attrName)

References System.Xml.Xsl.XsltOld.CompiledAction.CheckRequiredAttribute(), System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.input, System.Xml.Xsl.XsltOld.NavigatorInput.LocalName, System.value, and System.SR.Xslt_InvalidAttribute.

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