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; }