[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

Subject: XSL-FO transformation: XSL template packed in a JAR
From: "Aitor San Juan" <asanjuan@xxxxxxxxxxxxxx>
Date: Tue, 19 Jul 2005 08:41:54 +0200
fop transformation
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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.