RE: Using draft images with fop, and catalogs.




I don't particularly want to use "base".
Up to now I've been the only person here using FOP. I have my own local
paths hard-coded into various batch and configuration files I'm using.
I am now trying to rearrange my project so other members of my team
might use it. They may have some of the files at different places
locally.
What I want to do is minimize the number of different places they need
to insert their own paths. And using the Catalog mechanism seems like a
useful way of collecting together this type of information, at least as
far as the two main Java programs (Saxon and Fop) are concerned. I am
now using Saxon in this way and would like, if possible, to use Fop
likewise.

Over on the docbook-apps list Bob Stayton has advised me that there is
some way of doing this in Fop. I'd apprecitate it if anyone could post
an example of how to modify fop.bat to get this sort of functionality.


Appreciatively,
Richard.



> -----Original Message-----
> From: Andreas Delmelle [mailto:andreas.delmelle@xxxxxxxxxx]
> Sent: 04 February 2009 17:40
> To: fop-users@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: Using draft images with fop, and catalogs.
>
> On 04 Feb 2009, at 18:21, Kerry, Richard wrote:
>
> Hi
>
> > <snip />
> > I notice that at the moment the filename value appears in the FO
> > file in the form "url(images/drft.png)" when I set
> > draft.watermark.image to "images/draft.png" in my custom
> xsl file.
> > Thus I presume that the stylesheet is just copying over the
> > parameter value and putting it in "url()".
>
> Correct.
>
> > Can someone advise how to go about doing this. Do I need to tell
> > the XSL stylesheet to change the format of what it inserts in the
> > FO ? Or do I need to tell FOP that it's a URL/URI and to use the
> > resolver ?
>
> Nothing special to do with the stylesheet, URIResolvers or
> CatalogResolvers, IIC.
> FOP recognizes 'url(images/draft.png)' as a relative URI, but will
> resolve it using the current working directory as the
> base[*], unless
> you use a configuration file when running FOP.
> See also: http://xmlgraphics.apache.org/fop/0.95/configuration.html
>
> In short: if you use the configuration to set the 'base'
> option, that
> will be the base for all relative URIs encountered in the FO
> document.
> If you would set it to 'file:///C:/DocBook/docbook-xsl-1.74.0/' then
> you should get the same effect as specifying the absolute URI you
> started with.
>
> [*] Note: there is an open Bugzilla entry (
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46566
> ) concerning resolution of font URLs, where it is mentioned
> that it
> would probably be better in line with the related RFC to use
> the base
> URI of the document/config file. All well and easy if that actually
> exists as a file somewhere. As soon as the XML only exists as
> a stream
> or a LOB on a database, this will be next to impossible.
>
>
> HTH!
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



Privacy