* OF THIS SOFTWARE.
*
* $Log: data1.h,v $
- * Revision 1.34 1998-02-27 14:08:04 adam
+ * Revision 1.38 1998-10-15 08:29:15 adam
+ * Tag set type may be specified in reference to it using "tagset"
+ * directive in .abs-files and "include" directive in .tag-files.
+ *
+ * Revision 1.37 1998/10/13 16:09:46 adam
+ * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
+ * Added support for multiple attribute set references and tagset references
+ * from an abstract syntax file.
+ * Fixed many bad logs-calls in routines that read the various
+ * specifications regarding data1 (*.abs,*.att,...) and made the messages
+ * consistent whenever possible.
+ * Added extra 'lineno' argument to function readconf_line.
+ *
+ * Revision 1.36 1998/05/18 13:06:57 adam
+ * Changed the way attribute sets are handled by the retriaval module.
+ * Extended Explain conversion / schema.
+ * Modified server and client to work with ASN.1 compiled protocol handlers.
+ *
+ * Revision 1.35 1998/03/05 08:15:32 adam
+ * Implemented data1_add_insert_taggeddata utility which is more flexible
+ * than data1_insert_taggeddata.
+ *
+ * Revision 1.34 1998/02/27 14:08:04 adam
* Added const to some char pointer arguments.
* Reworked data1_read_node so that it doesn't create a tree with
* pointers to original "SGML"-buffer.
} data1_name;
typedef struct data1_absyn_cache_info *data1_absyn_cache;
+typedef struct data1_attset_cache_info *data1_attset_cache;
typedef enum data1_datatype
{
- DATA1K_structured = 1,
+ DATA1K_unknown,
+ DATA1K_structured,
DATA1K_string,
DATA1K_numeric,
DATA1K_bool,
struct data1_tag *next;
} data1_tag;
-typedef struct data1_tagset
+typedef struct data1_tagset data1_tagset;
+
+struct data1_tagset
{
+ int type; /* type of tagset in current context */
char *name; /* symbolic name */
oid_value reference;
- int type; /* type of tagset in current context */
data1_tag *tags; /* tags defined by this set */
- struct data1_tagset *children; /* included tagsets */
- struct data1_tagset *next; /* sibling */
-} data1_tagset;
+ data1_tagset *children; /* children */
+ data1_tagset *next; /* sibling */
+};
typedef struct data1_termlist
{
int (*rf)(void *, char *, size_t),
void *fh, NMEM m);
YAZ_EXPORT data1_absyn *data1_read_absyn(data1_handle dh, const char *file);
-YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh, data1_tagset *s,
+YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
+ data1_tagset *s,
int type, int value);
-YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh, char *file);
+YAZ_EXPORT data1_tagset *data1_empty_tagset (data1_handle dh);
+YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh,
+ const char *file,
+ int type);
YAZ_EXPORT data1_element *data1_getelementbytagname(data1_handle dh,
data1_absyn *abs,
data1_element *parent,
int select, ODR o,
int *len);
YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
- char *name);
+ 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);
const char *name);
YAZ_EXPORT data1_node *data1_mk_node(data1_handle dh, NMEM m);
YAZ_EXPORT data1_absyn *data1_get_absyn(data1_handle dh, const char *name);
+YAZ_EXPORT data1_attset *data1_get_attset (data1_handle dh, const char *name);
YAZ_EXPORT data1_maptab *data1_read_maptab(data1_handle dh, const char *file);
YAZ_EXPORT data1_node *data1_map_record(data1_handle dh, data1_node *n,
data1_maptab *map, NMEM m);
YAZ_EXPORT char **data1_get_read_buf (data1_handle dp, int **lenp);
YAZ_EXPORT char **data1_get_map_buf (data1_handle dp, int **lenp);
YAZ_EXPORT data1_absyn_cache *data1_absyn_cache_get (data1_handle dh);
+YAZ_EXPORT data1_attset_cache *data1_attset_cache_get (data1_handle dh);
YAZ_EXPORT NMEM data1_nmem_get (data1_handle dh);
YAZ_EXPORT void data1_pr_tree (data1_handle dh, data1_node *n, FILE *out);
YAZ_EXPORT char *data1_insert_string (data1_handle dh, data1_node *res,
NMEM m, const char *str);
YAZ_EXPORT data1_node *data1_read_sgml (data1_handle dh, NMEM m,
const char *buf);
+YAZ_EXPORT void data1_absyn_trav (data1_handle dh, void *handle,
+ void (*fh)(data1_handle dh,
+ void *h, data1_absyn *a));
+
+YAZ_EXPORT data1_attset *data1_attset_search_id (data1_handle dh, int id);
+
+YAZ_EXPORT data1_node
+*data1_add_insert_taggeddata(data1_handle dh, data1_node *root,
+ data1_node *at, const char *tagname, NMEM m,
+ int first_flag, int local_allowed);
#ifdef __cplusplus
}
#endif