/** * Clear all the declared passive namespaces, except for the standard ones (xml, saxon, etc) * * @since 8.4 * @deprecated since 9.0 - use {@link #clearNamespaces} */ public void clearPassiveNamespaces() { clearNamespaces(); }
/** * Clear all the declared passive namespaces, except for the standard ones (xml, saxon, etc) * * @since 8.4 * @deprecated since 9.0 - use {@link #clearNamespaces} */ public void clearPassiveNamespaces() { clearNamespaces(); }
/** * Create a StaticQueryContext using a given Configuration. This creates a StaticQueryContext for a main module * (that is, a module that is not a library module). The static query context is initialized from the * default static query context held in the configuration only if the {@code initialize} argument is set to true. * * @param config the Saxon Configuration * @param initialize specifies whether the static context should be initialized using defaults held in the * configuration. Setting this to true has the same effect as calling the single-argument * constructor. Setting it to false is typically used only when creating the default * static query context held by the configuration. * @since 9.9 */ public StaticQueryContext(Configuration config, boolean initialize) { this.config = config; this.namePool = config.getNamePool(); if (initialize) { copyFrom(config.getDefaultStaticQueryContext()); } else { userDeclaredNamespaces = new HashMap<>(); userDeclaredVariables = new HashSet<>(); optimizerOptions = config.getOptimizerOptions(); clearNamespaces(); } }
/** * Create a StaticQueryContext using a given Configuration. This creates a StaticQueryContext for a main module * (that is, a module that is not a library module). The static query context is initialized from the * default static query context held in the configuration only if the {@code initialize} argument is set to true. * * @param config the Saxon Configuration * @param initialize specifies whether the static context should be initialized using defaults held in the * configuration. Setting this to true has the same effect as calling the single-argument * constructor. Setting it to false is typically used only when creating the default * static query context held by the configuration. * @since 9.9 */ public StaticQueryContext(Configuration config, boolean initialize) { this.config = config; this.namePool = config.getNamePool(); if (initialize) { copyFrom(config.getDefaultStaticQueryContext()); } else { userDeclaredNamespaces = new HashMap<>(); userDeclaredVariables = new HashSet<>(); optimizerOptions = config.getOptimizerOptions(); clearNamespaces(); } }
sqc.clearNamespaces(); StringTokenizer st = new StringTokenizer(value, " "); while (st.hasMoreTokens()) {
/** * Reset the state of this StaticQueryContext to an uninitialized state * * @since 8.4 */ public void reset() { userDeclaredNamespaces = new HashMap<>(10); externalNamespaceResolver = null; errorListener = config.getErrorListener(); if (errorListener instanceof StandardErrorListener) { errorListener = ((StandardErrorListener) errorListener).makeAnother(Configuration.XQUERY); ((StandardErrorListener) errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER); } constructionMode = getConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY) ? Validation.PRESERVE : Validation.STRIP; preserveSpace = false; defaultEmptyLeast = true; requiredContextItemType = AnyItemType.getInstance(); defaultFunctionNamespace = NamespaceConstant.FN; defaultElementNamespace = NamespaceConstant.NULL; moduleURIResolver = null; defaultCollationName = config.getDefaultCollationName(); clearNamespaces(); isUpdating = false; optimizerOptions = config.getOptimizerOptions(); }
/** * Reset the state of this StaticQueryContext to an uninitialized state * * @since 8.4 */ public void reset() { userDeclaredNamespaces = new HashMap<>(10); externalNamespaceResolver = null; errorListener = config.getErrorListener(); if (errorListener instanceof StandardErrorListener) { errorListener = ((StandardErrorListener) errorListener).makeAnother(Configuration.XQUERY); ((StandardErrorListener) errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER); } constructionMode = getConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY) ? Validation.PRESERVE : Validation.STRIP; preserveSpace = false; defaultEmptyLeast = true; requiredContextItemType = AnyItemType.getInstance(); defaultFunctionNamespace = NamespaceConstant.FN; defaultElementNamespace = NamespaceConstant.NULL; moduleURIResolver = null; defaultCollationName = config.getDefaultCollationName(); clearNamespaces(); isUpdating = false; optimizerOptions = config.getOptimizerOptions(); }
/** * Reset the state of this StaticQueryContext to an uninitialized state * * @since 8.4 */ public void reset() { userDeclaredNamespaces = new HashMap(10); externalNamespaceResolver = null; collations = new CollationMap(config); errorListener = config.getErrorListener(); if (errorListener instanceof StandardErrorListener) { errorListener = ((StandardErrorListener)errorListener).makeAnother(Configuration.XQUERY); ((StandardErrorListener)errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER); } constructionMode = getConfiguration().isSchemaAware(Configuration.XQUERY) ? Validation.PRESERVE : Validation.STRIP; preserveSpace = false; defaultEmptyLeast = true; requiredContextItemType = AnyItemType.getInstance(); defaultFunctionNamespace = NamespaceConstant.FN; defaultElementNamespace = NamespaceConstant.NULL; moduleURIResolver = config.getModuleURIResolver(); collations.setDefaultCollationName(NamespaceConstant.CODEPOINT_COLLATION_URI); clearNamespaces(); generateCode = false; }
/** * Reset the state of this StaticQueryContext to an uninitialized state * * @since 8.4 */ public void reset() { userDeclaredNamespaces = new HashMap(10); externalNamespaceResolver = null; collations = new CollationMap(config); errorListener = config.getErrorListener(); if (errorListener instanceof StandardErrorListener) { errorListener = ((StandardErrorListener)errorListener).makeAnother(Configuration.XQUERY); ((StandardErrorListener)errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER); } constructionMode = getConfiguration().isSchemaAware(Configuration.XQUERY) ? Validation.PRESERVE : Validation.STRIP; preserveSpace = false; defaultEmptyLeast = true; requiredContextItemType = AnyItemType.getInstance(); defaultFunctionNamespace = NamespaceConstant.FN; defaultElementNamespace = NamespaceConstant.NULL; moduleURIResolver = config.getModuleURIResolver(); collations.setDefaultCollationName(NamespaceConstant.CODEPOINT_COLLATION_URI); clearNamespaces(); generateCode = false; }
sqc.setDefaultFunctionNamespace(ctx.getDefaultFunctionNamespace()); sqc.setEmptyLeast(ctx.getDefaultOrderForEmptySequences() == DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST); sqc.clearNamespaces(); String[] prefixes = ctx.getNamespacePrefixes(); for (String prefix: prefixes) {