Examples of toSAX()


Examples of org.apache.cocoon.precept.Instance.toSAX()

                    String id = attributes.getValue(TAG_INSERTINSTANCE_ATTR_ID);
                    getLogger().debug("inserting instance [id=" + String.valueOf(id) + "]");

                    Instance instance = (Instance) session.getAttribute(id);
                    if (instance != null) {
                        instance.toSAX(this, true);
                    }
                    else {
                        getLogger().debug("could not find instance [id=" + String.valueOf(id) + "]");
                    }
                }
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

            buffer = null;
            return processErrorHandler(environment, e, consumer);
        } finally {
            if (buffer != null) {
                try {
                    buffer.toSAX(consumer);
                } catch (SAXException e) {
                    throw new ProcessingException("Failed to execute pipeline.", e);
                }
            }
        }
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                if (classBuffer == null) {
                    throwSAXException("New: Class \"" + widgetPath + "\" does not exist.");
                }
                handlers.addFirst(handler);
                handler = nestedHandler;
                classBuffer.toSAX(EffectWidgetReplacingPipe.this);
                handler = (Handler)handlers.removeFirst();
                return this;
            case EVENT_ELEMENT:
                return nullHandler;
            case EVENT_END_ELEMENT:
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                error = exception;
                this.getLogger().warn("Unable to get content of coplet: " + coplet.getId(), exception);
            }
           
            if ( read ) {
                buffer.toSAX( contentHandler );
            } else {
                if ( !this.renderErrorContent(coplet, contentHandler, error)) {
                    // FIXME - get correct error message
                    contentHandler.startDocument();
                    XMLUtils.startElement( contentHandler, "p");
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                if (classBuffer == null) {
                    throwSAXException("New: Class \"" + widgetId + "\" does not exist.");
                }
                handlers.addFirst(handler);
                handler = nestedHandler;
                classBuffer.toSAX(EffectWidgetReplacingPipe.this);
                handler = (Handler)handlers.removeFirst();
                return this;
            case EVENT_ELEMENT:
                return nullHandler;
            case EVENT_END_ELEMENT:
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                error = exception;
                this.getLogger().warn("Unable to get content of coplet: " + coplet.getId(), exception);
            }
           
            if ( read ) {
                buffer.toSAX( contentHandler );
            } else {
                if ( !this.renderErrorContent(coplet, contentHandler, error)) {
                    // FIXME - get correct error message
                    contentHandler.startDocument();
                    XMLUtils.startElement( contentHandler, "p");
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                try {
                    InputSource is = new InputSource(new ByteArrayInputStream(content));
                    SaxBuffer buffer = new SaxBuffer();
                    parser.parse(is, buffer);
                    streamed = true;
                    buffer.toSAX(this.xmlConsumer);
                } catch (Exception ignore) {
                    // ignore
                }
            }
            if ( !streamed ) {
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                if (classBuffer == null) {
                    throwSAXException("New: Class \"" + widgetId + "\" does not exist.");
                }
                handlers.addFirst(handler);
                handler = nestedHandler;
                classBuffer.toSAX(EffectWidgetReplacingPipe.this);
                handler = (Handler)handlers.removeFirst();
                return this;
            case EVENT_ELEMENT:
                return nullHandler;
            case EVENT_END_ELEMENT:
View Full Code Here

Examples of org.apache.cocoon.xml.SaxBuffer.toSAX()

                SaxBuffer classBuffer = (SaxBuffer)classes.get(widgetId);
                if (classBuffer == null)
                    throwSAXException("New: Class \"" + widgetId + "\" does not exist.");
                handlers.addFirst(handler);
                handler = nestedHandler;
                classBuffer.toSAX(EffectWidgetReplacingPipe.this);
                handler = (Handler)handlers.removeFirst();
                return this;
            case EVENT_ELEMENT:
                return nullHandler;
            case EVENT_END_ELEMENT:
View Full Code Here

Examples of org.apache.excalibur.xml.sax.XMLizable.toSAX()

    public void generateItemSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        Iterator messagesIt = messages.iterator();
        while (messagesIt.hasNext()) {
            XMLizable message = (XMLizable)messagesIt.next();
            contentHandler.startElement(Constants.INSTANCE_NS, MESSAGE_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGE_EL, XMLUtils.EMPTY_ATTRIBUTES);
            message.toSAX(contentHandler);
            contentHandler.endElement(Constants.INSTANCE_NS, MESSAGE_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGE_EL);
        }
    }

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