Aleksander Slominski wrote:
> could somebody point me out where in documentation or source code to look for
> how to implement pull parser configuration. i would like to play with it to see
> how incremental parsing is happening (and how it fits into pipeline) - for
> example how next event is obtained? or what needs to be written?

There's no documentation. However, if you look at the scanner
interfaces that are part of the xni.parser package, then you'll
notice that they each have setInputSource and scanXXX methods
that allow you to parse the document pieces at a time. The
granularity of the information is based on the methods in the
XNI handler interfaces. 

It would be the responsibility of the pull parser implementation 
to receive this information and communicate it in whatever 
fashion it wants. But the breakdown of the data is ultimately 
mandated by what information is available in XNI.

The Xerces2 reference implementation has document and DTD
scanners that are capable of doing pull parsing. However, there
is currently no direct API to call this through the parsers or
parser configurations. (That's the discussion we're having
right now with Ted.) So for now you'd have to write a custom
configuration (you can copy the StandardParserConfiguration)
and add methods to allow pull-parsing.

But I just thought of something... Let me check... Okay, the
document scanner passes the "complete" parameter to the DTD
scanner. However, this is a problem because the code will not
correctly handle pull parsing the DTD (internal or external
subset) in the case where complete is false. So that code 
will have to be fixed. Looking for something to do? ;)

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

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

Reply via email to