X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Frecgrs.c;h=ee875f96ac0696ade26099c8c1c7acf24b950df7;hb=5f196d5c2d38a50f3b986438fad5aa3c3a3f04c6;hp=af13835336795a3c82fbdd379bcdabe5bb32778d;hpb=c4318fe5480927a441042829d2953fc1484fb46b;p=idzebra-moved-to-github.git diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index af13835..ee875f9 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.81 2003-06-17 22:22:57 adam Exp $ +/* $Id: recgrs.c,v 1.83 2003-09-16 12:18:24 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -62,7 +62,8 @@ static int read_grs_type (struct grs_handlers *h, strcpy (p->type, cp+1); for (gh = h->handlers; gh; gh = gh->next) { - if (!memcmp (type, gh->type->type, cp-type)) + if (!memcmp (type, gh->type->type, cp-type) && + gh->type->type[cp-type] == '\0') { if (!gh->initFlag) { @@ -99,6 +100,7 @@ static void *grs_init(RecType recType) grs_add_handler (h, recTypeGrs_tcl); #endif grs_add_handler (h, recTypeGrs_marc); + grs_add_handler (h, recTypeGrs_marcxml); #if HAVE_EXPAT_H grs_add_handler (h, recTypeGrs_xml); #endif @@ -388,7 +390,7 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, tag_path_full[flen] = 0; /* If we have a matching termlist... */ - if ((tl = xpath_termlist_by_tagpath(tag_path_full, n))) { + if (n->root->u.root.absyn && (tl = xpath_termlist_by_tagpath(tag_path_full, n))) { for (; tl; tl = tl->next) { wrd->reg_type = *tl->structure; /* this is the ! case, so structure is for the xpath index */