mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
xmllint: Fix --xinclude --path
Use resource loader for XInclude. Regressed with f96dca9c.
This commit is contained in:
16
xmllint.c
16
xmllint.c
@@ -1792,13 +1792,27 @@ parseAndPrintFile(xmllintState *lint, const char *filename) {
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
if (lint->xinclude) {
|
||||
xmlXIncludeCtxt *xinc;
|
||||
int res;
|
||||
|
||||
if ((lint->timing) && (lint->repeat == 1)) {
|
||||
startTimer(lint);
|
||||
}
|
||||
if (xmlXIncludeProcessFlags(doc, lint->options) < 0) {
|
||||
|
||||
xinc = xmlXIncludeNewContext(doc);
|
||||
if (xinc == NULL) {
|
||||
lint->progresult = XMLLINT_ERR_MEM;
|
||||
goto done;
|
||||
}
|
||||
xmlXIncludeSetResourceLoader(xinc, xmllintResourceLoader, lint);
|
||||
xmlXIncludeSetFlags(xinc, lint->options);
|
||||
res = xmlXIncludeProcessNode(xinc, (xmlNode *) doc);
|
||||
xmlXIncludeFreeContext(xinc);
|
||||
if (res < 0) {
|
||||
lint->progresult = XMLLINT_ERR_UNCLASS;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((lint->timing) && (lint->repeat == 1)) {
|
||||
endTimer(lint, "Xinclude processing");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user