-/* $Id: d1_absyn.c,v 1.17 2005-01-04 16:28:34 quinn Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
+/* $Id: d1_absyn.c,v 1.20 2005-06-23 06:45:46 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
nmem_malloc(data1_nmem_get(dh), sizeof(**tp));
(*tp)->next = 0;
+#if NATTR
+ (*tp)->index_name = nmem_strdup(data1_nmem_get(dh), element_name);
+ if (*attname == '!' && xpelement)
+ (*tp)->index_name = 0;
+#else
if (!xpelement) {
if (*attname == '!')
strcpy(attname, element_name);
}
- if (!((*tp)->att = data1_getattbyname(dh, res->attset,
- attname))) {
+ if (!((*tp)->att = data1_getattbyname(dh, res->attset, attname)))
+ {
if ((!xpelement) || (*attname != '!')) {
yaz_log(YLOG_WARN,
"%s:%d: Couldn't find att '%s' in attset",
(*tp)->att = 0;
}
}
-
+#endif
if (r == 2 && (source = strchr(structure, ':')))
*source++ = '\0'; /* cut off structure .. */
else
char *field = melm;
char *subfield;
char *fieldtype;
- if ((dollar = index(melm, '$'))) {
+ if ((dollar = strchr(melm, '$'))) {
*dollar = '\0';
subfield = ++dollar;
} else
}
else if (!strcmp(cmd, "attset"))
{
+#if NATTR
+ yaz_log(YLOG_WARN, "%s:%d: attset obsolete", file, lineno);
+#else
char *name;
data1_attset *attset;
(*attset_childp)->child = attset;
(*attset_childp)->next = 0;
attset_childp = &(*attset_childp)->next;
+#endif
}
else if (!strcmp(cmd, "tagset"))
{