Re: RFC: Simple XML Event-Based API for Java

Tim Bray (tbray@textuality.com)
Wed, 17 Dec 1997 10:33:08 -0800


At 09:38 PM 16/12/97 -0500, David Megginson wrote:
>After careful thought, I am fairly certain that I would be willing to
>accept the following simple event-driven API for =C6lfred. =20

I'd be willing to commit to signing up to do this for Lark, given
the following changes:

> public void=20
> startDocument (XmlProcessor processor, String pubid, URL sysid);

Question: what if there's no <!DOCTYPE? And if there is, you might as
well throw in the root doctype.

> public void
> startProlog (XmlProcessor processor);
> public void=20
> endProlog (XmlProcessor processor);

Lose these; they have no place in this API. You want this kind of stuff,
use Lark or AElfred or whatever.

> public void=20
> processingInstruction (XmlProcessor processor, String target, String=
data);

Lose this.

> public void=20
> error (XmlProcessor processor, String message, URL url, int line);
>}

Have to add the entity ID as an argument. No point giving the line=20
number if you don't know what it's in.

>The processor itself could implement the following interface (very
>Thread-oriented and Bean-like):

And one last thing: if you use URL, then you have to do a new URL()
which does (I think) at least some syntax checking... is this appropriate?
Why not just pass it as a string? -Tim