summaryrefslogtreecommitdiff
path: root/xinclude.c
diff options
context:
space:
mode:
Diffstat (limited to 'xinclude.c')
-rw-r--r--xinclude.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xinclude.c b/xinclude.c
index ace005b..ff3dafb 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -17,6 +17,7 @@
#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>
@@ -1207,6 +1208,7 @@ xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
}
break;
}
+#ifdef LIBXML_XPTR_ENABLED
case XPATH_LOCATIONSET: {
xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
if (set == NULL)
@@ -1226,7 +1228,6 @@ xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
}
break;
}
-#ifdef LIBXML_XPTR_ENABLED
case XPATH_RANGE:
return(xmlXIncludeCopyRange(ctxt, target, source, obj));
#endif
@@ -1687,7 +1688,7 @@ loaded:
/*
* Do the xml:base fixup if needed
*/
- if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/')) &&
+ if ((doc != NULL) && (URL != NULL) &&
(!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) &&
(!(doc->parseFlags & XML_PARSE_NOBASEFIX))) {
xmlNodePtr node;