-/* $Id: alvis.c,v 1.7 2005-08-22 14:39:47 adam Exp $
+/* $Id: alvis.c,v 1.9 2006-04-26 11:12:31 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
return 0;
}
-static void filter_config(void *clientData, Res res, const char *args)
+static ZEBRA_RES filter_config(void *clientData, Res res, const char *args)
{
struct filter_info *tinfo = clientData;
if (!args || !*args)
- args = "xsltfilter.xml";
+ return ZEBRA_FAIL;
if (tinfo->fname && !strcmp(args, tinfo->fname))
- return;
+ return ZEBRA_OK;
destroy_schemas(tinfo);
create_schemas(tinfo, args);
+ return ZEBRA_OK;
}
static void filter_destroy(void *clientData)
if (p->comp)
{
- if (p->comp->which != Z_RecordComp_simple
- || p->comp->u.simple->which != Z_ElementSetNames_generic)
+ if (p->comp->which == Z_RecordComp_simple
+ && p->comp->u.simple->which == Z_ElementSetNames_generic)
+ {
+ esn = p->comp->u.simple->u.generic;
+ }
+ else if (p->comp->which == Z_RecordComp_complex
+ && p->comp->u.complex->generic->elementSpec
+ && p->comp->u.complex->generic->elementSpec->which ==
+ Z_ElementSpec_elementSetName)
{
- p->diagnostic = YAZ_BIB1_PRESENT_COMP_SPEC_PARAMETER_UNSUPP;
- return 0;
+ esn = p->comp->u.complex->generic->elementSpec->u.elementSetName;
}
- esn = p->comp->u.simple->u.generic;
}
schema = lookup_schema(tinfo, esn);
if (!schema)