internal override bool CompileAttribute(Compiler compiler) {
string name = compiler.Input.LocalName;
string value = compiler.Input.Value;
if (Keywords.Equals(name, compiler.Atoms.Match)) {
Debug.Assert(this.matchKey == Compiler.InvalidQueryKey);
this.matchKey = compiler.AddQuery(value, /*allowVars:*/false, /*allowKey:*/true, /*pattern*/true);
}
else if (Keywords.Equals(name, compiler.Atoms.Name)) {
Debug.Assert(this.name == null);
this.name = compiler.CreateXPathQName(value);
}
else if (Keywords.Equals(name, compiler.Atoms.Priority)) {
Debug.Assert(Double.IsNaN(this.priority));
this.priority = XmlConvert.ToXPathDouble(value);
if (double.IsNaN(this.priority) && ! compiler.ForwardCompatibility) {
throw XsltException.Create(Res.Xslt_InvalidAttrValue, Keywords.s_Priority, value);
}
}
else if (Keywords.Equals(name, compiler.Atoms.Mode)) {
Debug.Assert(this.mode == null);
if (compiler.AllowBuiltInMode && value == "*") {
this.mode = Compiler.BuiltInMode;
}
else {
this.mode = compiler.CreateXPathQName(value);
}
}
else {
return false;
}
return true;
}