Package org.apache.xalan.xslt

Examples of org.apache.xalan.xslt.XSLTResultTarget


   {
     StringReader readerInput = new StringReader (input);
     XSLTInputSource XSLinput = new XSLTInputSource (readerInput);

  StringWriter outBuffer = new StringWriter();
  XSLTResultTarget XSLoutput = new XSLTResultTarget(outBuffer)
try {
  XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
  processor.process(XSLinput, new XSLTInputSource(templateName),
                          XSLoutput);
} catch (Exception e) {
  e.printStackTrace();
}
  String result = XSLoutput.getCharacterStream().toString();
  //System.out.println (result);
     return (result);
   }
View Full Code Here


   {
     XSLTInputSource XSLinput = new XSLTInputSource (input);

  StringWriter outBuffer = new StringWriter();
  XSLTResultTarget XSLoutput = new XSLTResultTarget(outBuffer)
try {
  // Set up the XSLTProcessor to use XercesLiaison.
  XSLTProcessor processor = XSLTProcessorFactory.getProcessor
                                  (new org.apache.xalan.xpath.xdom.XercesLiaison());

  processor.process(XSLinput, new XSLTInputSource(templateName),
                          XSLoutput);
} catch (Exception e) {
  e.printStackTrace();
}
  String result = XSLoutput.getCharacterStream().toString();
     return (result);
   }
View Full Code Here

          XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
   
  
          processor.process(new XSLTInputSource(newsURL),
                            new XSLTInputSource("http://home.nordija.dk/news.xsl"),
                            new XSLTResultTarget(wrt));
  
   
         }
          catch(org.xml.sax.SAXException se){
     
View Full Code Here

            urlTmp = xmlPL.getURLFromString(xsltFile, null);
            MessageHandler.errorln("xslt: " + urlTmp);
            XSLTInputSource xslSheet =
              new XSLTInputSource (urlTmp.toString());

            XSLTResultTarget xmlResult = new XSLTResultTarget (writer);

            // Perform the transformation.
            processor.process(xmlSource, xslSheet, xmlResult);

            if (usefile) {
View Full Code Here

            // invalid here...
            XSLTInputSource xslSheet = new XSLTInputSource(xslStream);
            xslSheet.setSystemId(stylesheet.getAbsolutePath());
            XSLTInputSource src = new XSLTInputSource(fis);
            src.setSystemId(infile.getAbsolutePath());
            XSLTResultTarget res = new XSLTResultTarget(fos);
            processor.process(src, xslSheet, res);
        } finally {
            // make sure to close all handles, otherwise the garbage
            // collector will close them...whenever possible and
            // Windows may complain about not being able to delete files.
View Full Code Here

        XSLTInputSource xml_src = new XSLTInputSource(caller.document);
        String system_id = caller.getStylesheetSystemId();
        XSLTInputSource xsl_src = new XSLTInputSource(system_id);
        OutputStream os = getOutputStream();
        try {
            XSLTResultTarget target = new XSLTResultTarget(os);
            processor.process(xml_src, xsl_src, target);
        } finally {
            os.close();
        }
    }
View Full Code Here

            // invalid here...
            XSLTInputSource xslSheet = new XSLTInputSource(xslStream);
            xslSheet.setSystemId(stylesheet.getAbsolutePath());
            XSLTInputSource src = new XSLTInputSource(fis);
            src.setSystemId(infile.getAbsolutePath());
            XSLTResultTarget res = new XSLTResultTarget(fos);
            processor.process(src, xslSheet, res);
        } finally {
            // make sure to close all handles, otherwise the garbage
            // collector will close them...whenever possible and
            // Windows may complain about not being able to delete files.
View Full Code Here

        XSLTInputSource xml_src = new XSLTInputSource(caller.document);
        String system_id = caller.getStylesheetSystemId();
        XSLTInputSource xsl_src = new XSLTInputSource(system_id);
        OutputStream os = getOutputStream();
        try {
            XSLTResultTarget target = new XSLTResultTarget(os);
            processor.process(xml_src, xsl_src, target);
        } finally {
            os.close();
        }
    }
View Full Code Here

   
    // Have the XSLTProcessor processor object transform "foo.xml" to
    // System.out, using the XSLT instructions found in "foo.xsl".
    processor.process(new XSLTInputSource("foo.xml"),
                      new XSLTInputSource("foo.xsl"),
                      new XSLTResultTarget(System.out));
  }
View Full Code Here

    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
   
    XSLTInputSource xmlID = new XSLTInputSource("foo.xml");
    XSLTInputSource stylesheetID = new XSLTInputSource("foo.xsl");
    Document out = new org.apache.xerces.dom.DocumentImpl();
    XSLTResultTarget resultTarget = new XSLTResultTarget(out);
    processor.process(xmlID, stylesheetID, resultTarget);
   
    PrintWriter pw = new PrintWriter( System.out );
    FormatterToXML fl = new FormatterToXML(pw, true);
    TreeWalker tw = new TreeWalker(fl);
View Full Code Here

TOP

Related Classes of org.apache.xalan.xslt.XSLTResultTarget

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.