Eric,

I have not have the chance to do that yet, and I want to look at it in the context of actual FOP parsing, becuase I expect that there will be a significant hit. The cost of this will have to be viewed in the context of the intensive down-stream processing of FOP, so I am hoping the relative penalties will not be excessive.

The benefit is the revolutionary impact on system design from enabling top-down pull processing.

Andy has contacted me and referred me to nekopull, which I am having a look at. Andy's design has many similarities to what I have done, except that is is much more general and XML feature complete. For FOP I implement a synchronized circular buffer to restrict buffer costs, and to prevent the parser from running away from the downstream processing.

At the moment my basic interface to SAX is a get() which returns an XMLEvent which amalgamates the SAX information in which I am interested - event type, attributes, uri, localName, qName, characters. I am interested to see if I can implement an on-demand getEvent() call which returns something comparable. On top of that method, and in association with a single-entry pushback buffer, I can build get and expect methods of increasing complexity. Get finds the next event matching the event parameters, discarding intervening events, and expect returns the next event if it matches the requested event or one of the set of requested events. Expect has a whitespace-handling parameter.

The question is, do the facilities exist for me to be able to do this with XNI, or is more work required at a low level before I can configure such a parser?

Peter

[EMAIL PROTECTED] wrote:
Interesting approach! I'm curious what the impact on performance is.  Have
you done any performnce tests comparing a SAX->buffer->PULL parse to a
straight SAX parse?


|---------+---------------------------->
|         |           "Peter B. West"  |
|         |           <[EMAIL PROTECTED]|
|         |           om.au>           |

I am a committer with FOP, and I recently posted a description of work I
had done on the front end of FOP Alt-Design.  This involved buffering
SAX events, and providing a series of get/expect methods to access them,
effectively reversing the direction of control of parser event
processing.  That is, I had used buffering to implement a pull parser.

--
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


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

Reply via email to