This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

<xsl:include href="cant_be_found_on_linux.xsl"/>???


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]