----- Original Message -----
From: "Andy Clark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 1:19 AM
Subject: Re: [Xerces2] Pull Parsing


> Ted Leung wrote:
> > This would be fine by me, because it would solve my problem.  But here's
> > my concern.  Does it make sense to surface all of these kinds of details
up
> > through XNI?  Or does it make sense to solve this some other way, like
via
> > an object returned as a property
>
> You may be right in the sense that as long as the ability to do
> it is on the XMLParserConfiguration, then it doesn't need to
> cascade all the way out to the parser. Only the pull parser
> implementation would need to know how to do this.
>

As I said, I can live with this, but it does seem unclean, because the pull
parser API shouldn't be exposed in the Configuration.

>
> However... there are people that will want to do pull parsing
> of DOM and SAX so maybe it's better to make it completely
> visible even though most people will just use parse(String) or
> parse(InputSource) like they're used to doing.
>
> I don't know if returning a special property is the right way
> to solve this problem.

Well, let's talk about this how this would work -- You'd have
to return an object that that had say:

public interface PullParserAPI {
    public void setInputSource (InputSource);
    public boolean parseDocument(boolean);
}

That way you'd define parser configuration, which would have no
parser API methods.  The usage model then would be to create
a parser convenience class that implemented PullParserAPI, which
then used the pull configuration to get the object from the property and
hook it up as the implementation of the parser convenience class.

> --
> Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to