/** * Declare the default collation * * @param uri the absolute URI of the default collation. This URI must identify a known collation; * either one that has been explicitly declared, or one that is recognized implicitly, * such as a UCA collation * @throws IllegalStateException if the collation URI is not recognized as a known collation * @since 9.4 */ public void declareDefaultCollation(String uri) { StringCollator c; try { c = getProcessor().getUnderlyingConfiguration().getCollation(uri); } catch (XPathException e) { c = null; } if (c == null) { throw new IllegalStateException("Unknown collation " + uri); } env.setDefaultCollationName(uri); }
/** * Declare the default collation * * @param uri the absolute URI of the default collation. This URI must identify a known collation; * either one that has been explicitly declared, or one that is recognized implicitly, * such as a UCA collation * @throws IllegalStateException if the collation URI is not recognized as a known collation * @since 9.4 */ public void declareDefaultCollation(String uri) { StringCollator c; try { c = getProcessor().getUnderlyingConfiguration().getCollation(uri); } catch (XPathException e) { c = null; } if (c == null) { throw new IllegalStateException("Unknown collation " + uri); } env.setDefaultCollationName(uri); }
/** * Request fast compilation. Fast compilation will generally be achieved at the expense of run-time performance * and quality of diagnostics. Fast compilation is a good trade-off if (a) the expression is known to be correct, * and (b) once compiled, it is only executed once against a document of modest size. * @param fast set to true to request fast compilation; set to false to revert to the optimization options * defined in the Configuration. * * @since 9.9 */ public void setFastCompilation(boolean fast) { if (fast) { env.setOptimizerOptions(new OptimizerOptions(0)); } else { env.setOptimizerOptions(getProcessor().getUnderlyingConfiguration().getOptimizerOptions()); } }
/** * Request fast compilation. Fast compilation will generally be achieved at the expense of run-time performance * and quality of diagnostics. Fast compilation is a good trade-off if (a) the expression is known to be correct, * and (b) once compiled, it is only executed once against a document of modest size. * @param fast set to true to request fast compilation; set to false to revert to the optimization options * defined in the Configuration. * * @since 9.9 */ public void setFastCompilation(boolean fast) { if (fast) { env.setOptimizerOptions(new OptimizerOptions(0)); } else { env.setOptimizerOptions(getProcessor().getUnderlyingConfiguration().getOptimizerOptions()); } }