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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: helper classes for SAX

[ Lists Home | Date Index | Thread Index ]
  • From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
  • To: "Don Park" <donpark@quake.net>, "Peter Murray-Rust" <peter@ursus.demon.co.uk>, "xml-dev Mailing List" <xml-dev@ic.ac.uk>
  • Date: Wed, 25 Feb 1998 11:37:25 -0000

>"Should we add helper classes to SAX?"
>
I have written a package on top of SAX which I hope to publish soon - I need
to get it past some corporate processes


I wrote it because I found I was doing the same thing repeatedly in a number
of SAX applications. I call the package SAXON (sorry), and it provides the
following services:

- allows you to register a handler for a particular element type (or a
particular element type in the context of a parent element type). The
handler can supply methods to process the element start or end, the
character data or ignorable white space in the element, or the start or end
of a consecutive group of one or more elements (cf. XSL)
- provides you with context information about the element; in particular,
its parent and ancestors, their attributes, and also their elder sibling
elements.
- allows you to associate user data with an element, so for example your
start-element method can pass data to the corresponding end-element method
- allows you to associate an output "bucket" with an element type, so that
all output for that element and its children (unless otherwise specified)
goes into that bucket. Useful for splitting documents and for limited
re-ordering of elements
- allows multiple handlers per element type
- includes some standard element handlers for doing HTML rendition, for
generating automatic numbering, etc

Although I'm not in a position to go public with it yet, I'll be happy to
share the current state of development with any individual who wants to
collaborate.

I do realise of course that some of these facilities can be achieved by
using the DOM instead of an event-based parser, and there is a world of
stuff in JUMBO that I haven't expored yet. I was trying to add value to SAX
without going heavyweight, which of course is a delicate line to tread.

Regards, Mike Kay
ICL




xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

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