-/* Alvis style indexing */
-static void index_node(struct filter_info *tinfo, struct recExtractCtrl *ctrl,
- xmlNodePtr ptr, RecWord *recWord)
-{
- for(; ptr; ptr = ptr->next)
- {
- index_node(tinfo, ctrl, ptr->children, recWord);
- if (ptr->type != XML_ELEMENT_NODE || !ptr->ns ||
- XML_STRCMP(ptr->ns->href, zebra_xslt_ns))
- continue;
- if (!XML_STRCMP(ptr->name, "index"))
- {
- const char *name_str = 0;
- const char *type_str = 0;
- const char *xpath_str = 0;
- struct _xmlAttr *attr;
- for (attr = ptr->properties; attr; attr = attr->next)
- {
- if (attr_content(attr, "name", &name_str))
- ;
- else if (attr_content(attr, "xpath", &xpath_str))
- ;
- else if (attr_content(attr, "type", &type_str))
- ;
- else
- yaz_log(YLOG_WARN, "%s: dom filter: bad attribute %s"
- " for <index>",
- tinfo->fname, attr->name);
- }
- if (name_str)
- {
- int prev_type = recWord->index_type; /* save default type */
-
- if (type_str && *type_str)
- recWord->index_type = *type_str; /* type was given */
- recWord->index_name = name_str;
- index_cdata(tinfo, ctrl, ptr->children, recWord);
-
- recWord->index_type = prev_type; /* restore it again */
- }
- }
- }
-}