You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Eric SCHAEFFER <es...@posterconseil.com> on 2000/08/09 10:28:42 UTC
Avalon (Was: Important changes in FOP)
I think I've understand something:
If you use components by role, you just give the class name in parameter,
and the component manager will create a new instance at each request.
If you use components by name, the component manager will return a single
instance (that will be shared).
Am I right ?
And I've got another question:
If you want to give parameters to a component, you write, in the config
file, something like
<parameter name="..." value="..."/>
But if you want to give it a list of classes, without "names", what is the
"good" way of doing it ?
Ex.:
ImageReaders are classes that read image headers, check if it is an
image type it can handle, and read the width and height.
<component role="image-reader-factory"
class="org.apache.fop.image.analyser.ImageReaderFactory">
<image-reader class="org.apache.fop.image.analyser.GIFReader"/>
<image-reader class="org.apache.fop.image.analyser.JPEGReader"/>
<image-reader class="org.apache.fop.image.analyser.PNGReader"/>
<image-reader class="org.apache.fop.image.analyser.BMPReader"/>
</component>
This factory needs parameters, but it's just a list of classes, and not
named parameters.
Eric.