Package org.apache.cocoon.template.expression

Examples of org.apache.cocoon.template.expression.Literal


                    ch = in.read();
                    if (ch == '{') {
                        lang = (c == '#') ? JXPATH : ((c == '$') ? JEXL : JAVASCRIPT);
                        inExpr = true;
                        if (buf.length() > 0) {
                            substitutions.add(new Literal(buf.toString()));
                            buf.setLength(0);
                        }
                        continue top;
                    }
                    buf.append(c);
                    if (ch != -1) {
                        c = (char) ch;
                        continue processChar;
                    }
                } else {
                    buf.append(c);
                }
                break;
            }
        }

        if (inExpr) {
            throw new Exception("Unterminated {");
        }

        if (buf.length() > 0) {
            substitutions.add(new Literal(buf.toString()));
        }

        return substitutions;
    }
View Full Code Here


            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                if (subst instanceof Literal) {
                    Literal lit = (Literal) subst;
                    buf.append(lit.getValue());
                } else if (subst instanceof JXTExpression) {
                    JXTExpression expr = (JXTExpression) subst;
                    Object val;
                    try {
                        val = expr.getValue(expressionContext);
View Full Code Here

            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                if (subst instanceof Literal) {
                    Literal lit = (Literal) subst;
                    buf.append(lit.getValue());
                } else if (subst instanceof JXTExpression) {
                    JXTExpression expr = (JXTExpression) subst;
                    Object val;
                    try {
                        val = expr.getValue(expressionContext);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.template.expression.Literal

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.