Xslt: parser options now set with xmlCtxtUseOptions().
Note that "ctxt->loadsubset = 1" previously used isn't really correct as
ctxt->loadsubset is a bitfield now. The use of xmlCtxtUseOptions() with
XML_PARSE_DTDLOAD is believed to be a better way to do the same thing.
Patch by Laurence Rowe.
Maxim Dounin
10 years ago
361 | 361 | "xmlCreatePushParserCtxt() failed"); |
362 | 362 | return NGX_ERROR; |
363 | 363 | } |
364 | xmlCtxtUseOptions(ctxt, XML_PARSE_NOENT|XML_PARSE_DTDLOAD | |
365 | |XML_PARSE_NOWARNING); | |
364 | 366 | |
365 | 367 | ctxt->sax->externalSubset = ngx_http_xslt_sax_external_subset; |
366 | 368 | ctxt->sax->setDocumentLocator = NULL; |
367 | ctxt->sax->warning = NULL; | |
368 | 369 | ctxt->sax->error = ngx_http_xslt_sax_error; |
369 | 370 | ctxt->sax->fatalError = ngx_http_xslt_sax_error; |
370 | 371 | ctxt->sax->_private = ctx; |
371 | ctxt->replaceEntities = 1; | |
372 | ctxt->loadsubset = 1; | |
373 | 372 | |
374 | 373 | ctx->ctxt = ctxt; |
375 | 374 | ctx->request = r; |