Package net.sf.saxon.instruct

Examples of net.sf.saxon.instruct.Executable


    public String getSystemId() {
        if (locationId == -1) {
            return null;
        }
        Executable exec = getExecutable();
        if (exec == null) {
            return null;
        }
        LocationMap map = exec.getLocationMap();
        if (map == null) {
            return null;
        }
        return map.getSystemId(locationId);
    }
View Full Code Here


     * Get the LocationProvider allowing location identifiers to be resolved.
     * @return the LocationProvider used to turn the location id into real location information
     */

    public LocationProvider getLocationProvider() {
        Executable exec = getExecutable();
        if (exec != null) {
            return exec.getLocationMap();
        } else {
            return null;
        }
    }
View Full Code Here

     * @param config the configuration
     */

    protected void setConfiguration(Configuration config) {
        this.config = config;
        executable = new Executable(config);
        executable.setCollationTable(new CollationMap(config.getCollationMap()));
        executable.setHostLanguage(Configuration.XPATH);
    }
View Full Code Here

     * @param visitor an expression visitor
     */

    public void checkFunctionCall(UserFunction compiledFunction,
                            ExpressionVisitor visitor) throws XPathException {
        Executable executable = visitor.getExecutable();
        boolean isXSLT = executable != null && executable.getHostLanguage() == Configuration.XSLT;
        int n = compiledFunction.getNumberOfArguments();
        for (int i=0; i<n; i++) {
            RoleLocator role = new RoleLocator(
                    RoleLocator.FUNCTION, compiledFunction.getFunctionName(), i);
            if (isXSLT) {
View Full Code Here

        if (errorListener instanceof StandardErrorListener) {
            errorListener = ((StandardErrorListener)errorListener).makeAnother(Configuration.XQUERY);
            ((StandardErrorListener)errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER);
        }
        //collations = new CollationMap(config);
        executable = new Executable(config);
        executable.setCollationTable(new CollationMap(config.getCollationMap()));
        executable.setHostLanguage(Configuration.XQUERY);
        executable.setLocationMap(new LocationMap());
        executable.setSchemaAware((Boolean)config.getConfigurationProperty(FeatureKeys.XQUERY_SCHEMA_AWARE));
        reset();
View Full Code Here

             if (errorListener instanceof StandardErrorListener) {
                 errorListener = ((StandardErrorListener)errorListener).makeAnother(Configuration.XQUERY);
                 ((StandardErrorListener)errorListener).setRecoveryPolicy(Configuration.DO_NOT_RECOVER);
             }
             //collations = new CollationMap(config);
             executable = new Executable(config);
             executable.setCollationTable(new CollationMap(config.getCollationMap()));
             executable.setHostLanguage(Configuration.XQUERY);
             executable.setLocationMap(new LocationMap());
             reset();
         } else {
View Full Code Here

        errorListener = c.errorListener;
        tracing = c.tracing;
        generateCode = c.generateCode;
        isUpdating = c.isUpdating;
        languageVersion = c.languageVersion;
        executable = new Executable(config);
        executable.setCollationTable(new CollationMap(c.executable.getCollationTable()));
        executable.setHostLanguage(Configuration.XQUERY);
        executable.setLocationMap(new LocationMap());
    }
View Full Code Here

     * @param visitor an ExpressionVisitor
     */

    public void refineVariableType(
            ItemType type, int cardinality, Value constantValue, int properties, ExpressionVisitor visitor) {
        Executable exec = visitor.getExecutable();
        if (exec == null) {
            // happens during use-when evaluation
            return;
        }
        TypeHierarchy th = exec.getConfiguration().getTypeHierarchy();
        ItemType oldItemType = getItemType(th);
        ItemType newItemType = oldItemType;
        if (th.isSubType(type, oldItemType)) {
            newItemType = type;
        }
View Full Code Here

     * Check for schema-awareness.
     * Typed input nodes are recognized if and only if the stylesheet contains an import-schema declaration.
     */

    private void checkForSchemaAwareness() {
        Executable exec = getExecutable();
        if (!exec.isSchemaAware() && exec.getConfiguration().isLicensedFeature(Configuration.LicenseFeature.SCHEMA_AWARE_XSLT)) {
            for (int i = 0; i < topLevel.size(); i++) {
                Object node = topLevel.get(i);
                if (node instanceof XSLImportSchema) {
                    exec.setSchemaAware(true);
                    return;
                }
            }
            //exec.setSchemaAware(false);
        }
View Full Code Here

     * @param info Compilation options
     */

    protected PreparedStylesheet(Configuration config, CompilerInfo info) {
        this.config = config;
        executable = new Executable(config);
        RuleManager rm = new RuleManager();
        rm.setRecoveryPolicy(info.getRecoveryPolicy());
        executable.setRuleManager(rm);
        executable.setHostLanguage(Configuration.XSLT);
        executable.setCollationTable(new CollationMap(config.getCollationMap()));
View Full Code Here

TOP

Related Classes of net.sf.saxon.instruct.Executable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.