+Implement XInclude for configuration file(s).
+
Fixed bug #189: Bad authenticated session transfer.
New config element "authentication" which specifies authentication
-# $Id: Makefile.am,v 1.3 2004-04-23 16:10:24 adam Exp $
+# $Id: Makefile.am,v 1.4 2004-11-09 14:24:22 adam Exp $
proxydatadir=$(datadir)/yazproxy
proxydata_DATA = \
MARC21slim2RDFDC.xsl \
MARC21slimUtils.xsl \
config.xml \
+ explain.xml \
voyager.xml \
pqf.properties \
yazproxy.xsd \
<?xml version="1.0"?>
-<!-- $Id: config.xml,v 1.6 2004-10-23 23:12:23 adam Exp $ -->
+<!-- $Id: config.xml,v 1.7 2004-11-09 14:24:22 adam Exp $ -->
<proxy xmlns="http://indexdata.dk/yazproxy/schema/0.8/"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://indexdata.dk/yazproxy/schema/0.8/ yazproxy.xsd"
>
<syntax type="xml" marcxml="1"/>
<syntax type="*" error="238"/>
<preinit>0</preinit>
- <explain xmlns="http://explain.z3950.org/dtd/2.0/">
- <serverInfo>
- <host>localhost</host>
- <port>9000</port>
- <database>gils</database>
- </serverInfo>
- </explain>
+ <xi:include href="explain.xml"/>
<cql2rpn>pqf.properties</cql2rpn>
<authentication>adam/x</authentication>
</target>
--- /dev/null
+<explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo>
+ <host>localhost</host>
+ <port>9000</port>
+ <database>gils</database>
+ </serverInfo>
+ <databaseInfo>
+ <title>My Database</title>
+ <description>My database description</description>
+ </databaseInfo>
+</explain>
-/* $Id: yaz-proxy-config.cpp,v 1.8 2004-10-23 23:12:24 adam Exp $
+/* $Id: yaz-proxy-config.cpp,v 1.9 2004-11-09 14:24:22 adam Exp $
Copyright (c) 1998-2004, Index Data.
This file is part of the yaz-proxy.
#if HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <libxml/xinclude.h>
#include <libxslt/xsltutils.h>
#include <libxslt/transform.h>
#endif
yaz_log(LOG_WARN, "Config file %s not found or parse error", fname);
return -1; // no good
}
+ int noSubstitutions = xmlXIncludeProcess(ndoc);
+ if (noSubstitutions == -1)
+ yaz_log(LOG_WARN, "XInclude processing failed on config %s", fname);
+
xmlNodePtr proxyPtr = xmlDocGetRootElement(ndoc);
if (!proxyPtr || proxyPtr->type != XML_ELEMENT_NODE ||
strcmp((const char *) proxyPtr->name, "proxy"))