Skip to content

Commit 05976da

Browse files
committed
xinclude: Load included documents with XML_PARSE_DTDLOAD
We must detect ID attributes declared in external DTDs. Regressed in 12f0bb9.
1 parent b61a960 commit 05976da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xinclude.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
334334
xmlDictReference(pctxt->dict);
335335
}
336336

337-
xmlCtxtUseOptions(pctxt, ctxt->parseFlags);
337+
/*
338+
* We set DTDLOAD to make sure that ID attributes declared in
339+
* external DTDs are detected.
340+
*/
341+
xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
338342

339343
inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
340344
if (inputStream == NULL)

0 commit comments

Comments
 (0)