| 1412 | xmlDocPtr doc); |
| 1413 | |
| 1414 | static xmlDoc * |
| 1415 | xmlRelaxReadFile(xmlRelaxNGParserCtxtPtr ctxt, const char *filename) { |
| 1416 | xmlParserCtxtPtr pctxt; |
| 1417 | xmlDocPtr doc; |
| 1418 | |
| 1419 | pctxt = xmlNewParserCtxt(); |
| 1420 | if (pctxt == NULL) { |
| 1421 | xmlRngPErrMemory(ctxt); |
| 1422 | return(NULL); |
| 1423 | } |
| 1424 | if (ctxt->serror != NULL) |
| 1425 | xmlCtxtSetErrorHandler(pctxt, ctxt->serror, ctxt->userData); |
| 1426 | doc = xmlCtxtReadFile(pctxt, filename, NULL, 0); |
| 1427 | xmlFreeParserCtxt(pctxt); |
| 1428 | |
| 1429 | return(doc); |
| 1430 | } |
| 1431 | |
| 1432 | static xmlDoc * |
| 1433 | xmlRelaxReadMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *buf, int size) { |
no test coverage detected