Lists Home |
Date Index |
- From: "Bill la Forge" <email@example.com>
- To: <firstname.lastname@example.org>, "XML Developers' List" <email@example.com>
- Date: Wed, 20 Jan 1999 21:49:55 -0500
Lexical Event Handler
I think it would be particularly handy if LexicalProcessor extended DocumentHandler.
Given a document handler object, the parser could simply check to see if it was also
an instance of LexicalProcessor and, if it was, pass it the additional events.
My reasoning here is that many of the events associated with LexicalProcessor would
likely need to pass through the same filters as the DocumentHandler events.
Mmm. Perhaps this could better be handled by splitting off the start/endDTD events and
placing them on an extension of DTDHandler.
Basically, I agree here with Don Park.
Why not support Namespaces through a filter? Why put everything into a monilithic parser?
If we have good support for filters, then we can have a reasonable scope for parsers and
allow applications to configure their filters to meet their particular needs.
We are looking at building trees of event filters in MDSAX, with event processing
dependent on document type, element type, and other application-specific considerations. An
api which constrains filters to a simple sequence doesn't really get us where we want to go.
Our hope is to support a variety of filter implementations, with the glue code hidden in
the filter factory which supports this interface:
public interface MDFilterFactory
* Creates a chained document handler (a filter).
createFilter(MDContext context, DocumentHandler nextHandler);
The third alternative, where filters extend DocumentHandler, would certainly be the easiest
And if LexicalProcessor extends DocumentHandler, then Filter should extend
LexicalProcessor. This would really be ideal!
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)