Hi Christine,

   thanks for your help.  By now I'm getting some
output, and at least it's the same error msg on both
windows and linux. 

   error msg:

The output format must have a
'{http://xml.apache.org/xslt}content-handler'
property!


  any ideas?  thanks....




--- Christine Li <[EMAIL PROTECTED]> wrote:
> Do you get any error message, for example can't find
> the xsl or xml files?
> I don't see anything wrong in the servlet code that
> you provided. Can you
> try the sample servlet codes(from Xalan.2.5.D1
> release) with Tomcat? And
> also try your xml and xsl files without using
> servlet, just make sure they
> are right.
> 
> Christine Li
> XSLT Development
> IBM Toronto Lab
> Tel: (905)413-2601
> Email: [EMAIL PROTECTED]
> 
> 
>                                                     
>                                                     
>                              
>                       Ali Zain                      
>                                                     
>                              
>                       Banatwala                To:  
>     [EMAIL PROTECTED]                    
>                              
>                       <[EMAIL PROTECTED]>        cc:  
>                                                     
>                              
>                                               
> Subject:  xslt servlet trouble - nothing outputs    
>                                    
>                       03/25/2003 08:26              
>                                                     
>                              
>                       PM                            
>                                                     
>                              
>                                                     
>                                                     
>                              
>                                                     
>                                                     
>                              
> 
> 
> 
> Hi,
>   i'm using Tomcat 4.1 and i'm having trouble trying
> to get my xml file to output in my servlet.
> 
> i've tried it with JDOM and without. using File and
> URL as the StreamSource param, but nothing shows up.
> there's no output.
> 
>  both "movies.xml" and "movies.xsl" are in my
> servlet
> context root.
> 
> somebody pls help!!
> thanx...
> 
> 
> here's my code:
>       res.setContentType("text/html");
>     PrintWriter out = res.getWriter();
> 
>     out.println("<html><head><title>Movie
> List</title></head><body>");
>     out.println("<center><h1>Movie
> List</h1></center><br/>");
> 
> 
>        Source inXsl = new StreamSource(new
>
URL("file","",getServletContext()+"movies.xsl").openStream());
>        Source inXml = new StreamSource(new
>
URL("file","",getServletContext()+"movies.xml").openStream());
> 
>        TransformerFactory transFact =
> TransformerFactory.newInstance();
>        Transformer trans =
> transFact.newTransformer(inXsl);
> 
>      trans.transform(inXml, new StreamResult(out));
> 
>         out.println("<body></html>");
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness,
> live on your desktop!
> http://platinum.yahoo.com
> 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

Reply via email to