[libxml2] Add TODO comment in xinclude.c
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Add TODO comment in xinclude.c
- Date: Mon, 17 Aug 2020 13:42:44 +0000 (UTC)
commit d63cfeca3577dfa2e658b33c56889dbab7de8ff5
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Aug 17 15:40:06 2020 +0200
Add TODO comment in xinclude.c
Add some thoughts on the major remaining problems with the XInclude
implementation.
xinclude.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/xinclude.c b/xinclude.c
index 36bdfaed3..3c810ca14 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -2381,6 +2381,23 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree,
}
start = ctxt->incNr;
+ /*
+ * TODO: The phases must run separately for recursive inclusions.
+ *
+ * - Phase 1 should start with top-level XInclude nodes, load documents,
+ * execute XPointer expressions, then process only the result nodes
+ * (not whole document, see bug #324081) and only for phase 1
+ * recursively. We will need a backreference from xmlNodes to
+ * xmlIncludeRefs to detect references that were already visited.
+ * This can also be used for proper cycle detection, see bug #344240.
+ *
+ * - Phase 2 should visit all top-level XInclude nodes and expand
+ * possible subreferences in the replacement recursively.
+ *
+ * - Phase 3 should finally replace the top-level XInclude nodes.
+ * It could also be run together with phase 2.
+ */
+
/*
* First phase: lookup the elements in the document
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]