/** * Say that the query must be compiled to be schema-aware, even if it contains no * "import schema" declarations. Normally a query is treated as schema-aware * only if it contains one or more "import schema" declarations. If it is not schema-aware, * then all input documents must be untyped (or xs:anyType), and validation of temporary nodes is disallowed * (though validation of the final result tree is permitted). Setting the argument to true * means that schema-aware code will be compiled regardless. * * @param schemaAware If true, the stylesheet will be compiled with schema-awareness * enabled even if it contains no xsl:import-schema declarations. If false, the stylesheet * is treated as schema-aware only if it contains one or more xsl:import-schema declarations. * Note that setting the value to false does not disable use of an import-schema declaration. * @since 9.2 */ public void setSchemaAware(boolean schemaAware) { // We check this again more securely, but it's good to give the error as soon as possible if (schemaAware && !processor.getUnderlyingConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY)) { throw new UnsupportedOperationException("Schema-awareness requires a Saxon-EE license"); } env.setSchemaAware(schemaAware); }
/** * Say that the query must be compiled to be schema-aware, even if it contains no * "import schema" declarations. Normally a query is treated as schema-aware * only if it contains one or more "import schema" declarations. If it is not schema-aware, * then all input documents must be untyped (or xs:anyType), and validation of temporary nodes is disallowed * (though validation of the final result tree is permitted). Setting the argument to true * means that schema-aware code will be compiled regardless. * * @param schemaAware If true, the stylesheet will be compiled with schema-awareness * enabled even if it contains no xsl:import-schema declarations. If false, the stylesheet * is treated as schema-aware only if it contains one or more xsl:import-schema declarations. * Note that setting the value to false does not disable use of an import-schema declaration. * @since 9.2 */ public void setSchemaAware(boolean schemaAware) { // We check this again more securely, but it's good to give the error as soon as possible if (schemaAware && !processor.getUnderlyingConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY)) { throw new UnsupportedOperationException("Schema-awareness requires a Saxon-EE license"); } env.setSchemaAware(schemaAware); }
protected void setStaticContext(StaticQueryContext sqc, Properties props) throws XQException { logger.trace("setStaticContext.enter; got props: {}", props); sqc.setSchemaAware(false); String value = props.getProperty(pn_xqj_baseURI); if (value != null && !value.isEmpty()) {
getDefaultStaticQueryContext().setSchemaAware(requireBoolean(name, value)); break;
getDefaultStaticQueryContext().setSchemaAware(requireBoolean(name, value)); break;
xqcomp.getUnderlyingStaticContext().setSchemaAware( xqcomp.getProcessor().getUnderlyingConfiguration().isLicensedFeature( Configuration.LicenseFeature.ENTERPRISE_XQUERY));
xqcomp.getUnderlyingStaticContext().setSchemaAware( xqcomp.getProcessor().getUnderlyingConfiguration().isLicensedFeature( Configuration.LicenseFeature.ENTERPRISE_XQUERY));
protected void setStaticContext(StaticQueryContext sqc, XQStaticContext ctx) throws XQException { sqc.setSchemaAware(false); sqc.setBaseURI(ctx.getBaseURI());