You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Puneet Kathuria <Pu...@quark.com> on 2005/04/26 19:37:00 UTC

Tomcat based XSL applications

Trying to execute the sample provided at following location: 

Samples\servlet\SimpleXSLTServlet 

In the birds.xsl, I included another XSL say "search.xsl", the xalan
searches for that XSL in following directory: 

C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\search.xsl 

basically the directory from where tomcat wa started. It should look for
the xsl in context which was determined in the servlet by 

Source xmlSource = new StreamSource(new URL("file", "",
ctx+"birds.xml").openStream());


Re: Tomcat based XSL applications

Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hello.

"Puneet Kathuria" <Pu...@quark.com> wrote on 2005-04-26 01:37:00 PM:
> Trying to execute the sample provided at following location: 
> 
> Samples\servlet\SimpleXSLTServlet 
> 
> In the birds.xsl, I included another XSL say "search.xsl", the xalan
> searches for that XSL in following directory: 
> 
> C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\search.xsl 
> 
> basically the directory from where tomcat wa started. It should look
> for the xsl in context which was determined in the servlet by 
> 
> Source xmlSource = new StreamSource(new URL("file", "", ctx+"birds.
> xml").openStream());

     Thanks for pointing this out.  This is a problem in the sample 
itself.  The problem is in the way the servlet sample creates the 
StreamSource - it should specify the system ID on the StreamSource object 
(either on the constructor or through the setSystemId method) so that 
Xalan can correctly resolve relative URI references.

     Alternatively, the sample could use a URIResolver.

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com