Re: Embedding FOP: resolving 'href' and 'url' references
Re: Embedding FOP: resolving 'href' and 'url' references
- Subject: Re: Embedding FOP: resolving 'href' and 'url' references
- From: Paul Hoadley <email@hidden>
- Date: Wed, 15 Sep 2010 11:00:29 +0930
Hi Fabian,
On 14/09/2010, at 10:04 PM, Fabian Peters wrote:
> I'm only using straight FOP (w/o any XSLT). Ages ago, I set up an FOImage component. This is the .wod:
>
> Image: WOXMLNode {
> alt = ^alt;
> border = ^border;
> elementName = "fo:external-graphic";
> mimetype = ^mimeType;
> src = src;
> height = ^height;
> line-height = ^lineHeight;
> width = ^width;
> content-width = ^content-width;
> content-height = ^content-height;
> }
>
> The src is:
>
> public URL src() {
> WOResourceManager resourceManager = application().resourceManager();
>
> String filename = (String) valueForBinding("filename");
> String framework = (String) valueForBinding("framework");
>
> return resourceManager.pathURLForResourceNamed(filename, framework, null);
> }
>
> I'd guess you'll also have to get the URL from the resource manager and pass that in somehow. I'd also guess the same applies to the URLs for any xsl files.
Thanks for that. I actually hadn't thought of generating the FO directly from a component. (I generate an XML document from a component, and transform that.) Nice idea.
--
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