-/* $Id: d1_absyn.c,v 1.21 2005-06-29 16:52:26 adam Exp $
+/* $Id: d1_absyn.c,v 1.22 2006-02-06 23:22:28 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
{
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, ".*/");
+ 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.106 2006-02-06 13:34:13 adam Exp $
+/* $Id: recgrs.c,v 1.107 2006-02-06 23:22:29 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
p, wrd);
xpdone = 1;
} 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)
{
#if NATTR
wrd->index_name = tl->index_name;