[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-dev
Subject:    RE: AW: RTF: white-space-treatment and linefeed-treatment
From:       "Peter Herweg" <pherweg () web ! de>
Date:       2004-01-27 21:03:41
Message-ID: IDEEIELCLDJNABPHHLBDOECLCCAA.pherweg () web ! de
[Download RAW message or body]

> I think you can flush the queue each time a nested block
> starts and each time a block ends.

I have no queue to flush. All i do is ignoring all event handler functions
until endBlock is called for a not-nested Block. Then i iterate recursively
through its children an call all appropriate event handlers.

For this purpose i have implemented a reference counter. Eachtime startBlock
is entered the counter is incremented. Eachtime endBlock is entered the
counter is decremented. So when the reference counter reachs 0, a not-nested
block is finished and i can process all deferred FOs. Works quite good.

Kind regards
Peter Herweg

> -----Original Message-----
> From: fop-dev-return-23052-pherweg=web.de@xml.apache.org
> [mailto:fop-dev-return-23052-pherweg=web.de@xml.apache.org]On Behalf Of
> J.Pietschmann
> Sent: Tuesday, January 27, 2004 9:16 PM
> To: fop-dev@xml.apache.org
> Subject: Re: AW: RTF: white-space-treatment and linefeed-treatment
>
>
> Peter Herweg wrote:
> > Maybe difficulties is the wrong word. Just a thing i have to
> care for. If i
> > do the processing of FOs in endBlock, i have to suppress the processing
> > within nested blocks. Or the nested blocks will be processed twice.
>
> I think you can flush the queue each time a nested block
> starts and each time a block ends. The start of a new block
> forces a new line, so you can finish the current line,
> including whitespace processing.
>
> J.Pietschmann

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic