Package org.apache.cocoon.xml

Examples of org.apache.cocoon.xml.ContentHandlerWrapper


        try {
            XMLConsumer consumer;
            if (contentHandler instanceof XMLConsumer) {
                consumer = (XMLConsumer)contentHandler;
            } else if (contentHandler instanceof LexicalHandler) {
                consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
            } else {
                consumer = new ContentHandlerWrapper(contentHandler);
            }
            if (this.redirectSource != null) {
                this.environment.toSAX(this.redirectSource, consumer);
            } else {
                // We have to buffer the result in order to get
View Full Code Here


            } else {
              XMLConsumer consumer;
              if (contentHandler instanceof XMLConsumer) {
                  consumer = (XMLConsumer)contentHandler;
              } else if (contentHandler instanceof LexicalHandler) {
                  consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
              } else {
                  consumer = new ContentHandlerWrapper(contentHandler);
              }
                // We have to add an environment changer
                // clean environment stack handling.
                EnvironmentStack envStack = CocoonComponentManager.getCurrentEnvironmentStack();
                int currentOffset = envStack.getOffset();
View Full Code Here

        try {
            XMLConsumer consumer;
            if (contentHandler instanceof XMLConsumer) {
                consumer = (XMLConsumer)contentHandler;
            } else if (contentHandler instanceof LexicalHandler) {
                consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
            } else {
                consumer = new ContentHandlerWrapper(contentHandler);
            }
            if (this.redirectSource != null) {
                this.redirectSource.toSAX(consumer);
            } else {
                ((XMLProducer)eventPipeline).setConsumer(consumer);
View Full Code Here

        try {
            XMLConsumer consumer;
            if (contentHandler instanceof XMLConsumer) {
                consumer = (XMLConsumer)contentHandler;
            } else if (contentHandler instanceof LexicalHandler) {
                consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
            } else {
                consumer = new ContentHandlerWrapper(contentHandler);
            }
            if (this.redirectSource != null) {
                this.redirectSource.toSAX(consumer);
            } else {
                try {
View Full Code Here

            } else {
              XMLConsumer consumer;
              if (contentHandler instanceof XMLConsumer) {
                  consumer = (XMLConsumer)contentHandler;
              } else if (contentHandler instanceof LexicalHandler) {
                  consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
              } else {
                  consumer = new ContentHandlerWrapper(contentHandler);
              }
                // We have to add an environment changer
                // clean environment stack handling.
                EnvironmentStack envStack = CocoonComponentManager.getCurrentEnvironmentStack();
                int currentOffset = envStack.getOffset();
View Full Code Here

            } else {
              XMLConsumer consumer;
              if (contentHandler instanceof XMLConsumer) {
                  consumer = (XMLConsumer)contentHandler;
              } else if (contentHandler instanceof LexicalHandler) {
                  consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
              } else {
                  consumer = new ContentHandlerWrapper(contentHandler);
              }
                // We have to add an environment changer
                // for clean environment stack handling.
                CocoonComponentManager.enterEnvironment(this.environment,
                                                        this.manager,
View Full Code Here

            } else {
              XMLConsumer consumer;
              if (contentHandler instanceof XMLConsumer) {
                  consumer = (XMLConsumer)contentHandler;
              } else if (contentHandler instanceof LexicalHandler) {
                  consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
              } else {
                  consumer = new ContentHandlerWrapper(contentHandler);
              }
                // We have to add an environment changer
                // for clean environment stack handling.
                CocoonComponentManager.enterEnvironment(this.environment,
                                                        this.manager,
View Full Code Here

            initXMLResponse(false);
            deserializer = (XMLDeserializer) this.manager.lookup(XMLDeserializer.ROLE);
            if (contentHandler instanceof XMLConsumer) {
                deserializer.setConsumer((XMLConsumer) contentHandler);
            } else {
                deserializer.setConsumer(new ContentHandlerWrapper(contentHandler));
            }
            deserializer.deserialize(this.response.getXMLResponse());
        } catch(CascadingIOException e) {
            throw new SAXException(e.getMessage(), (Exception) e.getCause());
        } catch(IOException e) {
View Full Code Here

        try {
            XMLConsumer consumer;
            if (contentHandler instanceof XMLConsumer) {
                consumer = (XMLConsumer)contentHandler;
            } else if (contentHandler instanceof LexicalHandler) {
                consumer = new ContentHandlerWrapper(contentHandler, (LexicalHandler)contentHandler);
            } else {
                consumer = new ContentHandlerWrapper(contentHandler);
            }
            if (this.redirectSource != null) {
                SourceUtil.parse(this.manager, this.redirectSource, consumer);
            } else {
                // We have to buffer the result in order to get
View Full Code Here

                            TransformerHandler handler = xslt.getTransformerHandler(source);

                            final SAXResult result = new SAXResult(nextConsumer);
                            result.setLexicalHandler(nextConsumer);
                            handler.setResult(result);
                            nextConsumer = new ContentHandlerWrapper(handler, handler);
                            stylesheet = nextConsumer;
                        }
                        stylesheet.startDocument();
                    }
                    boolean includeFragment = true;
View Full Code Here

TOP

Related Classes of org.apache.cocoon.xml.ContentHandlerWrapper

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.