I'm not sure I like this whole thing, yet. Of course, your suggestion is
fine. But there's one thing that needs to be figured out: The
configuration is applied to the FopFactory. Having the configuration on
this level provides a multi-threading problem as multiple rendering runs
might simultaneously modify the configuration of the shared FopFactory.


On 26.02.2008 22:17:59 Andreas Delmelle wrote:
> 
> Hi all
> 
> Some time ago, Adrian posted an interesting suggestion on fop-users@  
> for an extension that would basically allow a configuration to be  
> bound to a single document: a fox:configuration node that could be  
> specified as a descendant of the fo:declarations.
> 
> Now, I just wondered about the following: instead of making it an  
> extension, maybe we could dedicate a special namespace to FOP's  
> configuration. The nodes that are now present in the sample fop.xconf  
> could then appear anywhere in the document. For some options the  
> appearances should probably best be restricted, but imagine something  
> like:
> 
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
>           xmlns:cfg="http://xmlgraphics.apache.org/fop/config";
> ...
> <fo:block>
>    <cfg:fop>
>      <cfg:strict-validation>false</cfg:strict-validation>
>      <cfg:base>file://absolute/path</cfg:base>
>    </cfg:fop>
>    ...
>    <fo:external-graphic src="relative/path/to/image.png" />
>    <fo:external-graphic src="relative/path/to/another/image.png" />
> </fo:block> <!-- end of scope for the cfg:* settings -->
> 
> An author would be able to override default configuration settings on  
> a per-FO basis, with an implied scope of the entire document if the  
> settings are specified as direct descendants of the fo:root.
> 
> 
> Just a thought...
> 
> 
> Cheers
> 
> Andreas




Jeremias Maerki

Reply via email to