Using Apache Tomcat 5.0.28 I'm having a problem with the xsl:import
command.
I have several Tomcat running on the same server (they could be
different releases of code so can't share resources).
An XSLT script is called via a JSP to convert XML to HTML (<xsl:apply
nameXml="routesummary" xsl="/xsl/routesummaryheader.xsl" />).
This routesummaryheader.xsl script then needs to call another XSLT
script routesummarycontent.xsl and it does this via an import, for
example,
<xsl:import
href="http://localhost:8080/aaem/xsl/routesummarycontent.xsl" />
Now this works fine.
But I run many Tomcat servers on this box and so a specific URI is no
good. So I want to replace that import with a relative URI
<xsl:import href="routesummarycontent.xsl" />
This does not work, I get "Had IO Exception with stylesheet file:
routesummarycontent.xsl".
Note routesummaryheader.xsl and routesummarycontent.xsl are in the same
directory.
I've tried all kinds of relative paths in the import nothnig seems to
work.
The JSP file is under webapps\app-dir\jsp. The XSLT files are under
webapps\app-dir\xsl.
How do I fix this?