Package org.apache.xalan.xslt

Examples of org.apache.xalan.xslt.XSLTProcessor.process()


              new XSLTInputSource (urlTmp.toString());

            XSLTResultTarget xmlResult = new XSLTResultTarget (writer);

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

            if (usefile) {
                reader = new FileReader(args[2] + ".tmp");
            } else {
                // create a input source containing the xsl:fo file which can be fed to Fop
View Full Code Here


        try {
            XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
            XSLTInputSource  xml  = new XSLTInputSource(argv[0]);
            XSLTInputSource  xslt = new XSLTInputSource(argv[1]);
            XSLTResultTarget target = new XSLTResultTarget(doc);
            processor.process(xml, xslt, target);
        }
        catch (SAXException e) {
            System.err.println("error: Error processing stylesheet.");
            System.exit(1);
        }
View Full Code Here

        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

            File dir = new File(htmlfile.getParent()); // getParentFile is in JDK1.2+
            if (!dir.exists()) {
                dir.mkdirs();
            }
            task.log("Applying '" + xslname + "'. Generating '" + htmlfile + "'", Project.MSG_VERBOSE);
            processor.process( new XSLTInputSource(root), xsl_source, new XSLTResultTarget(htmlfile.getAbsolutePath()) );
            final long dt = System.currentTimeMillis() - t0;
            task.log("Transform time for " + xslname + ": " + dt + "ms");
        } catch (IOException e){
            task.log(e.getMessage(), Project.MSG_ERR);
            e.printStackTrace(); //@todo bad, change this
View Full Code Here

        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

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.