X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-proxy-config.cpp;h=2102e9afbaa2628029f6c8e1e79854ae74efb816;hp=dc5c8832c460def75ac0108e31d449ab50ec3a03;hb=cc9b18cf01e91da8c8902923916946d8668f7cbd;hpb=e456a212f9d27db9cc005ffa7f9783ccca3232c2 diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index dc5c883..2102e9a 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -1,4 +1,4 @@ -/* $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. @@ -446,7 +446,9 @@ int Yaz_ProxyConfigP::check_schema(xmlNodePtr ptr, Z_RecordComposition *comp, 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) { @@ -458,6 +460,16 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, 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; @@ -476,6 +488,8 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, 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) { @@ -494,6 +508,14 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, 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) { @@ -531,6 +553,16 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, 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;