On Monday 08 April 2002 09:23, Christian Mallwitz wrote:
> What should my app let the user specify: ContentHandler or
> TransformerHandler classes? Should I force my users to implement more then
> is necessary for content handling (i.e. LexicalHandler and DTDHandler form
> TransformerHandler) when providing a custom ContentHandler? Maybe
> TransformerHandler is the better idea anyway? My priority is output content
> handling only and not chaining of transformations. Or do I miss something
> else completely?
I'd let them specify both, but provide some extra UI for the special cases.
Here's what I'm thinking:
* Have an option to choose between TransformerHandler and ContentHandler
interface, or better yet load the specified class at runtime and
enable other options.
* If a TransformerHandler is selected, enable/require an option to select the
file as the destination for your StreamResult.
* Provide hooks so that if a ContentHandler is selected, somehow it can load
its own interface for configuring it. As you figured out, ContentHandlers
are responsible for doing all the saving-to-file on their own, so should be
able to have their own config.
--
Peter Davis
Matz's Law:
A conclusion is the place where you got tired of thinking.