public Expression compile(Executable exec) throws XPathException { SortKeyDefinition[] sortKeys = makeSortKeys(); if (sortKeys != null) { useTailRecursion = false; } Expression sortedSequence = select; if (sortKeys != null) { sortedSequence = new SortExpression(select, sortKeys); } compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true); ApplyTemplates app = new ApplyTemplates( sortedSequence, useCurrentMode, useTailRecursion, mode, backwardsCompatibleModeIsEnabled(), implicitSelect); app.setActualParameters(getWithParamInstructions(exec, false, app), getWithParamInstructions(exec, true, app)); return app; }
public Expression compile(Executable exec) throws XPathException { SortKeyDefinition[] sortKeys = makeSortKeys(); if (sortKeys != null) { useTailRecursion = false; } Expression sortedSequence = select; if (sortKeys != null) { sortedSequence = new SortExpression(select, sortKeys); } compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true); ApplyTemplates app = new ApplyTemplates( sortedSequence, useCurrentMode, useTailRecursion, mode, backwardsCompatibleModeIsEnabled(), implicitSelect); app.setActualParameters(getWithParamInstructions(exec, false, app), getWithParamInstructions(exec, true, app)); return app; }