-/* $Id: data1.h,v 1.13 2006-05-19 13:49:34 adam Exp $
+/* $Id: data1.h,v 1.18 2006-08-14 10:40:14 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
for more details.
You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
#ifndef DATA1_H
struct data1_attset;
-typedef struct data1_local_attribute
-{
- int local;
- struct data1_local_attribute *next;
-} data1_local_attribute;
-
typedef struct data1_attset data1_attset;
typedef struct data1_att data1_att;
typedef struct data1_attset_child data1_attset_child;
data1_attset *parent; /* attribute set */
char *name; /* symbolic name of this attribute */
int value; /* attribute value */
- data1_local_attribute *locals; /* local index values */
data1_att *next;
};
} preprocess;
} u;
- void (*destroy)(struct data1_node *n);
#define DATA1_LOCALDATA 12
char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
struct data1_node *next;
struct data1_node *root;
} data1_node;
+enum DATA1_XPATH_INDEXING {
+ DATA1_XPATH_INDEXING_DISABLE,
+ DATA1_XPATH_INDEXING_ENABLE
+};
+
YAZ_EXPORT data1_handle data1_create (void);
YAZ_EXPORT data1_node *data1_read_record(data1_handle dh,
int (*rf)(void *, char *, size_t),
void *fh, NMEM m);
-YAZ_EXPORT data1_absyn *data1_read_absyn(data1_handle dh, const char *file,
- int file_must_exist);
+
+YAZ_EXPORT void data1_remove_node (data1_handle dh, data1_node *n);
+YAZ_EXPORT void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n);
YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
data1_tagset *s,
int type, int value);
int *len);
YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
const char *name);
-YAZ_EXPORT void data1_free_tree(data1_handle dh, data1_node *t);
YAZ_EXPORT char *data1_nodetobuf(data1_handle dh, data1_node *n,
int select, int *len);
YAZ_EXPORT data1_node *data1_mk_tag_data_wd(data1_handle dh,
const char *str,
NMEM nmem);
-YAZ_EXPORT data1_absyn *data1_get_absyn (data1_handle dh, const char *name);
+YAZ_EXPORT data1_absyn *data1_get_absyn (data1_handle dh, const char *name,
+ enum DATA1_XPATH_INDEXING en);
YAZ_EXPORT data1_node *data1_search_tag (data1_handle dh, data1_node *n,
const char *tag);