cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: How to receive the resulting html in an outputstream
Date Sun, 19 Nov 2000 17:10:16 GMT

You can use the classes of xalan to do that, try something like this:

import org.xml.sax.SAXException;
import org.apache.xalan.xslt.XSLTProcessorFactory;
import org.apache.xalan.xslt.XSLTInputSource;
import org.apache.xalan.xslt.XSLTResultTarget;
import org.apache.xalan.xslt.XSLTProcessor;

 * Simple sample code to show how to run the XSL processor
 * from the API.
public class SimpleTransform
     public static void main(String[] args)
    // Have the XSLTProcessorFactory obtain a interface to a
    // new XSLTProcessor object.
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

    // Have the XSLTProcessor processor object transform "tienda3.xml" to
    // System.out, using the XSLT instructions found in "1_2_0_2_1_3_0.xsl".
    processor.process(new XSLTInputSource("tienda3.xml"),
                      new XSLTInputSource("1_2_0_2_1_3_0.xsl"),
                      new XSLTResultTarget("PRUEBA.html"));

Is that what you need?
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material.  Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited.   If you received this in error, please
contact the sender and delete the material from any computer.

View raw message