- if (zebra_term_untrans(zh, index_type, dst_buf, str))
- *dst_buf = '\0'; /* untrans failed */
-
- if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
- {
- wrbuf_printf(wrbuf, " <index name=\"%s\"",
- string_index);
-
- wrbuf_printf(wrbuf, " type=\"%s\"", index_type);
-
- wrbuf_printf(wrbuf, " seq=\"" ZINT_FORMAT "\">",
- key_in.mem[key_in.len -1]);
- wrbuf_xmlputs(wrbuf, dst_buf);
- wrbuf_printf(wrbuf, "</index>\n");
- }
- else
- {
- wrbuf_printf(wrbuf, "%s ", string_index);
-
- wrbuf_printf(wrbuf, "%s", index_type);
-
- for (i = 1; i < key_in.len; i++)
- wrbuf_printf(wrbuf, " " ZINT_FORMAT,
- key_in.mem[i]);
-
- wrbuf_printf(wrbuf, " %s", dst_buf);
-
- wrbuf_printf(wrbuf, "\n");
-
- }
+ if ((!spec->index_type ||
+ !yaz_matchstr(spec->index_type, index_type))
+ &&
+ !yaz_matchstr(spec->index_name, string_index))
+ match = 1;
+ }
+ }
+ if (match)
+ {
+ if (zebra_term_untrans(zh, index_type, dst_buf, str))
+ *dst_buf = '\0'; /* untrans failed */
+
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
+ {
+ wrbuf_printf(wrbuf, " <index name=\"%s\"",
+ string_index);
+
+ wrbuf_printf(wrbuf, " type=\"%s\"", index_type);
+
+ wrbuf_printf(wrbuf, " seq=\"" ZINT_FORMAT "\">",
+ key_in.mem[key_in.len -1]);
+ wrbuf_xmlputs(wrbuf, dst_buf);
+ wrbuf_printf(wrbuf, "</index>\n");
+ }
+ else
+ {
+ wrbuf_printf(wrbuf, "%s ", string_index);
+
+ wrbuf_printf(wrbuf, "%s", index_type);
+
+ for (i = 1; i < key_in.len; i++)
+ wrbuf_printf(wrbuf, " " ZINT_FORMAT,
+ key_in.mem[i]);
+
+ wrbuf_printf(wrbuf, " %s", dst_buf);