• 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
Embedding FOP: resolving 'href' and 'url' references
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Embedding FOP: resolving 'href' and 'url' references
  • From: Paul Hoadley <email@hidden>
  • Date: Tue, 14 Sep 2010 20:44:27 +0930

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

  • Follow-Ups:
    • Re: Embedding FOP: resolving 'href' and 'url' references
      • From: "email@hidden" <email@hidden>
    • Re: Embedding FOP: resolving 'href' and 'url' references
      • From: Fabian Peters <email@hidden>
    • Re: Embedding FOP: resolving 'href' and 'url' references
      • From: Q <email@hidden>
  • Prev by Date: Re: deploying my first app
  • Next by Date: Re: Embedding FOP: resolving 'href' and 'url' references
  • Previous by thread: Re: Wonder D2W New Project
  • Next by thread: Re: Embedding FOP: resolving 'href' and 'url' references
  • Index(es):
    • Date
    • Thread