Project

Profile

Help

xsl:include from jar file in an ear file

Added by Anonymous about 17 years ago

Legacy ID: #4224542 Legacy Poster: tjerni (tjerni)

I am using Saxon 8.9 and Java 1.4.2_05, and BEA Weblogic 8.1.2 So I have a stylesheet that uses xsl:include to include another stylesheet. Both stylesheets are in a jar file called transform.jar, and the transform.jar file is in an ear file called service.ear which is deployed to a weblogic server. I have added the below as my include statement, but when I run my app I get Error at xsl:include on line 3 of : XTSE0165: java.util.zip.ZipException: The system cannot find the file specified. Any ideas of what I may be doing wrong? <xsl:include href="jar:file:///services.ear!/APP-INF/lib/transform.jar!/TransformFunctions.xslt"/> and this, <xsl:include href="jar:file:///transform.jar!/TransformFunctions.xslt"/> but neither worked


Replies (1)

RE: xsl:include from jar file in an ear file - Added by Anonymous about 17 years ago

Legacy ID: #4224580 Legacy Poster: Michael Kay (mhkay)

I haven't actually come across these 2-level URLs before. Saxon 8.9 was enhanced to support the jar: URL scheme as defined in the Javadoc for java.net.JARURLConnection, which doesnt't mention the idea of addressing files within jar files within ear files. Do you know where this is specified? It's entirely possible that it isn't supported by the java.net.URL class, in which case it isn't supported by Saxon either. How do you actually invoke the transformation? What's the base URI of the principal stylesheet module? Have you tried using a simple relative URL such as "TransformFunctions.xslt"? Because the change in 8.9 wasn't about accepting absolute JAR URLs, that was already working; it was about resolving a relative URI against a JAR URL, which wasn't working because the java.net.URI class doesn't recognize them.

    (1-1/1)

    Please register to reply