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

Re: (more) extensible SAX

  • From: Eric van der Vlist <vdv@d...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Wed, 06 Dec 2000 02:30:00 +0100

xml lang java
Elliotte Rusty Harold wrote:
> 
> 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 use to think that simplicity is a very subjective concept ;=) ... and
I am not convinced that adding redundant parameters in method calls
makes an API easier to learn.

> 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.

I am not convinced either that xml:base or xml:lang are concerning a
limited number of applications. Anyway, that wasn't the main point in my
email and I can try to give other examples.

New specifications like W3C XML Schema or XInclude are introducing
transformations in the infoset that may be implemented as SAX filters.

However, with the current SAX 2 API, there isn't much room to keep
information about the original infoset and this information may be
useful for some applications.

In the same area, such an extension mechanism could be useful to give
information about the schema (W3C or any other) related to the current
element or attribute like DOM Level 3 seems to be heading to.

Eric
> --
> 
> +-----------------------+------------------------+-------------------+
> | 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/     |
> +----------------------------------+---------------------------------+

-- 
See you at XML 2000
      http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------

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.