The Java example from the Wiki page is updated now.

On 07.08.2008 20:16:28 Jeremias Maerki wrote:
> Bundling the stylesheets in the WAR file is one solution that many users
> seem to be using. Another could be using a XML Catalog (using XML
> Commons Resolver from the Apache XML project). More information on the
> resolver here:
> http://xml.apache.org/commons/components/resolver/index.html
> http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver
> 
> With an XML Catalog you could do things like rewriting URIs like:
> myresources:xslt/mystylesheet.xslt
> to:
> file:/home/user/resources/xslt/mystylesheet.xslt
> 
> The XML Commons Resolver implements both the EntityResolver and
> URIResolver interfaces. In FOP, you can configure your own URIResolver.
> However, the Java example on the Wiki page above (as I had to notice now)
> is hopelessly outdated. I'll see to it that it is updated.
> 
> Yet another way is to just set the base URI on the FopFactory to
> something you define. But then you're still using relative filenames.
> Not that this is bad in any way. But it can be hard to debug.
> 
> HTH
> 
> On 07.08.2008 19:16:18 Pete Allison wrote:
> > This may not be the appropriate forum (may be more of a Java question), so I
> > asked for your forbearance.
> > 
> > We are struggling with where to keep our image files. Right now we loading
> > them with absolute file paths. This works for one application that "builds"
> > the path based on environment information. This allows us to maintain
> > portability. 
> > 
> > We have another application that does not know anything about its
> > environment. When the application is moved from a development server to a
> > production, we must update the stylesheet to reflect the server change. We
> > would like to avoid this. 
> > 
> > It appears that file references, if not absolute, are relative to the (and
> > here's the part we are a little fuzzy on) the classpath for our FOP servlet?
> > 
> > 
> > If this is the case, I guess we can put them in the WAR file and then
> > redistribute it as needed. I was hoping for a cleaner solution.
> > 
> > Thanks,
> > Pete Allison
> >  
> 
> 
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to