Examples of newTransformer()


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

        copyTag(aliasName, tmlTag, appendElement(taglib, "tag"));
      }
    }
   
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.transform(new DOMSource(tld), new StreamResult(targetFile));
  }
 
  private void copyTag(String tagName, Element tmlTag, Element tldTag) {
View Full Code Here

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

    try {
      styleSource = convertToSource(styleSheet);
      xmlSource = convertToSource(xml);
      final Source xmlParam = xmlSource;
      TransformerFactory factory = TransformerFactory.newInstance();
            final Transformer transformer = factory.newTransformer(styleSource);
           
      //this creates a non-validated sqlxml - it may not be valid xml/root-less xml
      SQLXMLImpl result = XMLSystemFunctions.saveToBufferManager(context.getBufferManager(), new XMLTranslator() {
       
        @Override
View Full Code Here

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

            return null;
        }
       
        try {
            TransformerFactory factory = TransformerFactory.newInstance();
            Transformer transformer = factory.newTransformer();
            transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
            StringWriter output = new StringWriter();
            transformer.transform(new DOMSource(target), new StreamResult(output));
           
            return output.toString();
View Full Code Here

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

    @Override
    public void transform() throws Exception {
        TransformerFactory factory = TransformerFactory.newInstance();
        FileOutputStream fos = new FileOutputStream(target.toString());
        javax.xml.transform.Transformer transformer =
                              factory.newTransformer(new StreamSource(template.toString()));
        transformer.transform(new StreamSource(source.toString()),
                              new StreamResult(fos));
       
        fos.close();
    }
View Full Code Here

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

        try {
            Fop fop = fopFactory.newFop(MimeConstants.MIME_RTF, foUserAgent, out);
            TransformerFactory factory = TransformerFactory.newInstance();
           
            javax.xml.transform.Transformer transformer =
                    factory.newTransformer(new StreamSource(template));
           
            transformer.setErrorListener(this);
            transformer.setParameter("versionParam", "1.0");
            transformer.transform(new StreamSource(source), new SAXResult(fop.getDefaultHandler()));
        } finally {
View Full Code Here

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

        try {
            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
            TransformerFactory factory = TransformerFactory.newInstance();
           
            javax.xml.transform.Transformer transformer =
                    factory.newTransformer(new StreamSource(template));
           
            transformer.setErrorListener(this);
            transformer.setParameter("versionParam", "1.0");
            transformer.transform(new StreamSource(source), new SAXResult(fop.getDefaultHandler()));
        } finally {
View Full Code Here

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

         org.xml.sax.SAXException  {

    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = null;
    try {
      transformer = tFactory.newTransformer(new StreamSource(xslDocUri));
//      transformer = tFactory.newTransformer(new StreamSource(new ByteArrayInputStream(xslDoc.getBytes())));
      transformer.transform(
        new StreamSource(new ByteArrayInputStream(xmlDoc)),
        new StreamResult(outputURL));
    }
View Full Code Here

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

    ByteArrayOutputStream boutArray = new ByteArrayOutputStream();

    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = null;
    try {
      transformer = tFactory.newTransformer(new StreamSource(xslDocUri));
    }
    catch (Exception e) {
      logger.fatal(e.getMessage(), e);
      throw new IOException(e.getMessage());
    }
View Full Code Here

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

            throw new IllegalArgumentException("HTMLwithXSLBuilder2::transform : Illegal argument for HTML output");
        }

      try {
          TransformerFactory tFactory = TransformerFactory.newInstance();
          Transformer transformer = tFactory.newTransformer(tXslSource);

            // Set the Stylesheet params (if any)
            if (aParamList != null) {
                String tKey;
                Object tValue;
View Full Code Here

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

      if (transformer == null)
      {
        XMLHelper.setTransformerProperties();

        TransformerFactory tFactory = TransformerFactory.newInstance();
        transformer = tFactory
            .newTransformer(new StreamSource(xslFile));
        mTransformers.put(Thread.currentThread().getName() + xslFile,
            transformer);
      }
    }
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.