use of org.sirix.service.xml.xpath.expr.VariableAxis in project sirix by sirixdb.
the class PipelineBuilder method addVariableExpr.
/**
* Adds a variable expression to the pipeline. Adds the expression that will evaluate the results
* the variable holds.
*
* @param mTransaction Transaction to operate with.
* @param mVarName name of the variable
*/
public void addVariableExpr(final XdmNodeReadTrx mTransaction, final String mVarName) {
assert getPipeStack().size() >= 1;
final Axis bindingSeq = getPipeStack().pop().getExpr();
final Axis axis = new VariableAxis(mTransaction, bindingSeq);
mVarRefMap.put(mVarName, axis);
if (getPipeStack().empty() || getExpression().getSize() != 0) {
addExpressionSingle();
}
getExpression().add(axis);
}
Aggregations