-/* $Id: d1_absyn.c,v 1.9.2.5 2005-11-23 14:26:04 adam Exp $
+/* $Id: d1_absyn.c,v 1.9.2.6 2006-02-06 23:16:03 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
{
const char *p = expr;
int abs = 1;
- int i;
int e = 0;
char *stack[32];
char *res_p, *res = 0;
{
int is_predicate = 0;
char *s;
- int j;
+ int i, j;
for (i = 0; *p && !strchr("/",*p); i++, p++)
;
res_size += (i+3); /* we'll add / between later .. */
}
res_p = res = nmem_malloc(data1_nmem_get(dh), res_size + 10);
- i = 0;
- sprintf(res_p, ".*/");
+ *res_p = '\0';
+ if (stack[e-1][0] == '@') /* path/@attr spec (leaf is attribute) */
+ sprintf(res_p, "/");
+ else
+ sprintf(res_p, "[^@]*/"); /* path .. (index all cdata below it) */
res_p = res_p + strlen(res_p);
while (--e >= 0) {
sprintf(res_p, "%s/", stack[e]);
-/* $Id: recgrs.c,v 1.86.2.7 2006-02-06 13:34:00 adam Exp $
+/* $Id: recgrs.c,v 1.86.2.8 2006-02-06 23:16:03 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
int ok = 0;
sprintf (pexpr, "/%s\n", tagpath);
- yaz_log(LOG_DEBUG,"Checking tagpath %s",tagpath);
+#if 0
+ yaz_log(LOG_DEBUG, "Checking tagpath %s", tagpath);
+#endif
while (xpe)
{
int i;
yaz_log(LOG_DEBUG, "index_xpath level=%d use=%d", level, use);
if ((!n->root->u.root.absyn) ||
(n->root->u.root.absyn->enable_xpath_indexing)) {
- termlist_only = 0;
+ termlist_only = 0;
}
switch (n->which)
}
else
{
- /* if this fragment is enabled, we index
- attribute values as well. See bug #460 */
- if (0 && xp->value) {
+ /* index attribute value (only path/@attr) */
+ if (xp->value)
+ {
wrd->attrSet = (int)
(tl->att->parent->reference);
wrd->attrUse = tl->att->locals->local;