Package org.apache.cocoon.template.script.event

Examples of org.apache.cocoon.template.script.event.StartElement


        while (ev != endEvent) {
            loc.setDocumentLocator(ev.getLocation());

            // ContentHandler methods
            if (ev instanceof StartElement) {
                StartElement startElement = (StartElement) ev;
                Define def = (Define) executionContext
                        .getDefinitions().get(startElement.getQname());
                if (def == null) {
                    ev = ev.execute(consumer, objectModel,
                            executionContext, macroContext, namespaces, startEvent, endEvent);
                    continue;
                }
View Full Code Here


        try {
            Object val = this.value.getNode(objectModel);
            if (!(val instanceof StartElement)) {
                throw new Exception("macro invocation required instead of: " + val);
            }
            StartElement call = (StartElement) val;
           
            //FIXME: eval does not allow to call macro providing macro body
            MacroContext newMacroContext = new MacroContext( call.getQname(), null, null );
            Invoker.execute(consumer, objectModel, executionContext,
                            newMacroContext, namespaces, call.getNext(), call.getEndElement());
        } 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

        while (ev != endEvent) {
            loc.setDocumentLocator(ev.getLocation());

            // ContentHandler methods
            if (ev instanceof StartElement) {
                StartElement startElement = (StartElement) ev;
                Define def = (Define) executionContext
                        .getDefinitions().get(startElement.getQname());
                if (def == null) {
                    ev = ev.execute(consumer, expressionContext,
                            executionContext, macroContext, startEvent, endEvent);
                    continue;
                }
View Full Code Here

        try {
            Object val = this.value.getNode(expressionContext);
            if (!(val instanceof StartElement)) {
                throw new Exception("macro invocation required instead of: " + val);
            }
            StartElement call = (StartElement) val;
           
            //FIXME: eval does not allow to call macro providing macro body
            MacroContext newMacroContext = new MacroContext( call.getQname(), null, null );
            Invoker.execute(consumer, expressionContext, executionContext,
                            newMacroContext, call.getNext(), call.getEndElement());
        } 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

        while (ev != endEvent) {
            loc.setDocumentLocator(ev.getLocation());

            // ContentHandler methods
            if (ev instanceof StartElement) {
                StartElement startElement = (StartElement) ev;
                Define def = (Define) executionContext
                        .getDefinitions().get(startElement.getQname());
                if (def == null) {
                    ev = ev.execute(consumer, objectModel,
                            executionContext, macroContext, namespaces, startEvent, endEvent);
                    continue;
                }
View Full Code Here

        try {
            Object val = this.value.getNode(objectModel);
            if (!(val instanceof StartElement)) {
                throw new Exception("macro invocation required instead of: " + val);
            }
            StartElement call = (StartElement) val;
           
            //FIXME: eval does not allow to call macro providing macro body
            MacroContext newMacroContext = new MacroContext( call.getQname(), null, null );
            Invoker.execute(consumer, objectModel, executionContext,
                            newMacroContext, namespaces, call.getNext(), call.getEndElement());
        } 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

        try {
            Object val = this.value.getNode(expressionContext);
            if (!(val instanceof StartElement)) {
                throw new Exception("macro invocation required instead of: " + val);
            }
            StartElement call = (StartElement) val;
           
            //FIXME: eval does not allow to call macro providing macro body
            MacroContext newMacroContext = new MacroContext( call.getQname(), null, null );
            Invoker.execute(consumer, expressionContext, executionContext,
                            newMacroContext, call.getNext(), call.getEndElement());
        } 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

        while (ev != endEvent) {
            loc.setDocumentLocator(ev.getLocation());

            // ContentHandler methods
            if (ev instanceof StartElement) {
                StartElement startElement = (StartElement) ev;
                Define def = (Define) executionContext
                        .getDefinitions().get(startElement.getQname());
                if (def == null) {
                    ev = ev.execute(consumer, expressionContext,
                            executionContext, macroContext, startEvent, endEvent);
                    continue;
                }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.template.script.event.StartElement

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.