This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
<xsl:include href="cant_be_found_on_linux.xsl"/>???
- To: <xsl-list at lists dot mulberrytech dot com>, <SERVLET-INTEREST at JAVA dot SUN dot COM>
- Subject: [xsl] <xsl:include href="cant_be_found_on_linux.xsl"/>???
- From: "Robert Koberg" <rob at koberg dot com>
- Date: Sun, 27 May 2001 09:14:04 -0700
- References: <000001c0e601$0a8b21e0$a1453c3e@PCUKMKA> <048701c0e64b$282653b0$94f197d4@existic>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I am having problems with included stylesheets. I have a "wrapper" XSL that
includes the different parts of the pages, like so:
<xsl:include href="head.xsl"/>
The wrapper.xsl is in the same directory as head.xsl. These files reside
under the WEB-INF directory (so they are hidden) in resin (basically the
same as tomcat):
/WEB-INF/_xml/wrapper.xsl
/WEB-INF/_xml/head.xsl
The pages are transformed with servlets located in the class direcory under
WEB-INF using xalan. This works fine if I do a simple XSL/XML transform (1
xsl and 1 xml, no includes). The page is also transformed if I use the
command line.
Works as expected on windows (xalan-j_2_1_0, resin 1.2.5)
Problem with Linux (xalan-j_2_1_0, resin 1.2.5):
When the servlets start the transformation I get the following error:
File "file:////usr/resin//usr/resin/doc/WEB-INF/_xml/head.xsl" not found. -
yada yada
So it is prepending the path to root directory (doc). This only happens
when I use servlets on linux. The error occurs in the XSLT process not in
the serlvet. WHat can I do so that linux can see my included files?
Here is how I get the path to the WEB-INF folder so I can get wrapper.xsl
(which is working):
String APPLICATION_ROOT =
getServletConfig().getServletContext().getRealPath("/WEB-INF");
Thanks,
Rob
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list