From: Timm B. <bau...@zi...> - 2006-02-17 05:13:07
|
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 |