public Configuration getConfiguration() { return compilation.getConfiguration(); }
public Configuration getConfiguration() { return compilation.getConfiguration(); }
/** * Get the StyleNodeFactory used to build the stylesheet tree * * @param topLevel true if the factory is for the top-level (package) module of a package * @return the StyleNodeFactory */ public StyleNodeFactory getStyleNodeFactory(boolean topLevel) { StyleNodeFactory factory = getConfiguration().makeStyleNodeFactory(this); factory.setTopLevelModule(topLevel); return factory; }
/** * Get the StyleNodeFactory used to build the stylesheet tree * * @param topLevel true if the factory is for the top-level (package) module of a package * @return the StyleNodeFactory */ public StyleNodeFactory getStyleNodeFactory(boolean topLevel) { StyleNodeFactory factory = getConfiguration().makeStyleNodeFactory(this); factory.setTopLevelModule(topLevel); return factory; }
/** * Report a compile time warning. This calls the errorListener to output details * of the warning. * * @param err an exception holding details of the warning condition to be * reported */ public void reportWarning(XPathException err) { ErrorListener el = compilerInfo.getErrorListener(); if (el == null) { el = getConfiguration().getErrorListener(); } if (el != null) { try { el.warning(err); } catch (Exception err2) { // ignore secondary error } } }
/** * Report a compile time warning. This calls the errorListener to output details * of the warning. * * @param err an exception holding details of the warning condition to be * reported */ public void reportWarning(XPathException err) { ErrorListener el = compilerInfo.getErrorListener(); if (el == null) { el = getConfiguration().getErrorListener(); } if (el != null) { try { el.warning(err); } catch (Exception err2) { // ignore secondary error } } }
public void setMinimalPackageData() { if (getPackageData() == null) { // Create a temporary PackageData for use during use-when processing PackageData pd = new PackageData(getConfiguration()); pd.setHostLanguage(Configuration.XSLT); pd.setTargetEdition(compilerInfo.getTargetEdition()); pd.setSchemaAware(schemaAware); packageData = pd; } }
public void setMinimalPackageData() { if (getPackageData() == null) { // Create a temporary PackageData for use during use-when processing PackageData pd = new PackageData(getConfiguration()); pd.setHostLanguage(Configuration.XSLT); pd.setTargetEdition(compilerInfo.getTargetEdition()); pd.setSchemaAware(schemaAware); packageData = pd; } }
public Expression compile(Compilation exec, ComponentDeclaration decl) { CopyOf inst = new CopyOf(select, copyNamespaces, validation, schemaType, false); inst.setCopyAccumulators(copyAccumulators); inst.setCopyLineNumbers(exec.getConfiguration().isLineNumbering()); inst.setSchemaAware(exec.isSchemaAware()); return inst; }
/** * Report a compile time error. This calls the errorListener to output details * of the error, and increments an error count. * * @param err the exception containing details of the error */ public void reportError(XPathException err) { ErrorListener el = compilerInfo.getErrorListener(); if (el == null) { el = getConfiguration().getErrorListener(); } if (!err.hasBeenReported()) { errorCount++; try { el.fatalError(err); err.setHasBeenReported(true); } catch (Exception err2) { // ignore secondary error } } else if (errorCount == 0) { errorCount++; } }
/** * Report a compile time error. This calls the errorListener to output details * of the error, and increments an error count. * * @param err the exception containing details of the error */ public void reportError(XPathException err) { ErrorListener el = compilerInfo.getErrorListener(); if (el == null) { el = getConfiguration().getErrorListener(); } if (!err.hasBeenReported()) { errorCount++; try { el.fatalError(err); err.setHasBeenReported(true); } catch (Exception err2) { // ignore secondary error } } else if (errorCount == 0) { errorCount++; } }
/** * Create a static context for evaluating use-when expressions * * @param compilation the package compilation episode * @param namespaceContext the namespace context in which the static expression appears */ public UseWhenStaticContext(Compilation compilation, NamespaceResolver namespaceContext) { Configuration config = compilation.getConfiguration(); setConfiguration(config); this.compilation = compilation; setPackageData(compilation.getPackageData()); this.namespaceContext = namespaceContext; setXPathLanguageLevel(31); FunctionLibraryList lib = new FunctionLibraryList(); lib.addFunctionLibrary(config.getUseWhenFunctionSet()); lib.addFunctionLibrary(getConfiguration().getBuiltInExtensionLibraryList()); lib.addFunctionLibrary(new ConstructorFunctionLibrary(getConfiguration())); lib.addFunctionLibrary(config.getIntegratedFunctionLibrary()); config.addExtensionBinders(lib); functionLibrary = lib; }
/** * Create a static context for evaluating use-when expressions * * @param compilation the package compilation episode * @param namespaceContext the namespace context in which the static expression appears */ public UseWhenStaticContext(Compilation compilation, NamespaceResolver namespaceContext) { Configuration config = compilation.getConfiguration(); setConfiguration(config); this.compilation = compilation; setPackageData(compilation.getPackageData()); this.namespaceContext = namespaceContext; setXPathLanguageLevel(31); FunctionLibraryList lib = new FunctionLibraryList(); lib.addFunctionLibrary(config.getUseWhenFunctionSet()); lib.addFunctionLibrary(getConfiguration().getBuiltInExtensionLibraryList()); lib.addFunctionLibrary(new ConstructorFunctionLibrary(getConfiguration())); lib.addFunctionLibrary(config.getIntegratedFunctionLibrary()); config.addExtensionBinders(lib); functionLibrary = lib; }
if (match != null && compilation.getConfiguration().getBooleanProperty(Feature.STRICT_STREAMABILITY) && isWithinDeclaredStreamableConstruct()) { checkStrictStreamability(body);
/** * Constructor - deliberately protected * * @param compilation Compilation options */ public PreparedStylesheet(Compilation compilation) { super(compilation.getConfiguration()); CompilerInfo compilerInfo = compilation.getCompilerInfo(); setHostLanguage(Configuration.XSLT); if (compilerInfo.isSchemaAware()) { int localLic = compilation.getPackageData().getLocalLicenseId(); getConfiguration().checkLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XSLT, "schema-aware XSLT", localLic); schemaAware = true; } //setSchemaAware(compilerInfo.isSchemaAware()); if (compilerInfo.getErrorListener() == null) { compilerInfo.setErrorListener(getConfiguration().getErrorListener()); } defaultInitialMode = compilerInfo.getDefaultInitialMode(); defaultInitialTemplate = compilerInfo.getDefaultInitialTemplate(); recoveryPolicy = compilerInfo.getRecoveryPolicy(); messageReceiverClassName = compilerInfo.getMessageReceiverClassName(); outputURIResolver = compilerInfo.getOutputURIResolver(); compileTimeParams = compilation.getParameters(); }
/** * Constructor - deliberately protected * * @param compilation Compilation options */ public PreparedStylesheet(Compilation compilation) { super(compilation.getConfiguration()); CompilerInfo compilerInfo = compilation.getCompilerInfo(); setHostLanguage(Configuration.XSLT); if (compilerInfo.isSchemaAware()) { int localLic = compilation.getPackageData().getLocalLicenseId(); getConfiguration().checkLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XSLT, "schema-aware XSLT", localLic); schemaAware = true; } //setSchemaAware(compilerInfo.isSchemaAware()); if (compilerInfo.getErrorListener() == null) { compilerInfo.setErrorListener(getConfiguration().getErrorListener()); } defaultInitialMode = compilerInfo.getDefaultInitialMode(); defaultInitialTemplate = compilerInfo.getDefaultInitialTemplate(); recoveryPolicy = compilerInfo.getRecoveryPolicy(); messageReceiverClassName = compilerInfo.getMessageReceiverClassName(); outputURIResolver = compilerInfo.getOutputURIResolver(); compileTimeParams = compilation.getParameters(); }
/** * 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); } }
conversion = exec.getConfiguration().getTypeChecker(false).staticTypeCheck( pref, declaredType,
conversion = exec.getConfiguration().getTypeChecker(false).staticTypeCheck( pref, declaredType,
@Override public void compileDeclaration(Compilation compilation, ComponentDeclaration decl) throws XPathException { Configuration config = compilation.getConfiguration();