[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: (more) extensible SAX

  • From: Elliotte Rusty Harold <elharo@m...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Tue, 05 Dec 2000 12:22:16 -0500

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.