X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmod_dom.c;h=9f2dd07c4b20ef9d4d52020564f9e719031d413b;hb=a101ad077b7c8cb3ea5b658e994b9e8e83fd3bb7;hp=5805efb4545f8d6f19f8e94e688e5dace75b3afa;hpb=f1d5d3a64682b741757c91311f3362c9d43f288c;p=idzebra-moved-to-github.git diff --git a/index/mod_dom.c b/index/mod_dom.c index 5805efb..9f2dd07 100644 --- a/index/mod_dom.c +++ b/index/mod_dom.c @@ -1,4 +1,4 @@ -/* $Id: mod_dom.c,v 1.9 2007-02-14 16:31:37 marc Exp $ +/* $Id: mod_dom.c,v 1.11 2007-02-14 16:43:37 marc Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -800,10 +800,10 @@ static const char *zebra_pi_name = ZEBRA_PI_NAME; /* DOM filter style indexing */ -void index_value_of(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlNodePtr node, - xmlChar * index_p) +static void index_value_of(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlNodePtr node, + xmlChar * index_p) { xmlChar *text = xmlNodeGetContent(node); @@ -863,20 +863,20 @@ void index_value_of(struct filter_info *tinfo, /* DOM filter style indexing */ -void set_record_info(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlChar * id_p, - xmlChar * rank_p, - xmlChar * action_p) +static void set_record_info(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlChar * id_p, + xmlChar * rank_p, + xmlChar * type_p) { - printf("RECORD id=%s rank=%s action=%s\n", id_p, rank_p, action_p); + printf("RECORD id=%s rank=%s type=%s\n", id_p, rank_p, type_p); } /* DOM filter style indexing */ -void process_xml_element_zebra_node(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlNodePtr node) +static void process_xml_element_zebra_node(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlNodePtr node) { if (node->type == XML_ELEMENT_NODE && node->ns && 0 == XML_STRCMP(node->ns->href, zebra_xslt_ns)){ @@ -900,7 +900,7 @@ void process_xml_element_zebra_node(struct filter_info *tinfo, else if (0 == XML_STRCMP(node->name, "record")){ xmlChar *id_p = 0; xmlChar *rank_p = 0; - xmlChar *action_p = 0; + xmlChar *type_p = 0; struct _xmlAttr *attr; for (attr = node->properties; attr; attr = attr->next){ @@ -908,23 +908,23 @@ void process_xml_element_zebra_node(struct filter_info *tinfo, ; else if (attr_content_xml(attr, "rank", &rank_p)) ; - else if (attr_content_xml(attr, "acton", &action_p)) + else if (attr_content_xml(attr, "type", &type_p)) ; else // printf("%s: dom filter: s% bad attribute %s", // tinfo->fname, xmlGetNodePath(node)), nodeattr->name); printf("dom filter: %s bad attribute @%s," - " expected @id|@rank|@action\n", + " expected @id|@rank|@type\n", xmlGetNodePath(node), attr->name); - if (action_p && 0 != strcmp("update", (const char *)action_p)) + if (type_p && 0 != strcmp("update", (const char *)type_p)) printf("dom filter: %s attribute @%s," - " only implemented '@action=\"update\"\n", + " only implemented '@type=\"update\"\n", xmlGetNodePath(node), attr->name); } - set_record_info(tinfo, recctr, id_p, rank_p, action_p); + set_record_info(tinfo, recctr, id_p, rank_p, type_p); } else { // printf("%s: dom filter: s% bad attribute %s", // tinfo->fname, xmlGetNodePath(node)), nodeattr->name); @@ -938,10 +938,10 @@ void process_xml_element_zebra_node(struct filter_info *tinfo, /* DOM filter style indexing */ -void process_xml_pi_node(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlNodePtr node, - xmlChar **index_pp) +static void process_xml_pi_node(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlNodePtr node, + xmlChar **index_pp) { /* printf("PI %s\n", xmlGetNodePath(node)); */ @@ -958,11 +958,11 @@ void process_xml_pi_node(struct filter_info *tinfo, if (0 == strncmp((const char *)look, "record", 6)){ xmlChar id[256]; xmlChar rank[256]; - xmlChar action[256]; + xmlChar type[256]; *id = '\0'; *rank = '\0'; - *action = '\0'; + *type = '\0'; look += 6; @@ -1004,7 +1004,7 @@ void process_xml_pi_node(struct filter_info *tinfo, printf ("ERROR %s: content '%s'; can not parse '%s'\n", xmlGetNodePath(node), pi_p, look); } else { - /* set_record_info(id, rank, action); */ + /* set_record_info(id, rank, type); */ set_record_info(tinfo, recctr, id, rank, 0); } @@ -1031,9 +1031,9 @@ void process_xml_pi_node(struct filter_info *tinfo, } /* DOM filter style indexing */ -void process_xml_element_node(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlNodePtr node) +static void process_xml_element_node(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlNodePtr node) { /* remember indexing instruction from PI to next element node */ xmlChar *index_p = 0; @@ -1066,9 +1066,9 @@ void process_xml_element_node(struct filter_info *tinfo, /* DOM filter style indexing */ -void extract_dom_doc_node(struct filter_info *tinfo, - struct recExtractCtrl *recctr, - xmlDocPtr doc) +static void extract_dom_doc_node(struct filter_info *tinfo, + struct recExtractCtrl *recctr, + xmlDocPtr doc) { /* printf("DOC %s\n", xmlGetNodePath((xmlNodePtr)doc)); */