OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   SAX2: marrying SAX and DOM

[ Lists Home | Date Index | Thread Index ]
  • From: Ken MacLeod <ken@bitsko.slc.ut.us>
  • To: xml-dev@xml.org
  • Date: 08 Mar 2000 11:26:43 -0600

The Perl SAX binding has used what I believe to be a very powerful
technique that I'd like to propose for SAX 2.0:

    Event handlers should be passed a DOM node instead of positional

The benefits to this technique are:

  * SAX parsers, event generators, and filters can more easily provide
    additional properties through the DOM nodes to handlers (if the
    underlying DOM implementation permits).

  * The DOM SAX event generators (a primary application of SAX) can
    pass the DOM nodes directly, instead of using the
    "http://xml.org/sax/properties/dom-node" feature.

  * A parser can [should?] maintain a partial DOM tree, at least
    parents, that would allow other XML functions to be used.  For
    example, using XPath to perform matching.

The primary drawback to this technique is the overhead of creating the
DOM nodes vs. just passing arguments.

A draft of the SAX 2.0 Beta binding for Perl that includes this
technique is available at:


  -- Ken

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS