• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Embedding FOP: resolving 'href' and 'url' references
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding FOP: resolving 'href' and 'url' references


  • Subject: Re: Embedding FOP: resolving 'href' and 'url' references
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 14 Sep 2010 16:00:13 +0100

Hi Paul,

I switch from FOP to iText, but when I was using FOP I found I had to specify the full system path for it to work.

Rob.

On 14 Sep 2010, at 12:14, Paul Hoadley wrote:

Hello,

I see some references to FOP in the archives over the years, so there are obviously people using it.  I hope they're still subscribed.  :-)

I am trying to embed Apache FOP into an application.  It's going quite well, but I have an outstanding issue: resolution of 'href' attributes in XSLT files and 'url' attributes in XSLFO files.  For example, I have a 'driver.xsl' file which sets some app-specific params, and then imports the stylesheet proper:

  <xsl:import href="invoice.xsl"/>

'driver.xsl' and 'invoice.xsl' are both in Resources.  Neither "/invoice.xsl" nor "/Resources/invoice.xsl" helped.  The error is fairly non-specific:

SystemId Unknown; Line #5; Column #35; Had IO Exception with stylesheet file: invoice.xsl

(Line 5, Column 35 is the location in driver.xsl where the import element finishes.)  Similarly, that transform generates some XSLFO which refers to an image:

background-image="url('invoice-logo.png')"

(The XSLFO is ephemeral, just living in an NSData object until the PDF is generated, so maybe a relative URL like that doesn't even make sense.)  In this case, I get this logged:

Sep 14 20:17:07 PBF[56565] DEBUG FOP  - File not found: file:invoice-logo.png
Sep 14 20:17:07 PBF[56565] DEBUG AbstractImageSessionContext  - URI could not be resolved: invoice-logo.png

It's not clear to me where FOP is looking for these resources, nor how to tell it to look in Resources.  Does anyone know?


-- 
Paul.

http://logicsquad.net/

Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Embedding FOP: resolving 'href' and 'url' references (From: Paul Hoadley <email@hidden>)

  • Prev by Date: [MEETING] WONOVA postponed to next week
  • Next by Date: Re: webex and D2W
  • Previous by thread: Re: Embedding FOP: resolving 'href' and 'url' references
  • Next by thread: [MEETING] WONOVA postponed to next week
  • Index(es):
    • Date
    • Thread