Examples of newTransformer()


Examples of javax.xml.transform.TransformerFactory.newTransformer()

    if ( stream == null throw (new Exception("SOSXMLTransformer: no xml document contained in stream." ));
    if ( stylesheetStream == null throw (new Exception("SOSXMLTransformer: no stylesheet contained in stream." ));
   
    TransformerFactory tFactory = TransformerFactory.newInstance();
       
    Transformer transformer = tFactory.newTransformer(stylesheetStream);
    addParameters(transformer, parameters);
    transformer.transform(stream,
        new StreamResult(new FileOutputStream(outputFile)));
  }
 
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTransformer()

    StreamSource inputStream = new StreamSource(stream);
   
    TransformerFactory tFactory = TransformerFactory.newInstance();
   
   
    Transformer transformer = tFactory.newTransformer(styleStream);
    addParameters(transformer, parameters);
    transformer.transform(inputStream,
        new StreamResult(new FileOutputStream(outputFile)));
  }
 
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTransformer()

   
    if ( data.length() == 0 throw (new Exception("SOSXMLTransformer: no xml document contained in data." ));
    if ( !xslFile.exists() )  throw (new Exception("SOSXMLTransformer: no file found containing stylesheet." ));
   
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
    addParameters(transformer, parameters);
    transformer.transform(new StreamSource(new StringReader(data)),
        outputStream);
  }
 
View Full Code Here

Examples of javax.xml.transform.sax.SAXTransformerFactory.newTransformer()

              transformer.transform(new DOMSource(xmlDoc, inFileName),
                                    new DOMResult(outNode));

              // Now serialize output to disk with identity transformer
              Transformer serializer = stf.newTransformer();
              Properties serializationProps =
                stylesheet.getOutputProperties();

              serializer.setOutputProperties(serializationProps);
View Full Code Here

Examples of net.sf.saxon.PreparedStylesheet.newTransformer()

                CompilerInfo info = new CompilerInfo();
                info.setURIResolver(config.getURIResolver());
                info.setErrorListener(config.getErrorListener());
                info.setCompileWithTracing(config.isCompileWithTracing());
                PreparedStylesheet pss = PreparedStylesheet.compile(new StreamSource(styleFile), config, info);
                transformer = (Controller)pss.newTransformer();
                transformer.setInitialMode(initialMode);
                transformer.setInitialTemplate(initialTemplate);
                if (tracing) {
                    transformer.addTraceListener(new XSLTTraceListener());
                }
View Full Code Here

Examples of net.sf.saxon.TransformerFactoryImpl.newTransformer()

    TransformerFactory transFact = new TransformerFactoryImpl();
    if (resolver != null) {
      transFact.setURIResolver(resolver);
    }
    // Perform Transform
    Transformer trans = transFact.newTransformer(xsltSource);
    // set the parameters that are passed to the stylesheet
    if (parameters != null) {
      Iterator<Entry<String, T>> it = parameters.entrySet().iterator();
      while (it.hasNext()) {
        Entry<String, T> entry = it.next();
View Full Code Here

Examples of org.apache.trax.Templates.newTransformer()

    //Get the Templates object from the ContentHandler.
    Templates templates = templatesBuilder.getTemplates();

    // III. Use the Templates object to instantiate a Transformer.
    Transformer transformer = templates.newTransformer();

    // IV. Perform the transformation.

    // Set up the ContentHandler for the output.
  FileOutputStream fos = new FileOutputStream(args[2]);
View Full Code Here

Examples of org.exoplatform.services.xml.transform.trax.TRAXTemplates.newTransformer()

            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            String msg = "XSLT scheme name is null.";
            throw new NullPointerException(msg);
View Full Code Here

Examples of org.pdf4j.saxon.PreparedStylesheet.newTransformer()

                CompilerInfo info = new CompilerInfo();
                info.setURIResolver(config.getURIResolver());
                info.setErrorListener(config.getErrorListener());
                info.setCompileWithTracing(config.isCompileWithTracing());
                PreparedStylesheet pss = PreparedStylesheet.compile(new StreamSource(styleFile), config, info);
                transformer = (Controller)pss.newTransformer();
                transformer.setInitialMode(initialMode);
                transformer.setInitialTemplate(initialTemplate);
                if (tracing) {
                    transformer.addTraceListener(new XSLTTraceListener());
                }
View Full Code Here

Examples of org.switchyard.transform.internal.TransformerRegistryLoader.newTransformer()

        if (transformModel == null) {
            Assert.fail("No smooks config.");
        }
        TransformerRegistryLoader trl = new TransformerRegistryLoader(new BaseTransformerRegistry());
        return trl.newTransformer(transformModel);
    }

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