+ /* actually indexing the text given */
+ dom_log(YLOG_DEBUG, tinfo, 0,
+ "INDEX '%s:%s' '%s'",
+ index ? (const char *) index : "null",
+ type ? (const char *) type : "null",
+ text ? (const char *) text : "null");
+
+ recword->index_name = (const char *)index;
+ if (type && *type)
+ recword->index_type = *type;
+
+ /* writing debug out */
+ if (extctr->flagShowRecords)
+ dom_log(YLOG_LOG, tinfo, 0,
+ "INDEX '%s:%s' '%s'",
+ index ? (const char *) index : "null",
+ type ? (const char *) type : "null",
+ text ? (const char *) text : "null");
+
+ /* actually indexing the text given */
+ recword->index_name = (const char *)index;
+ if (type && *type)
+ recword->index_type = *type;
+ (extctr->tokenAdd)(recword);
+
+ /* eat whitespaces */
+ if (*look && ' ' == *look)
+ {
+ look++;
+ }
+ }
+ }
+ xmlFree(text);
+ }
+}
+
+
+/* DOM filter style indexing */
+static void set_record_info(struct filter_info *tinfo,
+ struct recExtractCtrl *extctr,
+ xmlNodePtr node,
+ const char * id_p,
+ const char * rank_p,
+ const char * type_p)
+{
+ /* writing debug info out */
+ if (extctr && extctr->flagShowRecords)
+ dom_log(YLOG_LOG, tinfo, node,
+ "RECORD id=%s rank=%s type=%s",
+ id_p ? (const char *) id_p : "(null)",
+ rank_p ? (const char *) rank_p : "(null)",
+ type_p ? (const char *) type_p : "(null)");
+
+
+ if (id_p && *id_p)
+ sscanf((const char *)id_p, "%255s", extctr->match_criteria);
+
+ if (rank_p && *rank_p)
+ extctr->staticrank = atozint((const char *)rank_p);
+
+ if (type_p && *type_p)
+ {
+ enum zebra_recctrl_action_t action = action_update;
+ if (!strcmp(type_p, "insert"))
+ action = action_insert;
+ else if (!strcmp(type_p, "delete"))
+ action = action_delete;
+ else if (!strcmp(type_p, "replace"))
+ action = action_replace;
+ else if (!strcmp(type_p, "update"))
+ action = action_update;
+ else
+ dom_log(YLOG_WARN, tinfo, node, "bad @type value: %s", type_p);
+ extctr->action = action;
+ yaz_log(YLOG_LOG, "In mod_dom.c: setting action to %d", action);
+ }
+
+ if (tinfo->record_info_invoked == 1)
+ {
+ /* warn about multiple only once */
+ dom_log(YLOG_WARN, tinfo, node, "multiple record elements");
+ }
+ tinfo->record_info_invoked++;