From: Marc Cromme Date: Mon, 29 May 2006 13:48:43 +0000 (+0000) Subject: made place for record delete X-Git-Tag: before.bug.529~97 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=8de067c78a432ef4fa197fa8240d2aa6d04ff99c;p=idzebra-moved-to-github.git made place for record delete --- diff --git a/recctrl/alvis.c b/recctrl/alvis.c index ec22ed7..48de318 100644 --- a/recctrl/alvis.c +++ b/recctrl/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.15 2006-05-24 18:31:33 adam Exp $ +/* $Id: alvis.c,v 1.16 2006-05-29 13:48:43 marc Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -31,6 +31,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#include #include #include @@ -352,11 +353,12 @@ static void index_node(struct filter_info *tinfo, struct recExtractCtrl *ctrl, static void index_record(struct filter_info *tinfo,struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) { + const char *type_str = "update"; + if (ptr && ptr->type == XML_ELEMENT_NODE && ptr->ns && !XML_STRCMP(ptr->ns->href, zebra_xslt_ns) && !XML_STRCMP(ptr->name, "record")) { - const char *type_str = "update"; const char *id_str = 0; const char *rank_str = 0; struct _xmlAttr *attr; @@ -368,17 +370,20 @@ static void index_record(struct filter_info *tinfo,struct recExtractCtrl *ctrl, } if (id_str) sscanf(id_str, "%255s", ctrl->match_criteria); + if (rank_str) - { ctrl->staticrank = atoi(rank_str); - yaz_log(YLOG_LOG, "rank=%d",ctrl->staticrank); - } - else - yaz_log(YLOG_LOG, "no rank"); ptr = ptr->children; } - index_node(tinfo, ctrl, ptr, recWord); + + if (!strcmp("update", type_str)) + index_node(tinfo, ctrl, ptr, recWord); + else if (!strcmp("delete", type_str)) + yaz_log(YLOG_WARN, "alvis filter delete: to be implemented"); + else + yaz_log(YLOG_WARN, "alvis filter: unknown record type '%s'", + type_str); } static int extract_doc(struct filter_info *tinfo, struct recExtractCtrl *p, diff --git a/recctrl/xslt.c b/recctrl/xslt.c index 5a9867c..846cd79 100644 --- a/recctrl/xslt.c +++ b/recctrl/xslt.c @@ -1,4 +1,4 @@ -/* $Id: xslt.c,v 1.25 2006-05-24 18:31:33 adam Exp $ +/* $Id: xslt.c,v 1.26 2006-05-29 13:48:43 marc Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -33,6 +33,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +/* #include */ #include #include