[EMAIL PROTECTED] wrote: > > >I need to plug in the > >validator at random places in my process chain, ideally without > >re-parsing. > > > > As long as you are willing to be parser specific you can do this.
We are having a terminology gap here. I am not talking about your parser at all. I am talking about your validator. I want to plug your validator on top of some other SAX-compliant parser or SAX-smart XML event generator (e.g. Xalan). Of course the API to your validator is going to be specific to your validator (until there are validator API specifications) but I want the API between the XML event generator and the parser to be SAX. So I see no need to be parser specific. Internally, of course, you can ignore the SAX API for your more optimized version. > There are > no public APIs to do any of that type of stuff generically. If you are > passing a DOM down the chain, then you'd have to just get the parent > element name and child element names, and pass them tot he validator to be > checked. I'm not interested in a DOM. Xalan and the other parsers I am interested in tend to generate SAX events. Anyhow, DOM can be expressed as SAX events quite easily. I do understand that there is another interesting, but different, question about validating a single node in its DOM context and I'm happy to hear that support for that would not be to brutal. -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself Earth will soon support only survivor species -- dandelions, roaches, lizards, thistles, crows, rats. Not to mention 10 billion humans. - Planet of the Weeds, Harper's Magazine, October 1998