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; }
public Expression compile(Compilation compilation, ComponentDeclaration decl) throws XPathException { SortKeyDefinitionList sortKeys = makeSortKeys(compilation, decl); if (sortKeys != null) { useTailRecursion = false; } assert select != null; Expression sortedSequence = select; if (sortKeys != null) { sortedSequence = new SortExpression(select, sortKeys); } compileSequenceConstructor(compilation, decl, true); RuleManager rm = compilation.getPrincipalStylesheetModule().getRuleManager(); ApplyTemplates app = new ApplyTemplates( sortedSequence, useCurrentMode, useTailRecursion, defaultedSelectExpression, isWithinDeclaredStreamableConstruct(), mode, rm); app.setActualParams(getWithParamInstructions(app, compilation, decl, false)); app.setTunnelParams(getWithParamInstructions(app, compilation, decl, true)); return app; }
public Expression compile(Compilation compilation, ComponentDeclaration decl) throws XPathException { SortKeyDefinitionList sortKeys = makeSortKeys(compilation, decl); if (sortKeys != null) { useTailRecursion = false; } assert select != null; Expression sortedSequence = select; if (sortKeys != null) { sortedSequence = new SortExpression(select, sortKeys); } compileSequenceConstructor(compilation, decl, true); RuleManager rm = compilation.getPrincipalStylesheetModule().getRuleManager(); ApplyTemplates app = new ApplyTemplates( sortedSequence, useCurrentMode, useTailRecursion, defaultedSelectExpression, isWithinDeclaredStreamableConstruct(), mode, rm); app.setActualParams(getWithParamInstructions(app, compilation, decl, false)); app.setTunnelParams(getWithParamInstructions(app, compilation, decl, true)); return app; }