-/* $Id: yaz-proxy-config.cpp,v 1.4 2004-04-22 07:46:21 adam Exp $
+/* $Id: yaz-proxy-config.cpp,v 1.6 2004-08-29 13:01:43 adam Exp $
Copyright (c) 1998-2004, Index Data.
This file is part of the yaz-proxy.
int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name,
Odr_oid *syntax, Z_RecordComposition *comp,
char **addinfo,
- char **stylesheet, char **schema)
+ char **stylesheet, char **schema,
+ char **backend_type,
+ char **backend_charset)
{
if (stylesheet)
{
xfree (*schema);
*schema = 0;
}
+ if (backend_type)
+ {
+ xfree (*backend_type);
+ *backend_type = 0;
+ }
+ if (backend_charset)
+ {
+ xfree (*backend_charset);
+ *backend_charset = 0;
+ }
#if HAVE_XSLT
int syntax_has_matched = 0;
xmlNodePtr ptr;
const char *match_marcxml = 0;
const char *match_stylesheet = 0;
const char *match_identifier = 0;
+ const char *match_backend_type = 0;
+ const char *match_backend_charset = 0;
struct _xmlAttr *attr;
for (attr = ptr->properties; attr; attr = attr->next)
{
if (!strcmp((const char *) attr->name, "identifier") &&
attr->children && attr->children->type == XML_TEXT_NODE)
match_identifier = (const char *) attr->children->content;
+ if (!strcmp((const char *) attr->name, "backendtype") &&
+ attr->children && attr->children->type == XML_TEXT_NODE)
+ match_backend_type = (const char *)
+ attr->children->content;
+ if (!strcmp((const char *) attr->name, "backendcharset") &&
+ attr->children && attr->children->type == XML_TEXT_NODE)
+ match_backend_charset = (const char *)
+ attr->children->content;
}
if (match_type)
{
xfree(*schema);
*schema = xstrdup(match_identifier);
}
+ if (backend_type && match_backend_type)
+ {
+ xfree(*backend_type);
+ *backend_type = xstrdup(match_backend_type);
+ }
+ if (backend_charset && match_backend_charset)
+ {
+ xfree(*backend_charset);
+ *backend_charset = xstrdup(match_backend_charset);
+ }
if (match_marcxml)
{
return -1;