diff --git a/result/XInclude/fallback6.xml b/result/XInclude/fallback6.xml
index 2b5d4116..b6e11d73 100644
--- a/result/XInclude/fallback6.xml
+++ b/result/XInclude/fallback6.xml
@@ -1 +1,4 @@
+
+
+
diff --git a/result/XInclude/fallback6.xml.rdr b/result/XInclude/fallback6.xml.rdr
new file mode 100644
index 00000000..375f1672
--- /dev/null
+++ b/result/XInclude/fallback6.xml.rdr
@@ -0,0 +1,6 @@
+0 1 doc 0 0
+1 14 #text 0 1
+
+1 14 #text 0 1
+
+0 15 doc 0 0
diff --git a/test/XInclude/docs/fallback6.xml b/test/XInclude/docs/fallback6.xml
index fd00a03f..cb12ff96 100644
--- a/test/XInclude/docs/fallback6.xml
+++ b/test/XInclude/docs/fallback6.xml
@@ -1,6 +1,8 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/xinclude.c b/xinclude.c
index 05411ddb..1df9b4cb 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -1701,10 +1701,15 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, xmlXIncludeRefPtr ref) {
nb_elem++;
tmp = tmp->next;
}
- if (nb_elem > 1) {
- xmlXIncludeErr(ctxt, ref->elem, XML_XINCLUDE_MULTIPLE_ROOT,
- "XInclude error: would result in multiple root nodes\n",
- NULL);
+ if (nb_elem != 1) {
+ if (nb_elem > 1)
+ xmlXIncludeErr(ctxt, ref->elem, XML_XINCLUDE_MULTIPLE_ROOT,
+ "XInclude error: would result in multiple root "
+ "nodes\n", NULL);
+ else
+ xmlXIncludeErr(ctxt, ref->elem, XML_XINCLUDE_MULTIPLE_ROOT,
+ "XInclude error: would result in no root "
+ "node\n", NULL);
xmlFreeNodeList(list);
return(-1);
}