Hi, I send the email one again, as the first one didn't went through.

I cant't figure out how to get Saxon8 to work instead of Xalan. The code below works fine with Xalan but doesn't give me a result
with Saxon. Can you please help me to get this working with Saxon8.
Got it working while having a local file, tried different things to apply an SystemId, but couldn't figure out if this is the problem.


java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();

javax.xml.parsers.DocumentBuilderFactory dFactory
        = javax.xml.parsers.DocumentBuilderFactory.newInstance();

DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
Document xmlDoc = dBuilder.parse(new InputSource(new StringBufferInputStream(xml)));  
DOMSource xmlDomSource = new DOMSource(xmlDoc);

Document xslDoc = dBuilder.parse(new InputSource(new StringBufferInputStream(xsl)));
DOMSource xslDomSource = new DOMSource(xslDoc);

TransformerFactory tFactory
         = TransformerFactory.newInstance();
Templates templates = tFactory.newTemplates(xslDomSource);
Transformer transformer = templates.newTransformer();

if ("XLS".equalsIgnoreCase(type))
    /*--------- HSSF-only  Code ---------------------------------------------------------------*/
    // Set up the HSSF Serializer to serialize the Result to an output stream.
    org.apache.cocoon.serialization.HSSFSerializer ser
         = new org.apache.cocoon.serialization.HSSFSerializer();
    ser.initialize();  // don't forget this line or you get a null pointer exception
    // The Serializer functions as a SAX ContentHandler.
    Result result
       = new SAXResult((org.xml.sax.ContentHandler)ser);

transformer.transform(xmlDomSource, result);


byte[] content = out.toByteArray();
// pipeline
pipelineCursor = pipeline.getCursor();
IDataUtil.put( pipelineCursor, "content", content );

This message and any attachment ("the Message") are confidential. If you are not the intended recipient any use is strictly prohibited. If you have received the Message in error, please notify the sender immediately and delete the Message from your system, any use is forbidden. Correspondence via e-mail is primarily for information purposes. KAG/RVG/RIFA/ImmoKAG neither makes nor accepts legally binding statements unless otherwise agreed to the contrary