Subject: RE: Loading XSL files from stylesheet stored into a JAR
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 17 Feb 2004 17:11:17 -0000
|
I suspect this is a case for writing your own URIResolver.
Michael Kay
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> cmalderez@xxxxxxx
> Sent: 17 February 2004 16:39
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Loading XSL files from stylesheet stored into a JAR
>
>
> Hello,
>
> I'm using JBoss v3.2.3 with Tomcat 4.1.29.
> I've build a small Web application using JSP, EJB producing
> XML document (using
> JDOM) and displaying data as HTML using XSL stylesheets.
>
> I want to separate some XSL templates into other XSL files
> and load them from
> my primary XSL stylesheet.
> Easy using: <xsl:include href="foo.xsl"/>
>
> But all my JSP and XSL files are packaged into a WAR(jar)
> file and deployed
> into JBoss with my EJB package.
> The Web Package (WAR file) is mounted using the web-uri:
> mytool The Web Package contains 2 folders 'jsp/' with all JSP
> pages & 'xsl/' with all
> XSL stylesheets.
>
> I access to my JSP using this URL
> http://localhost:8080/mytool/jsp/myjsp.jsp
> In my JSP I can't
> load my XSL stylesheets as file because they are in a JAR. So
> I load them using the getClass().getResource('myxsl.xsl');
>
> But how can I specify the correct URI for the second XSL file
> 'foo.xsl' which
> must be loaded from the 'myxsl.xsl' ?
> I can't use <xsl:include href="foo.xsl"/> anymore ...
> I've noticed that the following line works <xsl:include
> href="http://localhost:8080/mytool/xsl/foo.xsl"/> ... but I
> can't let hard
> configuration like that in XSL files.
>
> How can I get a correct mount point in order to load the 'foo.xsl'
> from 'myxsl.xsl' ??
>
> Thanks !
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|