Re: multiple handlers

Don Park (donpark@quake.net)
Tue, 24 Feb 1998 15:45:33 -0800


>As it's trivial, it would be a great help if a specimen were included in
>SAX that those of us who are per-element people could use. Seriously, I'm
>not quite sure what it would look like but I am sure I would recognise it
>when I saw it :-)

This brings up the issue I wanted to bring up for a while:

"Should we add helper classes to SAX?"

HandlerBase sort of qualifies as a helper class but I think SAX should have
a lot more helper classes to help out SAX programmers. For example, a
'pass-through' DocumentHandler that filters out whitespace would be a great
help. An abstract implementation of DocumentHandler that takes maintains a
stack of ancestor elements would also be nice. A special trigger like
DocumentHandler that will return specified patterns (i.e. XSL rule like
pattern).

I think we have four choices at this point:

1. Leave SAX alone!
2. Add some but as little as possible.
3. Go nuts and let SAX bloat as the months go by.
4. Start EZ-SAX (sorry, I couln't help it. David picked a name ready-made
for puns) package to complement SAX.

Personally, I am all for EZ-SAX ;-p.

Regards,

Don Park
http://www.quake.net/~donpark/index.html