| 1430 | } |
| 1431 | |
| 1432 | static xmlDoc * |
| 1433 | xmlRelaxReadMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *buf, int size) { |
| 1434 | xmlParserCtxtPtr pctxt; |
| 1435 | xmlDocPtr doc; |
| 1436 | |
| 1437 | pctxt = xmlNewParserCtxt(); |
| 1438 | if (pctxt == NULL) { |
| 1439 | xmlRngPErrMemory(ctxt); |
| 1440 | return(NULL); |
| 1441 | } |
| 1442 | if (ctxt->serror != NULL) |
| 1443 | xmlCtxtSetErrorHandler(pctxt, ctxt->serror, ctxt->userData); |
| 1444 | doc = xmlCtxtReadMemory(pctxt, buf, size, NULL, NULL, 0); |
| 1445 | xmlFreeParserCtxt(pctxt); |
| 1446 | |
| 1447 | return(doc); |
| 1448 | } |
| 1449 | |
| 1450 | /** |
| 1451 | * xmlRelaxNGIncludePush: |
no test coverage detected