Howard,
I don't know if it is what you are looking for but I had come dificulties
earlier this week to generate XML document object on the flight and process
it as
an input source.
I finaly found how to do in on a mailling list hosted on
http://www.mulberrytech.com

Below is the code I used :


Object data = session.getValue("xmldata");

if (data !=null){
 try{
        org.apache.xerces.dom.DocumentImpl document =
(org.apache.xerces.dom.DocumentImpl)data;

        org.apache.xalan.xpath.xdom.XercesLiaison xercesLiaison = new
org.apache.xalan.xpath.xdom.XercesLiaison();

        org.apache.xalan.xslt.XSLTEngineImpl xsltEI = new
org.apache.xalan.xslt.XSLTEngineImpl(xercesLiaison);

        org.apache.xalan.xslt.StylesheetRoot styRoot =
xsltEI.processStylesheet("c:/temp/style.xsl");

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

        org.apache.xalan.xslt.XSLTResultTarget xsltResultTarget = new
org.apache.xalan.xslt.XSLTResultTarget(byteout);

        styRoot.process(xsltEI, document, xsltResultTarget);

        out.println(byteout.toString());
 }
        catch(Exception ex){
}


}else{
%><p>No data in session</p><%
}

regards,
Philippe
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Philippe Bertramo
World Customs Organization
Brussels - Belgium


-----Original Message-----
From: Howard Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 24, 2000 22:48
To: [EMAIL PROTECTED]
Subject: XML+XSL


Hi guys,

Has anyone worked on creating a Servlet that generates an XML and then uses
Xalan or some XSLT to put XML and XSL together? I don't want to create an
XML file (physical file), but wanna create an xml on the fly and pass it
onto another input source. Has anyone done this? Thank you very much!

howard

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to