HTML parsing support for xslt module

Laurence Rowe l at
Wed Mar 21 13:55:09 UTC 2012

Snipping for brevity:

On 21 March 2012 12:55, Maxim Dounin <mdounin at> wrote:
>> > 2) The are no error handling for html code, and while it's
>> > probably ok to ignore parsing problems - it's certainly not ok to
>> > ignore fatal problems like memory allocation ones.
>> I'll add back the fatal error handler and add an off switch to it.
> Not really understand.  Why do you think it should be possible to
> switch off handling of memory allocation errors?

I wasn't clear here. Currently errors are detected with the return
value from xmlParseChunk. With htmlParseChunk we cannot use the return
value as we want to ignore any recoverable parsing errors, so we need
another way to detect when a fatal error has occurred. I'll add a flag
(or 'off switch') to ngx_http_xslt_filter_ctx_t, set it in
ngx_http_xslt_sax_error when an error and test that instead.


More information about the nginx-devel mailing list