/** * Bind a variable to an object that can be used to refer to it * * @param qName the name of the variable * @return a VariableDeclaration object that can be used to identify it in the Bindery, * @throws net.sf.saxon.trans.XPathException * if the variable has not been declared */ @Override public Expression bindVariable(StructuredQName qName) throws XPathException { SourceBinding siblingVar = bindLocalVariable(qName); if (siblingVar == null) { return super.bindVariable(qName); } else { VariableReference var = new LocalVariableReference(qName); siblingVar.registerReference(var); return var; } }
/** * Bind a variable to an object that can be used to refer to it * * @param qName the name of the variable * @return a VariableDeclaration object that can be used to identify it in the Bindery, * @throws net.sf.saxon.trans.XPathException * if the variable has not been declared */ @Override public Expression bindVariable(StructuredQName qName) throws XPathException { SourceBinding siblingVar = bindLocalVariable(qName); if (siblingVar == null) { return super.bindVariable(qName); } else { VariableReference var = new LocalVariableReference(qName); siblingVar.registerReference(var); return var; } }
var.setStaticType(compiledVar.getRequiredType(), sourceBinding.getConstantValue(), 0); } else { sourceBinding.registerReference(var); sourceBinding.registerReference(var); return var;
var.setStaticType(compiledVar.getRequiredType(), sourceBinding.getConstantValue(), 0); } else { sourceBinding.registerReference(var); sourceBinding.registerReference(var); return var;