diff --git a/xinclude.c b/xinclude.c index 253484c7..72a88c99 100644 --- a/xinclude.c +++ b/xinclude.c @@ -628,7 +628,10 @@ xmlXIncludeBaseFixup(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur, xmlNodePtr copy, goto done; } - if (relBase[0] != 0) { + /* + * If the new base doesn't contain a slash, it can be omitted. + */ + if (xmlStrchr(relBase, '/') != NULL) { res = xmlNodeSetBase(copy, relBase); if (res < 0) xmlXIncludeErrMemory(ctxt);