[
Lists Home |
Date Index |
Thread Index
]
- From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Tue, 05 Dec 2000 12:22:16 -0500
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@metalab.unc.edu | 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/ |
+----------------------------------+---------------------------------+
|