Package org.apache.xalan.xpath.xml

Examples of org.apache.xalan.xpath.xml.FormatterToDOM


//            processor.error(XSLTErrorResources.ER_CANT_USE_DTM_FOR_OUTPUT); //Can't use a DTMLiaison for an output DOM node... pass a org.apache.xalan.xpath.xdom.XercesLiaison instead!");
         
          switch(outputTarget.getNode().getNodeType())
          {
          case Node.DOCUMENT_NODE:           
            handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.DOCUMENT_FRAGMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (DocumentFragment)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.ELEMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (Element)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          default:
            m_sRootObject.error(XSLTErrorResources.ER_CAN_ONLY_OUTPUT_TO_ELEMENT); //"Can only output to an Element, DocumentFragment, Document, or PrintWriter.");
          }
        }
        else
        {
          ParserAdapter handler = new ParserAdapter(new org.apache.xerces.parsers.SAXParser());
          outputTarget.setNode(processor.getXMLProcessorLiaison().createDocument());
          handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
          processor.setDocumentHandler(handler);
        }

       // processor.resetCurrentState(sourceTree);
       // processor.m_rootDoc = sourceTree;
View Full Code Here


//            processor.error(XSLTErrorResources.ER_CANT_USE_DTM_FOR_OUTPUT); //Can't use a DTMLiaison for an output DOM node... pass a org.apache.xalan.xpath.xdom.XercesLiaison instead!");
         
          switch(outputTarget.getNode().getNodeType())
          {
          case Node.DOCUMENT_NODE:           
            handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.DOCUMENT_FRAGMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (DocumentFragment)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.ELEMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (Element)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          default:
            m_sRootObject.error(XSLTErrorResources.ER_CAN_ONLY_OUTPUT_TO_ELEMENT); //"Can only output to an Element, DocumentFragment, Document, or PrintWriter.");
          }
        }
        else
        {
          ParserAdapter handler = new ParserAdapter(new org.apache.xerces.parsers.SAXParser());
          outputTarget.setNode(processor.getXMLProcessorLiaison().createDocument());
          handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
          processor.setDocumentHandler(handler);
        }

       // processor.resetCurrentState(sourceTree);
       // processor.m_rootDoc = sourceTree;
View Full Code Here

//            processor.error(XSLTErrorResources.ER_CANT_USE_DTM_FOR_OUTPUT); //Can't use a DTMLiaison for an output DOM node... pass a org.apache.xalan.xpath.xdom.XercesLiaison instead!");
         
          switch(outputTarget.getNode().getNodeType())
          {
          case Node.DOCUMENT_NODE:           
            handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.DOCUMENT_FRAGMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (DocumentFragment)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          case Node.ELEMENT_NODE:
            handler.setContentHandler(new FormatterToDOM(outputTarget.getNode().getOwnerDocument(), // PR:DMAN4M6PK5 Submitted by:<bk@viae.de>
                                                       (Element)outputTarget.getNode()).getSerializerObject());
            processor.setDocumentHandler(handler);
            break;
          default:
            m_sRootObject.error(XSLTErrorResources.ER_CAN_ONLY_OUTPUT_TO_ELEMENT); //"Can only output to an Element, DocumentFragment, Document, or PrintWriter.");
          }
        }
        else
        {
          ParserAdapter handler = new ParserAdapter(new org.apache.xerces.parsers.SAXParser());
          outputTarget.setNode(processor.getXMLProcessorLiaison().createDocument());
          handler.setContentHandler(new FormatterToDOM((Document)outputTarget.getNode()).getSerializerObject());
          processor.setDocumentHandler(handler);
        }

       // processor.resetCurrentState(sourceTree);
       // processor.m_rootDoc = sourceTree;
View Full Code Here

TOP

Related Classes of org.apache.xalan.xpath.xml.FormatterToDOM

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.