xsl-list
[Top] [All Lists]

XSL-FO transformation: XSL template packed in a JAR

2005-07-18 23:41:54
Hi List!

I have developped a Java class to transform an XML file into a PDF file using 
FOP. My Java class, the XSL template and a .gif file (the image that will 
appear as the logotype in the header of each page of the resulting PDF file) 
are packed in a JAR file.

The XSL template uses a relative URL that points to the .gif file, as:
[code]url('./mylogo.gif')[/code]

The transformation completes Ok, BUT the FOP transformation process is unable 
to locate the gif file, which in turn tries to locate it as an external file on 
the local file system. Both, the XSL template and the .gif file are packed in 
the same subdirectory inside the JAR file.

I use something similar to the following line of code to access the XSL 
template packed in the JAR:

[code]getClass().getResourceAsStream("/net/bolsabilbao/xsl/xml2pdf.xsl")[/code]

My question: How can I say the FOP processor (or my class, or whoever) that the 
.gif file is packed in the JAR?

Any hint or suggestion would be highly appreciated.

Thanks in advance.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>