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

Re: SAX: Next Round

  • From: "Simon St.Laurent" <simonstl@s...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Thu, 21 Jan 1999 07:48:46 -0500

Re: SAX: Next Round
At 04:22 PM 1/20/99 -0500, david@m... wrote:
>I've been thinking about what new SAX interfaces we need the most
>(with much prodding from users).  

I'm very pleased to see this project getting going again.

>Here's what I think we need as a
>minimum:
>
>1. A standard filter interface (and perhaps an optional base class).
>2. A handler interface for lexical events like comments, CDATA
>   sections, and entity references.
>3. Some kind of namespace support.
>
>I'd like to lose EntityResolver and DTDHandler (who uses them?), but I
>don't know if we can.

I'd really prefer to go the other direction. In the course of writing and
working with filters, I've come to see them as a very powerful tool that is
hampered to a significant degree by the total lack of DTD information that
comes out of the parser.  Even if it's optional, I would _very_ much like
to see a set of events for DTD declarations - <!ELEMENT, <!ATTRIBUTE, etc.
If necessary, I'd be willing to do a lot of work in this area - after I
finish the current crushing load of books.

See http://www.simonstl.com/articles/layering/layered.htm for some of the
reasons I'd like access to this information.  Please keep in mind that it's
a very rough draft.

>
>1. Filter Interface
>-------------------

I think you may be doing too much to the filters themselves here; I'd
really prefer to see this coordination performed by an external framework,
like MDSAX (http://www.jxml.com/mdsax/).

>2. Lexical Event Handler
>------------------------
>
>What do we really need here?
>
>  public interface LexicalHandler
>  {
>    public void startDTD (String name, String pubid, String sysid)
>      throws SAXException;
>    public void endDTD (String name);
>    public void startExternalEntity (String name, String pubid, String sysid)
>      throws SAXException;
>    public void endExternalEntity (String name) throws SAXException;
>    public void startCDATA () throws SAXException;
>    public void endCDATA () throws SAXException;
>    public void comment (String data) throws SAXException;
>  }
>
>I haven't checked, but I think that this gives us everything we need
>for DOM level one.  

I'd like to have startInternalEntity as well; coupled with the DTD
declarations I mentioned above, it would let applications that found they
actually needed an external resource for processing get it, even in a
non-validating environment that didn't do that by default.

Also, going back to the DTD events, it would be useful to know which
attributes had assigned values and which were defaulted; I believe this is
also a DOM Level One issue.

>3. Namespace Support
>--------------------

This seems like something better done by a filter layer, provided we can
describe what the results of that processing should be.  It may take
extension of the API, or it may just take modification of element names, as
in John Cowan's NamespaceFilter (http://www.ccil.org/~cowan/XML/).

Glad this is going again; SAX 1.0 did a great job for what it did, but I'd
like to see it present a more complete picture of documents.  

Simon St.Laurent
XML: A Primer / Building XML Applications (March)
Sharing Bandwidth / Cookies
http://www.simonstl.com

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/
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!

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.