|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Announcement: SAX2 1999-06-01 alpha release for Java
David Megginson wrote: > 1. Do we need a filter *interface* at all, or can a filter just be a > class that happens to implement Parser, Configurable, > EntityResolver, DTDHandler, DocumentHandler, and ErrorHandler? Actually, a parser filter only *has* to implement Parser. Whether it implements the other things, or delegates their implementation to private objects, is a detail. > (In > other words, is it enough to set the parent parser/filter in the > constructor?) IMHO yes. One could use reflection to determine whether there is such a constructor, at least in the Java domain. > 2. Actually, just last night I wrote an > org.xml.sax.helpers.FilterAdapter base class that filters can > easily be derived from (though they wouldn't have to be); by > default, it just lets all events sink down to the application, > and all configuration bubble up to the parser, but subclasses can > simply override methods to make changes in either direction. I suggest you look at my P.D. code at http://www.ccil.org/~cowan/XML/ParserFilter.java; it would be easy to enhance it for SAX2, and it handles some subtle points. -- John Cowan http://www.ccil.org/~cowan cowan@c... You tollerday donsk? N. You tolkatiff scowegian? Nn. You spigotty anglease? Nnn. You phonio saxo? Nnnn. Clear all so! 'Tis a Jute.... (Finnegans Wake 16.5) xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








