Examples of JXTExpression


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

        // <import uri="${root}/foo/bar.xml" context="${foo}"/>
        Locator locator = getLocation();
        Iterator iter = raw.getAttributeEvents().iterator();
        AttributeEvent uri = null;
        JXTExpression select = null;
        while (iter.hasNext()) {
            AttributeEvent e = (AttributeEvent) iter.next();
            if (e.getLocalName().equals("uri")) {
                uri = e;
                break;
View Full Code Here

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

                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);
                    } catch (Exception exc) {
                        throw new SAXParseException(exc.getMessage(), getLocation(), exc);
                    } catch (Error err) {
                        throw new SAXParseException(err.getMessage(),
                                                    getLocation(), new ErrorHolder(err));
View Full Code Here

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

        super(raw);

        Locator locator = getLocation();
        String var = attrs.getValue("var");
        String value = attrs.getValue("value");
        JXTExpression varExpr = null;
        JXTExpression valueExpr = null;
        if (var != null) {
            varExpr = parsingContext.getStringTemplateParser().compileExpr(var, "set: \"var\":", locator);
        }
        if (value != null) {
            valueExpr = parsingContext.getStringTemplateParser().compileExpr(value, "set: \"value\":", locator);
View Full Code Here

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

        if (this.macro instanceof Define)
            return (Define) macro;

        Object macroName;
        Object namespace;
        JXTExpression macroNameExpression = (JXTExpression) macro;
        try {
            macroName = macroNameExpression.getValue(expressionContext);
            namespace = targetNamespace.getValue(expressionContext);
            if (namespace == null)
                namespace = "";
        } catch (Exception e) {
            throw new SAXParseException(e.getMessage(), getLocation(), e);
View Full Code Here

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

        Invoker.execute(consumer, this.expressionContext, new ExecutionContext(this.definitions, this.scriptManager,
                this.manager), null, startEvent, null);
    }

    public Serializable getKey() {
        JXTExpression cacheKeyExpr = (JXTExpression) this.startDocument
                .getTemplateProperty(JXTemplateGenerator.CACHE_KEY);
        if (cacheKeyExpr == null)
            return null;
        try {
            final Serializable templateKey = (Serializable) cacheKeyExpr.getValue(this.expressionContext);
            if (templateKey != null) {
                return new JXCacheKey(this.startDocument.getUri(), templateKey);
            }
        } catch (Exception e) {
            getLogger().error("error evaluating cache key", e);
View Full Code Here

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

        }
        return null;
    }

    public SourceValidity getValidity() {
        JXTExpression validityExpr = (JXTExpression) this.startDocument
                .getTemplateProperty(JXTemplateGenerator.VALIDITY);
        if (validityExpr == null)
            return null;
        try {
            final SourceValidity sourceValidity = this.startDocument.getSourceValidity();
            final SourceValidity templateValidity = (SourceValidity) validityExpr.getValue(this.expressionContext);
            if (sourceValidity != null && templateValidity != null) {
                return new JXSourceValidity(sourceValidity, templateValidity);
            }
        } catch (Exception e) {
            getLogger().error("error evaluating cache validity", e);
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.