/** * Ask whether the code is compiled in schema-aware mode * * @return true if the compilation is schema-aware */ public boolean isSchemaAware() { return getCompilation().isSchemaAware(); }
/** * Get the principal stylesheet module of the package in which * this XSLT element appears * * @return the containing package */ public PrincipalStylesheetModule getPrincipalStylesheetModule() { return getCompilation().getPrincipalStylesheetModule(); }
/** * Get the principal stylesheet module of the package in which * this XSLT element appears * * @return the containing package */ public PrincipalStylesheetModule getPrincipalStylesheetModule() { return getCompilation().getPrincipalStylesheetModule(); }
/** * Ask whether the code is compiled in schema-aware mode * * @return true if the compilation is schema-aware */ public boolean isSchemaAware() { return getCompilation().isSchemaAware(); }
/** * Get the optimization options in use. By default these are taken from the * {@link Configuration} * * @return the optimization options in use * @since 9.9 */ @Override public OptimizerOptions getOptimizerOptions() { return element.getCompilation().getCompilerInfo().getOptimizerOptions(); }
/** * Get the KeyManager, containing definitions of keys available for use. * * @return the KeyManager. This is used to resolve key names, both explicit calls * on key() used in XSLT, and system-generated calls on key() which may * also appear in XQuery and XPath */ public KeyManager getKeyManager() { return element.getCompilation().getPrincipalStylesheetModule().getKeyManager(); }
/** * Get a DecimalFormatManager to resolve the names of decimal formats used in calls * to the format-number() function. * * @return the decimal format manager for this static context, or null if named decimal * formats are not supported in this environment. */ public DecimalFormatManager getDecimalFormatManager() { return element.getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); }
/** * Get a DecimalFormatManager to resolve the names of decimal formats used in calls * to the format-number() function. * * @return the decimal format manager for this static context, or null if named decimal * formats are not supported in this environment. */ public DecimalFormatManager getDecimalFormatManager() { return element.getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); }
/** * Get the optimization options in use. By default these are taken from the * {@link Configuration} * * @return the optimization options in use * @since 9.9 */ @Override public OptimizerOptions getOptimizerOptions() { return element.getCompilation().getCompilerInfo().getOptimizerOptions(); }
/** * Get the KeyManager, containing definitions of keys available for use. * * @return the KeyManager. This is used to resolve key names, both explicit calls * on key() used in XSLT, and system-generated calls on key() which may * also appear in XQuery and XPath */ public KeyManager getKeyManager() { return element.getCompilation().getPrincipalStylesheetModule().getKeyManager(); }
/** * Report a warning to the error listener * * @param error an exception containing the warning text */ protected void issueWarning(XPathException error) { if (error.getLocator() == null) { error.setLocator(this); } getCompilation().reportWarning(error); }
/** * Report a warning to the error listener * * @param error an exception containing the warning text */ protected void issueWarning(XPathException error) { if (error.getLocator() == null) { error.setLocator(this); } getCompilation().reportWarning(error); }
public void compileWarning(String message, StructuredQName errorCode) { XPathException tce = new XPathException(message); tce.setErrorCodeQName(errorCode); tce.setLocator(this); getCompilation().reportWarning(tce); }
public void compileWarning(String message, String errorCode) { XPathException tce = new XPathException(message); tce.setErrorCode(errorCode); tce.setLocator(this); getCompilation().reportWarning(tce); }
public void compileWarning(String message, String errorCode) { XPathException tce = new XPathException(message); tce.setErrorCode(errorCode); tce.setLocator(this); getCompilation().reportWarning(tce); }
public void compileWarning(String message, StructuredQName errorCode) { XPathException tce = new XPathException(message); tce.setErrorCodeQName(errorCode); tce.setLocator(this); getCompilation().reportWarning(tce); }
private void notStreamable(StyleElement rule, String message) throws XPathException { boolean fallback = getConfiguration().getBooleanProperty(Feature.STREAMING_FALLBACK); if (fallback) { message += ". Falling back to non-streaming implementation"; rule.compileWarning(message, "XTSE3430"); rule.getCompilation().setFallbackToNonStreaming(true); } else { rule.compileError(message, "XTSE3430"); } }
private void notStreamable(StyleElement rule, String message) throws XPathException { boolean fallback = getConfiguration().getBooleanProperty(Feature.STREAMING_FALLBACK); if (fallback) { message += ". Falling back to non-streaming implementation"; rule.compileWarning(message, "XTSE3430"); rule.getCompilation().setFallbackToNonStreaming(true); } else { rule.compileError(message, "XTSE3430"); } }
/** * Check for schema-awareness. * Typed input nodes are recognized if and only if the stylesheet contains an import-schema declaration. */ private void checkForSchemaAwareness() { Compilation compilation = getRootElement().getCompilation(); if (!compilation.isSchemaAware() && getConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XSLT)) { for (ComponentDeclaration decl : topLevel) { StyleElement node = decl.getSourceElement(); if (node instanceof XSLImportSchema) { compilation.setSchemaAware(true); return; } } } }
/** * Check for schema-awareness. * Typed input nodes are recognized if and only if the stylesheet contains an import-schema declaration. */ private void checkForSchemaAwareness() { Compilation compilation = getRootElement().getCompilation(); if (!compilation.isSchemaAware() && getConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XSLT)) { for (ComponentDeclaration decl : topLevel) { StyleElement node = decl.getSourceElement(); if (node instanceof XSLImportSchema) { compilation.setSchemaAware(true); return; } } } }