#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <libxml/xinclude.h>
#include <yaz/yaz-util.h>
#include <yaz/nmem.h>
struct conf_config *config_create(const char *fname, int verbose)
{
- xmlDoc *doc = xmlParseFile(fname);
+ xmlDoc *doc = xmlReadFile(fname,
+ NULL,
+ XML_PARSE_XINCLUDE + XML_PARSE_NOBLANKS
+ + XML_PARSE_NSCLEAN + XML_PARSE_NONET );
xmlNode *n;
const char *p;
int r;
return 0;
}
+ // Perform XInclude.
+ r = xmlXIncludeProcess(doc);
+ if (r == -1)
+ {
+ yaz_log(YLOG_FATAL, "XInclude processing failed");
+ return 0;
+ }
+
config->nmem = nmem;
config->servers = 0;
config->no_threads = 0;