@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
@Override public void processAllAttributes() throws XPathException { String mode = getAttributeValue("mode"); mode = mode == null ? "" : Whitespace.trim(mode); if (!isDeferredCompilation(getCompilation())) { super.processAllAttributes(); //TODO - sort out the duplicated code. This repeats the code below } else { processDefaultCollationAttribute(); processDefaultMode(); staticContext = new ExpressionContext(this, null); processAttributes(); } }
@Override public void processAllAttributes() throws XPathException { String mode = getAttributeValue("mode"); mode = mode == null ? "" : Whitespace.trim(mode); if (!isDeferredCompilation(getCompilation())) { super.processAllAttributes(); //TODO - sort out the duplicated code. This repeats the code below } else { processDefaultCollationAttribute(); processDefaultMode(); staticContext = new ExpressionContext(this, null); processAttributes(); } }
if (isDeferredCompilation(compilation)) { createSkeletonTemplate(compilation, decl);
/** * Compile: creates the executable form of the template */ public void compileDeclaration(Compilation compilation, ComponentDeclaration decl) throws XPathException { if (isDeferredCompilation(compilation)) { createSkeletonTemplate(compilation, decl); //System.err.println("Deferred - " + ++lazy); return; } if (compilation.getCompilerInfo().getOptimizerOptions().isSet(OptimizerOptions.TAIL_CALLS)) { isTailRecursive = markTailCalls(); } Expression body = compileSequenceConstructor(compilation, decl, true); body.restoreParentPointers(); RetainedStaticContext rsc = makeRetainedStaticContext(); if (body.getRetainedStaticContext() == null) { body.setRetainedStaticContext(rsc); // bug 2608 } if (match != null && compilation.getConfiguration().getBooleanProperty(Feature.STRICT_STREAMABILITY) && isWithinDeclaredStreamableConstruct()) { checkStrictStreamability(body); } if (getTemplateName() != null) { compileNamedTemplate(compilation, body, decl); } if (match != null) { //System.err.println("Rules compiled - " + ++eager); compileTemplateRule(compilation, body, decl); } }
match = match.optimize(visitor, cisi); if (!isDeferredCompilation(getCompilation())) { Expression body = compiledTemplateRules.values().stream().findFirst().map(TemplateRule::getBody).orElse(null);
match = match.optimize(visitor, cisi); if (!isDeferredCompilation(getCompilation())) { Expression body = compiledTemplateRules.values().stream().findFirst().map(TemplateRule::getBody).orElse(null);