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

Reply via email to