public bool AddVarPar(VarPar var) {
Debug.Assert(var.NodeType == XslNodeType.Variable || var.NodeType == XslNodeType.Param);
Debug.Assert(var.Name.NamespaceUri != null, "Name must be resolved in XsltLoader");
foreach (XslNode prevVar in GlobalVarPars) {
if (prevVar.Name.Equals(var.Name)) {
// [ERR XT0630] It is a static error if a stylesheet contains more than one binding
// of a global variable with the same name and same import precedence, unless it also
// contains another binding with the same name and higher import precedence.
return compiler.AllGlobalVarPars.ContainsKey(var.Name);
}
}
GlobalVarPars.Add(var);
return true;
}