Andreas L Delmelle wrote:

<snip/>


Those components/resources that apply to all types of renderers, can be handled in AbstractRenderer. AbstractRenderer could provide a generic createResource() method, which can be overridden or re-implemented in the specific renderer types to handle the renderer-specific stuff.

Coming to the Intermediate Format: that document should, as you mentioned earlier IIRC, ideally be renderer-agnostic. So, if all is set up well, the resources can be embedded/referenced in the intermediate document as abstract <resource> nodes, with a reference (attribute?) to the applicable renderers. Some resources may have to be inserted multiple times for different renderers? So be it. The IFHandler should probably be made intelligent enough to ignore/ disregard any nodes that do not apply to the current output format, so they get excluded real early in the game. When the document is ultimately rendered, the eventual renderer type will determine what needs to happen with the embedded resource.

The downside to including a resource node for each possible renderer is the space occupied by the Intermediate Format. The major problem with the current IF XML is how verbose it is. This verbosity is what makes the performance of FO->IF->PDF so slow. This is the main driver for re-working the current implementation.

Chris


Reply via email to