rolled back to 2.9.1 because 2.9.2 doesn't work with connecting net
[platform/upstream/libxml2.git] / xinclude.c
index ff3dafb..ace005b 100644 (file)
@@ -17,7 +17,6 @@
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 #include <libxml/uri.h>
-#include <libxml/xpath.h>
 #include <libxml/xpointer.h>
 #include <libxml/parserInternals.h>
 #include <libxml/xmlerror.h>
@@ -1208,7 +1207,6 @@ xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
            }
            break;
        }
-#ifdef LIBXML_XPTR_ENABLED
        case XPATH_LOCATIONSET: {
            xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
            if (set == NULL)
@@ -1228,6 +1226,7 @@ xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
            }
            break;
        }
+#ifdef LIBXML_XPTR_ENABLED
        case XPATH_RANGE:
            return(xmlXIncludeCopyRange(ctxt, target, source, obj));
 #endif
@@ -1688,7 +1687,7 @@ loaded:
     /*
      * Do the xml:base fixup if needed
      */
-    if ((doc != NULL) && (URL != NULL) &&
+    if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/')) &&
         (!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) &&
        (!(doc->parseFlags & XML_PARSE_NOBASEFIX))) {
        xmlNodePtr node;