- 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))
+ /* warn about multiple only once */
+ dom_log(YLOG_WARN, tinfo, node, "multiple record elements");
+ }
+ tinfo->record_info_invoked++;
+
+}
+
+
+/* DOM filter style indexing */
+static void process_xml_element_zebra_node(struct filter_info *tinfo,
+ struct recExtractCtrl *extctr,
+ RecWord* recword,
+ xmlNodePtr node)
+{
+ if (node->type == XML_ELEMENT_NODE && node->ns && node->ns->href
+ && 0 == XML_STRCMP(node->ns->href, zebra_dom_ns))
+ {
+ if (0 == XML_STRCMP(node->name, "index"))
+ {
+ const char *index_p = 0;
+
+ struct _xmlAttr *attr;
+ for (attr = node->properties; attr; attr = attr->next)
+ {
+ if (attr_content_xml(attr, "name", &index_p))
+ {
+ index_value_of(tinfo, extctr, recword, node, index_p);
+ }
+ else
+ {
+ dom_log(YLOG_WARN, tinfo, node,
+ "bad attribute @%s, expected @name",
+ attr->name);
+ }
+ }
+ }
+ else if (0 == XML_STRCMP(node->name, "record"))
+ {
+ const char *id_p = 0;
+ const char *rank_p = 0;
+ const char *type_p = 0;
+
+ struct _xmlAttr *attr;
+ for (attr = node->properties; attr; attr = attr->next)
+ {
+ if (attr_content_xml(attr, "id", &id_p))