Package xbird.xquery.expr

Examples of xbird.xquery.expr.XQExpression.visit()


    @Override
    public XQExpression visit(CompositePath fragment, XQueryContext ctxt) throws XQueryException {
        XQExpression filter = fragment.getFilterExpr();
        if(!(filter instanceof PathVariable)) {
            XQExpression src = fragment.getSourceExpr();
            src.visit(this, ctxt);
            buf.append('/');
        }
        filter.visit(this, ctxt);
        return fragment;
    }
View Full Code Here


            throws XQueryException {
        header("DocConstructor");

        final XQExpression expr = constructor.getExpr();
        indentln();
        expr.visit(this, ctxt);
        indent--;

        return constructor;
    }
View Full Code Here

        } else {
            header("ElementConstructor");
            attrFeed("name");
            final XQExpression nameExpr = constructor.getNameExpr();
            indentln();
            nameExpr.visit(this, ctxt);
            indent--;
        }

        List atts = constructor.getAttributes();
        final int attlen = atts.size();
View Full Code Here

            attrFeed("attributes");
            indent++;
            for(int i = 0; i < attlen; i++) {
                XQExpression a = (XQExpression) atts.get(i);
                lineFeed();
                a.visit(this, ctxt);
            }
            indent--;
        }

        List values = constructor.getContents();
View Full Code Here

            for(int i = 0; i < values.size(); i++) {
                XQExpression v = (XQExpression) values.get(i);
                if(!(v instanceof TextContent)) {
                    lineFeed();
                }
                v.visit(this, ctxt);
            }
            indent--;
        }

        if(name != null) {
View Full Code Here

        XQExpression replaced = proxy.getReplacedExpr();
        if(replaced != null) {
            buf.append(replaced.toString());
        } else {
            XQExpression orig = proxy.getOriginalExpr();
            orig.visit(this, ctxt);
        }
        buf.append('|');
        return proxy;
    }
View Full Code Here

        }

        final XQExpression e = expr.getExpr();
        if(e != null) {
            indentln();
            e.visit(this, ctxt);
            indent--;
        }
        return expr;
    }
View Full Code Here

        expr.getSourceExpr().visit(this, ctxt);
        List predicates = expr.getPredicates();
        for(int i = 0; i < predicates.size(); i++) {
            XQExpression p = (XQExpression) predicates.get(i);
            buf.append('[');
            p.visit(this, ctxt);
            buf.append(']');
        }
        return expr;
    }
View Full Code Here

                        assert (var instanceof BindingVariable || var instanceof PathVariable);
                    }
                    buf.append(" in ");
                    //indentln();
                    XQExpression inExpr = ((ForClause) cause).getInExpr();
                    inExpr.visit(this, ctxt);
                    //indent--;
                    break;
                case Binding.LET_CLAUSE:
                    if(prev_type != type) {
                        buf.append("let $"); // fist appearence.
View Full Code Here

            XQExpression filter = expr.getWhereExpr();
            if(filter != null) {
                lineFeed();
                buf.append("where ");
                indentln();
                filter.visit(this, ctxt);
                indent--;
            }
        }

        // order by
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.