cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject RE: SAT API Proposal (Draft 3) - NodeInputSource
Date Thu, 10 Feb 2000 19:16:03 GMT

Kay Michael <Michael.Kay@icl.com> wrote:
> I think we've got the class hierarchy wrong here. NodeInputSource isn't a
> subclass of InputSource in any meaningful sense

I can see this.

> I think we need something like InputProvider. An InputProvider is a
source
> of SAX events. An InputProvider can encapsulate either (a) an InputSource
> and associated XMLReader, or (b) a Node, or even perhaps (c) a
> Transformation (or Result??).

Or maybe we could do without an InputProvider object altogether?

  public void process( InputSource xmlSource, Node node);
  public void process( InputSource xmlSource, OutputStream byteStream);  //
convenience
  public void process( Node node, String baseURI);
  public void process( Node node, String baseURI, Node node);
  public void process( Node node, String baseURI, OutputStream byteStream);
// convenience

It makes multiple process methods, which isn't great, but it simplifies
things in another direction.  asContentHandler() deals with a
ContentHandler input.

We could also better match the "parse" method in XMLReader in InputSource
if InputSource is really defined as something that points to a sequence of
characters.

  public void parse( InputSource xmlSource, Node node);
  public void parse( InputSource xmlSource, OutputStream byteStream);  //
convenience
  public void process( Node node, String baseURI);
  public void process( Node node, String baseURI, Node node);
  public void process( Node node, String baseURI, OutputStream byteStream);
// convenience

Thoughts?

-scott






Mime
View raw message