1
0
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:
Nick Wellnhofer
2025-06-20 22:22:03 +02:00
parent 2963a0f13a
commit 9c6eebac17

View File

@@ -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");
}