From: Adam Dickmeiss Date: Wed, 24 Aug 2005 08:30:37 +0000 (+0000) Subject: Allow complex compspec so that SRW/SRU schemas are supported X-Git-Tag: before.bug.529~333 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=35f5aba7d93a1ae18767463ba90c3cd340b4d9bd;p=idzebra-moved-to-github.git Allow complex compspec so that SRW/SRU schemas are supported --- diff --git a/recctrl/alvis.c b/recctrl/alvis.c index c25b5ce..546fd7a 100644 --- a/recctrl/alvis.c +++ b/recctrl/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.7 2005-08-22 14:39:47 adam Exp $ +/* $Id: alvis.c,v 1.8 2005-08-24 08:30:37 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -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) { - p->diagnostic = YAZ_BIB1_PRESENT_COMP_SPEC_PARAMETER_UNSUPP; - return 0; + 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) + { + esn = p->comp->u.complex->generic->elementSpec->u.elementSetName; } - esn = p->comp->u.simple->u.generic; } schema = lookup_schema(tinfo, esn); if (!schema) diff --git a/recctrl/xslt.c b/recctrl/xslt.c index 9904548..6787510 100644 --- a/recctrl/xslt.c +++ b/recctrl/xslt.c @@ -1,4 +1,4 @@ -/* $Id: xslt.c,v 1.16 2005-08-22 14:39:47 adam Exp $ +/* $Id: xslt.c,v 1.17 2005-08-24 08:30:37 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -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) { - p->diagnostic = YAZ_BIB1_PRESENT_COMP_SPEC_PARAMETER_UNSUPP; - return 0; + 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) + { + esn = p->comp->u.complex->generic->elementSpec->u.elementSetName; } - esn = p->comp->u.simple->u.generic; } schema = lookup_schema(tinfo, esn); if (!schema)