xsl:import with relative path and jar packaging problem

S

Symon

Hello,

I have a little problem using the xsl:import tag with Xalan in a JAR
packaged application. All my application is packaged inside one JAR,
containing all classes and ressources.

My XSL transformation works well, but if I try to import a "common.xsl"
file which is inside my JAR, Xalan can't find it.

Since Xalan uses Java URL class, I already tried complicated URL like
jar:file://appli.jar!/ressources/common.xsl which works in my java
application, but not inside a xsl:import url ...

Temporaly, my workaround is to copy all necessary ressources in a temp
directory before launching my transformation, but I can't let this code
like that.

The solution can't be to use an absolute located jar, like
jar:file:///home/symon/myjar.jar!/ressources/common.xsl : it works, but
the app will be moved frequently, and run in different environments.

Thanks for suggestion.

Symon
 
Joined
May 15, 2006
Messages
1
Reaction score
0
Try to define a URIResolver. See details at:

http://access1.sun.com/technotes/00762.html

SM78

Symon said:
Hello,

I have a little problem using the xsl:import tag with Xalan in a JAR
packaged application. All my application is packaged inside one JAR,
containing all classes and ressources.

My XSL transformation works well, but if I try to import a "common.xsl"
file which is inside my JAR, Xalan can't find it.

Since Xalan uses Java URL class, I already tried complicated URL like
jar:file://appli.jar!/ressources/common.xsl which works in my java
application, but not inside a xsl:import url ...

Temporaly, my workaround is to copy all necessary ressources in a temp
directory before launching my transformation, but I can't let this code
like that.

The solution can't be to use an absolute located jar, like
jar:file:///home/symon/myjar.jar!/ressources/common.xsl : it works, but
the app will be moved frequently, and run in different environments.

Thanks for suggestion.

Symon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top