[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL-FO transformation: XSL template packed in a JAR
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")[/cod e] 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|