public int AddVariable(XslLocalVariable v) { if (this.curVarScope == null) { throw new XsltCompileException("Not initialized variable", null, this.Input); } return(this.curVarScope.AddVariable(v)); }
Expression IStaticXsltContext.TryGetVariable(string nm) { if (this.curVarScope == null) { return(null); } XslLocalVariable xslLocalVariable = this.curVarScope.ResolveStatic(XslNameUtil.FromString(nm, this.Input)); if (xslLocalVariable == null) { return(null); } return(new XPathVariableBinding(xslLocalVariable)); }
public XslLocalVariable Resolve(XslTransformProcessor p, XmlQualifiedName name) { for (VariableScope variableScope = this; variableScope != null; variableScope = variableScope.Parent) { if (variableScope.variables != null) { XslLocalVariable xslLocalVariable = variableScope.variables[name] as XslLocalVariable; if (xslLocalVariable != null && xslLocalVariable.IsEvaluated(p)) { return(xslLocalVariable); } } } return(null); }
public XslLocalVariable ResolveStatic(XmlQualifiedName name) { for (VariableScope variableScope = this; variableScope != null; variableScope = variableScope.Parent) { if (variableScope.variables != null) { XslLocalVariable xslLocalVariable = variableScope.variables[name] as XslLocalVariable; if (xslLocalVariable != null) { return(xslLocalVariable); } } } return(null); }
public XslLocalVariable Resolve(XslTransformProcessor p, QName name) { for (VariableScope s = this; s != null; s = s.Parent) { if (s.variables == null) { continue; } XslLocalVariable v = s.variables [name] as XslLocalVariable; if (v != null && v.IsEvaluated(p)) { return(v); } } return(null); }
public XslLocalVariable ResolveStatic(QName name) { for (VariableScope s = this; s != null; s = s.Parent) { if (s.variables == null) { continue; } XslLocalVariable v = s.variables [name] as XslLocalVariable; if (v != null) { return(v); } } return(null); }
Expression IStaticXsltContext.TryGetVariable(string nm) { if (curVarScope == null) { return(null); } XslLocalVariable var = curVarScope.ResolveStatic(XslNameUtil.FromString(nm, Input)); if (var == null) { return(null); } return(new XPathVariableBinding(var)); }
public int AddVariable(XslLocalVariable v) { if (variables == null) { variableNames = new ArrayList(); variables = new Hashtable(); } variables [v.Name] = v; int idx = variableNames.IndexOf(v.Name); if (idx >= 0) { return(idx); } variableNames.Add(v.Name); return(nextSlot++); }
public int AddVariable(XslLocalVariable v) { if (this.variables == null) { this.variableNames = new ArrayList(); this.variables = new Hashtable(); } this.variables[v.Name] = v; int num = this.variableNames.IndexOf(v.Name); if (num >= 0) { return(num); } this.variableNames.Add(v.Name); return(this.nextSlot++); }