X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Falvis.c;h=546fd7af92c8195fed6733948e42c9403cdcf426;hb=6dfee19bc1cec29ff5ec5e9cd8021d1354a6126e;hp=8cdc8ebef828ca56be4e24ad66e53a2de00cbaee;hpb=87cf7a7eba859697c0cb8322cf458a73c7cfdff3;p=idzebra-moved-to-github.git diff --git a/recctrl/alvis.c b/recctrl/alvis.c index 8cdc8eb..546fd7a 100644 --- a/recctrl/alvis.c +++ b/recctrl/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.6 2005-08-22 09:03:34 adam Exp $ +/* $Id: alvis.c,v 1.8 2005-08-24 08:30:37 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -96,7 +96,7 @@ static void set_param_int(const char **params, const char *name, params[2] = 0; } -#define ENABLE_INPUT_CALLBACK 1 +#define ENABLE_INPUT_CALLBACK 0 #if ENABLE_INPUT_CALLBACK static int zebra_xmlInputMatchCallback (char const *filename) @@ -547,7 +547,7 @@ static const char *snippet_doc(struct recRetrieveCtrl *p, int text_mode, static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) { const char *esn = zebra_xslt_ns; - const char *params[10]; + const char *params[20]; struct filter_info *tinfo = clientData; xmlDocPtr resDoc; xmlDocPtr doc; @@ -556,13 +556,18 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) 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)