Package net.sf.saxon.instruct

Examples of net.sf.saxon.instruct.Block.simplify()


    public Expression compile(Executable exec) throws TransformerConfigurationException {
        Block block = new Block();
        compileChildren(exec, block, true);
        try {
            While w = new While(test, block.simplify(getStaticContext()));
            ExpressionTool.makeParentReferences(w);
            return w;
        } catch (XPathException e) {
            compileError(e);
            return null;
View Full Code Here


        Block action = new Block();
        compileChildren(exec, action, true);
        try {
            ForEachGroup inst = new ForEachGroup(
                                        select,
                                        action.simplify(getStaticContext()),
                                        algorithm,
                                        key,
                                        collator,
                                        makeSortKeys() );
            ExpressionTool.makeParentReferences(inst);
View Full Code Here

            AnalyzeString anal = new AnalyzeString(
                                     select,
                                     regex,
                                     flags,
                                     (matching==null ? null : matchingBlock.simplify(matching.getStaticContext())),
                                     (nonMatching==null ? null : nonMatchingBlock.simplify(nonMatching.getStaticContext())),
                                     pattern );
            ExpressionTool.makeParentReferences(anal);
            return anal;
        } catch (XPathException e) {
            compileError(e);
View Full Code Here

    public Expression compile(Executable exec) throws TransformerConfigurationException {
        if (select == null) {
            Block body = new Block();
            compileChildren(exec, body, true);
            try {
                sortKeyDefinition.setSortKey(new Atomizer(body.simplify(getStaticContext())));
            } catch (XPathException e) {
                compileError(e);
            }
        }
        try {
View Full Code Here

            return sortedSequence;
        } else {
            Block body = new Block();
            compileChildren(exec, body, true);
            try {
                SortExpression sortedSequence =  new SortExpression(body.simplify(getStaticContext()), sortKeys);
                ExpressionTool.makeParentReferences(sortedSequence);
                return sortedSequence;
            } catch (XPathException e) {
                compileError(e);
                return null;
View Full Code Here

        if (use==null) {
            Block body = new Block();
            compileChildren(exec, body, true);
            try {
                use = new Atomizer(body.simplify(getStaticContext()));
            } catch (XPathException e) {
                compileError(e);
            }

            try {
View Full Code Here

            try {
                if (test.effectiveBooleanValue(null)) {
                    Block block = new Block();
                    block.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
                    compileChildren(exec, block, true);
                    return block.simplify(getStaticContext());
                } else {
                    return null;
                }
            } catch (XPathException err) {
                // can't happen, but if it does then we'll fall through to non-optimizing case
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.