#include <yaz/srw.h>
#include <metaproxy/package.hpp>
#include <metaproxy/util.hpp>
+#include <metaproxy/xmlutil.hpp>
#include "torus.hpp"
#include <libxslt/xsltutils.h>
std::string element_set;
std::string record_encoding;
std::string transform_xsl_fname;
+ std::string urlRecipe;
bool use_turbomarc;
bool piggyback;
CCL_bibset ccl_bibset;
s->transform_xsl_fname = mp::xml::get_text(ptr);
}
else if (!strcmp((const char *) ptr->name,
+ "urlRecipe"))
+ {
+ s->urlRecipe = mp::xml::get_text(ptr);
+ }
+ else if (!strcmp((const char *) ptr->name,
"useTurboMarc"))
{
; // useTurboMarc is ignored
if (b->sptr->request_syntax.length())
{
syntax_name = b->sptr->request_syntax.c_str();
- if (strcmp(syntax_name, "xml"))
+ const Odr_oid *syntax_oid =
+ yaz_string_to_oid(yaz_oid_std(), CLASS_RECSYN, syntax_name);
+ if (!oid_oidcmp(syntax_oid, yaz_oid_recsyn_usmarc)
+ || !oid_oidcmp(syntax_oid, yaz_oid_recsyn_opac))
assume_marc8_charset = true;
}
}
if (rec_buf)
{
+ xmlDoc *doc = xmlParseMemory(rec_buf, rec_len);
+ mp::xml::url_recipe_handle(doc, b->sptr->urlRecipe);
+ xmlFreeDoc(doc);
+ }
+ if (rec_buf)
+ {
npr = (Z_NamePlusRecord *) odr_malloc(odr, sizeof(*npr));
npr->databaseName = odr_database;
npr->which = Z_NamePlusRecord_databaseRecord;