Package org.dom4j.io

Examples of org.dom4j.io.DocumentSource


    protected Document[] internalProcess(Document doc) {
        if (logger.isDebugEnabled()) {
            logger.debug("About to transform: " + DomUtil.domToString(doc));
        }

        DocumentSource source = new DocumentSource(doc);
        DocumentResult result = new DocumentResult();
        try {
            synchronized(transformer) {
                transformer.transform(source, result);
            }
View Full Code Here


            String contentType = value.last();

            response.setContentType(contentType);
            try {
                synchronized(transformer) {
                    transformer.transform(new DocumentSource(originalDom), new StreamResult(pw));
                }
            } catch (TransformerException e) {
                logger.error("internalProcess: exception while transforming document. (set error level to debug to see the offending document)", e);
                logger.debug("offending document was: " + DomUtil.domToString(originalDom));
                response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error processing internal xslt.");
View Full Code Here

            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
View Full Code Here

        transformer = factory
            .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
View Full Code Here

        transformer = factory
            .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
View Full Code Here

        transformer = factory
            .newTransformer( new StreamSource( ApacheDSConfigurationPlugin.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
View Full Code Here

      MessageExchangeFactory mef = channel.createExchangeFactory();
      MessageExchange me = mef.createInOnlyExchange();
      me.setInterfaceName(new QName(portType));
      me.setOperation(new QName(operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.send(me);
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
View Full Code Here

      MessageExchangeFactory mef = channel.createExchangeFactory();
      MessageExchange me = mef.createInOnlyExchange();
      me.setInterfaceName(new QName(namespace, portType));
      me.setOperation(new QName(namespace, operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.send(me);
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
View Full Code Here

      MessageExchangeFactory mef = channel.createExchangeFactory();
      MessageExchange me = mef.createInOnlyExchange();
      me.setInterfaceName(new QName(portType));
      me.setOperation(new QName(operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.sendSync(me);
      NormalizedMessage out = me.getMessage("out");
      DocumentResult result = new DocumentResult();
      TransformerFactory.newInstance().newTransformer().transform(out.getContent(), result);
View Full Code Here

      MessageExchangeFactory mef = channel.createExchangeFactory();
      MessageExchange me = mef.createInOnlyExchange();
      me.setInterfaceName(new QName(namespace, portType));
      me.setOperation(new QName(namespace, operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.sendSync(me);
      NormalizedMessage out = me.getMessage("out");
      DocumentResult result = new DocumentResult();
      TransformerFactory.newInstance().newTransformer().transform(out.getContent(), result);
View Full Code Here

TOP

Related Classes of org.dom4j.io.DocumentSource

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.