Examples of EmbeddedXMLPipe


Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

            if (node.getNodeType() == Node.DOCUMENT_NODE) {
                // Pass all SAX events
            handler = contentHandler;
            } else {
                // Strip start/endDocument
            handler = new EmbeddedXMLPipe(contentHandler);
            }

            SAXResult result = new SAXResult(handler);
        result.setLexicalHandler(lexicalHandler);
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

        getLogger().error("ReadSessionTransformer: no "+ ReadDOMSessionTransformer.DOM_NAME
                          +" parameter specified");
      }
      if (node!=null)  {
        getLogger().debug("ReadSessionTransformer: start streaming");
        EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(super.contentHandler);
        streamer = new DOMStreamer(pipe,super.lexicalHandler);
        streamer.stream(node);
      }else  {
        getLogger().error("ReadSessionTransformer: no Document in session");
      }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

    public void toSAX(ContentHandler ch)
      throws SAXException {
       
        // Stream bytes and discard start/endDocument
        XMLByteStreamInterpreter interp = new XMLByteStreamInterpreter();
        EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(ch);

        // If ch is an XMLConsumer, set it as such so that XML comments are
        // also deserialized.
        if (ch instanceof XMLConsumer)
            pipe.setConsumer((XMLConsumer) ch);
       
        interp.setContentHandler(pipe);
       
        interp.deserialize(xmlBytes);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

  public void toSAX(ContentHandler handler)
    throws SAXException
  {
    Parser parser = null;
    try {
      EmbeddedXMLPipe newHandler = new EmbeddedXMLPipe(handler);

      parser = (Parser)componentManager.lookup(Parser.ROLE);

      InputSource source = getInputSource();
      parser.parse(source, newHandler);
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

        getLogger().error("ReadSessionTransformer: no "+ ReadDOMSessionTransformer.DOM_NAME
                          +" parameter specified");
      }
      if (node!=null)  {
        getLogger().debug("ReadSessionTransformer: start streaming");
        EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(super.contentHandler);
        streamer = new DOMStreamer(pipe,super.lexicalHandler);
        streamer.stream(node);
      }else  {
        getLogger().error("ReadSessionTransformer: no Document in session");
      }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

    constraintAliases = new HashMap();
    redirect = null;
    redirectLevel = 0;
    define = false;
    xmli = new XMLByteStreamInterpreter();
    xmli.setContentHandler(new EmbeddedXMLPipe(this));
  }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

        if (node.getNodeType() == Node.DOCUMENT_NODE) {
            // Pass all SAX events
            handler = super.contentHandler;
        } else {
            // Strip start/endDocument
            handler = new EmbeddedXMLPipe(super.contentHandler);
        }
       
        SAXResult result = new SAXResult(handler);
        result.setLexicalHandler(super.lexicalHandler);
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

            throw new ProcessingException(ex);
        }
    }

    public void toEmbeddedSAX(ContentHandler handler) throws SAXException {
        EmbeddedXMLPipe newHandler = new EmbeddedXMLPipe(handler);
        toSAX(newHandler);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

    public void toSAX(ContentHandler ch)
      throws SAXException {

        // Stream bytes and discard start/endDocument
        XMLByteStreamInterpreter interp = new XMLByteStreamInterpreter();
        EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(ch);

        // If ch is an XMLConsumer, set it as such so that XML comments are
        // also deserialized.
        if (ch instanceof XMLConsumer)
            pipe.setConsumer((XMLConsumer) ch);

        interp.setContentHandler(pipe);

        interp.deserialize(xmlBytes);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.EmbeddedXMLPipe

            if (node.getNodeType() == Node.DOCUMENT_NODE) {
                // Pass all SAX events
                handler = contentHandler;
            } else {
                // Strip start/endDocument
                handler = new EmbeddedXMLPipe(contentHandler);
            }

            SAXResult result = new SAXResult(handler);
            result.setLexicalHandler(lexicalHandler);
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.