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: Sat, 2 Oct 2010 18:36:53 +0930
Hi Patrick,
On 02/10/2010, at 12:25 PM, Patrick Robinson wrote:
> I just saw this (late to the party). I solved this for one of our apps in a way very similar to what you have there:
>
> public class XSLURIResolver implements URIResolver {
>
> public Source resolve(String href, String base) throws TransformerException {
> StringBuffer path = new StringBuffer(WOApplication.application().path());
> path.append("/Contents/Resources/");
> path.append(href);
> File file = new File(path.toString());
> if(file.exists()) return new StreamSource(file);
> return null;
> }
>
> }
>
> This works whether it's running on development or deployment machine, and whether from Eclipse or from command line.
Thanks for that. Quite similar.
--
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