Examples of simplify()


Examples of net.sf.saxon.expr.Atomizer.simplify()

    * Simplify and validate.
    */

     public Expression simplify(StaticContext env) throws XPathException {
        Atomizer a = new Atomizer(argument[0]);
        return a.simplify(env);
    }

}


View Full Code Here

Examples of net.sf.saxon.expr.Expression.simplify()

            }

            try {
                procedure.setUseAttributeSets(useAttributeSets);
                procedure.setNameCode(getObjectNameCode());
                procedure.setBody(body.simplify(getStaticContext()));
                procedure.setStackFrameMap(stackFrameMap);
                procedure.setSystemId(getSystemId());
                procedure.setLineNumber(getLineNumber());
                procedure.setExecutable(exec);
            } catch (XPathException e) {
View Full Code Here

Examples of net.sf.saxon.expr.Expression.simplify()

    public static void simplify(WithParam[] params, StaticContext env) throws XPathException {
         for (int i=0; i<params.length; i++) {
            Expression select = params[i].getSelectExpression();
            if (select != null) {
                params[i].setSelectExpression(select.simplify(env));
            }
        }
    }

    public static void analyze(WithParam[] params, StaticContext env, ItemType contextItemType) throws XPathException {
View Full Code Here

Examples of net.sf.saxon.expr.ExpressionVisitor.simplify()

            }

            try {

                ExpressionVisitor visitor = makeExpressionVisitor();
                body = visitor.simplify(body);
                if (getConfiguration().isCompileWithTracing()) {
                    TraceWrapper trace = new TraceInstruction(body, this);
                    trace.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
                    trace.setContainer(procedure);
                    body = trace;
View Full Code Here

Examples of net.sf.saxon.expr.ExpressionVisitor.simplify()

            }

            try {

                ExpressionVisitor visitor = makeExpressionVisitor();
                body = visitor.simplify(body);
                if (getConfiguration().isCompileWithTracing()) {
                    TraceWrapper trace = new TraceInstruction(body, this);
                    trace.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
                    trace.setContainer(procedure);
                    body = trace;
View Full Code Here

Examples of net.sf.saxon.functions.Concat.simplify()

        Concat fn = (Concat) SystemFunction.makeSystemFunction("concat", env.getNamePool());
        Expression[] args = new Expression[components.size()];
        components.toArray(args);
        fn.setArguments(args);
        fn.setLocationId(env.getLocationMap().allocateLocationId(env.getSystemId(), lineNumber));
        return fn.simplify(env);

    }

    private static void addStringComponent(List components, String avt, int start, int end) {
        if (start < end) {
View Full Code Here

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

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

        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

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

            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

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

    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
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.