Hi Timm,
I have run into this too, and looked at finding a solution a while ago.
I will check what I did and let you know.
Will
On Fri, 2006-02-17 at 00:11 +0100, Timm Baumeister wrote:
> Hello,
>
> the buffering of PCDATA is currently implemented with a fixed size char
> array with the effect that for large PCDATA blocks the parser ends up in
> an assertion.
>
> Would it be possible to have a call to a user defined function which
> reports a chunk of PCDATA whenever a buffer overflow is going to occur
> to free up the space?
>
> I was thinking of something like:
>
> #define BUFFERSET(P) (P = next)
> #define BUFFERPUTC(C) (mycheck(next<limit), *(next++) = (C))
> #define BUFFERDONE (BUFFERPUTC('\0'))
>
> bool mycheck(bool b) {
> if (!b)
> {
> char c = *next;*next='\0';
> PCDATA_CALLBACK(bufferstack);
> next=bufferstack;
> *(next++) = c
> }
> return true;
> }
>
> and am wondering whether a reset of the buffer in the mid of a PCDATA
> block might have any unforseen sideeffects concerning the parser.
>
> Thanks in advance for clarification
>
> Timm
--
William F Dowling
wil...@th...
www.scientific.thomson.com
|