[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: (more) extensible SAX
At 4:37 AM +0100 12/5/00, Eric van der Vlist wrote: >Instead of: > >startElement(java.lang.String namespaceURI, > java.lang.String localName, > java.lang.String qName, > Attributes atts) > throws SAXException > >I would have far preferred to have: > >startElement(org.xml.sax.StartElement start) > throws SAXException > I have a real problem with this whole idea. I think it would make the API significantly less obvious and harder to learn. The current API is (mostly) very straight-forward. There are a strictly limited number of classes and interfaces you have to learn before doing real work, basically just ContentHandler and XMLReader. I'm opposed to cluttering the API with a lot of extra required classes like startElement. I am also not convinced by the cases you cite where you think the API will have to change in the future. For instance, I don't see why xml:base or xml:lang will require any method signatures to change. Both can be handled very straightforwardly now by those limited number of programs that need to handle them, simply by storing a stack of the current bases or languages encountered as startElement() and endElement() are called. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@m... | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible (IDG Books, 1999) | | http://metalab.unc.edu/xml/books/bible/ | | http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ | | Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ | +----------------------------------+---------------------------------+
|
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
|