+/*
+ * This structure describes a attset, perhaps made up by inclusion
+ * (supersetting) of other attribute sets. When indexing and searching,
+ * we perform a normalisation, where we associate a given tag with
+ * the set that originally defined it, rather than the superset. This
+ * allows the most flexible access. Eg, the tags common to GILS and BIB-1
+ * should be searchable by both names.
+ */
+
+struct data1_attset;
+
+typedef struct data1_attset data1_attset;
+typedef struct data1_att data1_att;
+typedef struct data1_attset_child data1_attset_child;
+
+struct data1_att
+{
+ data1_attset *parent; /* attribute set */
+ char *name; /* symbolic name of this attribute */
+ int value; /* attribute value */
+ data1_att *next;
+};
+
+struct data1_attset_child {
+ data1_attset *child;
+ data1_attset_child *next;
+};
+
+struct data1_attset
+{
+ char *name; /* symbolic name */
+ Odr_oid *oid; /* attribute set OID */
+ data1_att *atts; /* attributes */
+ data1_attset_child *children; /* included attset */
+ data1_attset *next; /* next in cache */
+};
+
+typedef struct data1_handle_info *data1_handle;
+
+YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
+ const char *name);
+YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
+
+YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
+
+typedef struct data1_maptag
+{
+ int new_field;
+ int type;
+#define D1_MAPTAG_numeric 1
+#define D1_MAPTAG_string 2
+ int which;
+ union
+ {
+ int numeric;
+ char *string;
+ } value;
+ struct data1_maptag *next;
+} data1_maptag;
+
+typedef struct data1_mapunit data1_mapunit;
+
+typedef struct data1_maptab
+{
+ char *name;
+ Odr_oid *oid; /* target abstract syntax */
+ char *target_absyn_name;
+ data1_mapunit *map;
+ struct data1_maptab *next;
+} data1_maptab;
+
+