> On 05 Jun 2015, at 23:07, robyp7 . <[email protected]> wrote:
>
> Hi to all,
>
> Can your Fop use Stax(pull) to "handle" events instead SAX (push)?
Short answer: Yes and no. :)
Expanded:
Yes, it would be possible, if <something> were to happen.
No, it is not possible, unless <something> were to happen.
That <something> is the same in both cases: a rather invasive refactoring of
the basics of FOP's processing model, which is at this point largely SAX driven.
That said, an interesting question.
Architecturally, what FOP currently does (for most output formats) could be
construed as push-pull-push, IIUC. The semantic FO events are "pushed" by the
SAX handler, and keep building up until there is an
endElement('page-sequence'... event. At that point, a proprietary DOM structure
has built up in memory.
From there on, you could say that the content of the page-sequence tree is
"pulled" up (recursive iteration), which leads to the LayoutManager tree being
constructed, which in turn produces a tree of areas that can be "pushed" as XML
events to any consumer / renderer.
It is conceivable to switch to StAX for the first step, and "pull" the events
from the input FO directly, or offer an interface for a consumer to pull the
area events in, but neither are tasks I would take too lightly.
KR
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]