26 #include <yaz/proto.h>
27 #include <yaz/yaz-util.h>
31 #define d1_isspace(c) strchr(" \r\n\t\f", c)
32 #define d1_isdigit(c) ((c) <= '9' && (c) >= '0')
36 #define data1_matchstr(s1, s2) yaz_matchstr(s1, s2)
38 #define DATA1_MAX_SYMBOL 31
89 #define D1_MAPTAG_numeric 1
90 #define D1_MAPTAG_string 2
204 #define DATA1T_numeric 1
205 #define DATA1T_string 2
274 #define DATA1N_root 1
278 #define DATA1N_data 3
280 #define DATA1N_variant 4
282 #define DATA1N_comment 5
284 #define DATA1N_preprocess 6
310 #define DATA1I_inctxt 1
312 #define DATA1I_incbin 2
314 #define DATA1I_text 3
320 #define DATA1I_xmltext 6
338 #define DATA1_LOCALDATA 12
360 int (*get_byte)(
void *fh),
void *fh,
363 int (*rf)(
void *,
char *,
size_t),
378 const char *tagname);
385 int select,
int *
len);
388 const char *tagname, NMEM m);
390 const char *tagname, NMEM m);
399 char *zclass,
char *
type);
412 const char *
tag,
const char **attr,
415 const char *
tag,
size_t len,
422 const char *buf,
size_t len,
425 const char *buf,
size_t len,
431 const char *buf,
size_t len,
461 NMEM nmem,
const char *name);
467 const char *
tag,
int num,
470 const char *
tag, Odr_oid *oid,
502 int select,
int *
len);
524 NMEM m,
const char *str);
526 NMEM m,
const char *str,
size_t len);
530 NMEM m,
const char *str,
size_t len);
532 NMEM m,
const char *str);
537 int (*rf)(
void *,
char *,
size_t),
559 const char *tagname, NMEM m);
570 const char *fromcode);
577 const char *default_value);
data1_tagset * data1_empty_tagset(data1_handle dh)
struct data1_absyn_cache_info * data1_absyn_cache
struct data1_esetname data1_esetname
data1_node * data1_LookupNode(data1_node *node, char *pTagPath)
data1_node * data1_mk_tag(data1_handle dh, NMEM nmem, const char *tag, const char **attr, data1_node *at)
int data1_iconv(data1_handle dh, NMEM m, data1_node *n, const char *tocode, const char *fromcode)
data1_element * data1_getelementbytagname(data1_handle dh, data1_absyn *abs, data1_element *parent, const char *tagname)
data1_node * data1_search_tag(data1_handle dh, data1_node *n, const char *tag)
data1_node * data1_mk_root(data1_handle dh, NMEM nmem, const char *name)
void data1_absyn_destroy(data1_handle dh)
data1_marctab * data1_read_marctab(data1_handle dh, const char *file)
struct data1_name data1_name
data1_attset * data1_empty_attset(data1_handle dh)
char * data1_insert_string(data1_handle dh, data1_node *res, NMEM m, const char *str)
void data1_set_tabroot(data1_handle dp, const char *p)
data1_datatype data1_maptype(data1_handle dh, char *t)
data1_absyn * data1_get_absyn(data1_handle dh, const char *name, enum DATA1_XPATH_INDEXING en)
char * data1_insert_string_n(data1_handle dh, data1_node *res, NMEM m, const char *str, size_t len)
int data1_CountOccurences(data1_node *node, char *pTagPath)
Count the number of occurences of the last instance on a tagpath.
char ** data1_get_map_buf(data1_handle dp, int **lenp)
WRBUF data1_get_wrbuf(data1_handle dp)
struct data1_element data1_element
data1_node * data1_mk_node_type(data1_handle dh, NMEM m, int type)
data1_attset * data1_attset_search_id(data1_handle dh, const Odr_oid *oid)
data1_node * data1_insert_preprocess(data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at)
data1_node * data1_mk_tag_data_text(data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem)
data1_attset_cache * data1_attset_cache_get(data1_handle dh)
void data1_absyn_trav(data1_handle dh, void *handle, void(*fh)(data1_handle dh, void *h, data1_absyn *a))
void data1_tag_add_attr(data1_handle dh, NMEM nmem, data1_node *res, const char **attr)
struct data1_termlist data1_termlist
struct data1_marctab data1_marctab
data1_node * data1_mk_comment_n(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
void data1_concat_text(data1_handle dh, NMEM m, data1_node *n)
data1_node * data1_read_sgml(data1_handle dh, NMEM m, const char *buf)
data1_handle data1_create(void)
data1_node * data1_mk_tag_data_wd(data1_handle dh, data1_node *at, const char *tagname, NMEM m)
FILE * data1_path_fopen(data1_handle dh, const char *file, const char *mode)
void data1_set_tabpath(data1_handle dh, const char *path)
data1_node * data1_read_nodex(data1_handle dh, NMEM m, int(*get_byte)(void *fh), void *fh, WRBUF wrbuf)
char * data1_insert_zint(data1_handle dh, data1_node *res, NMEM m, zint num)
data1_attset * data1_read_attset(data1_handle dh, const char *file)
char * data1_nodetosoif(data1_handle dh, data1_node *n, int select, int *len)
char * data1_getNodeValue(data1_node *node, char *pTagPath)
data1_node * data1_mk_node(data1_handle dh, NMEM m)
void data1_set_data_string(data1_handle dh, data1_node *res, NMEM m, const char *str)
struct data1_xattr data1_xattr
char * data1_nodetoidsgml(data1_handle dh, data1_node *n, int select, int *len)
const char * data1_absyn_get_staticrank(data1_absyn *absyn)
void data1_set_data_zint(data1_handle dh, data1_node *res, NMEM m, zint num)
data1_tag * data1_gettagbyname(data1_handle dh, data1_tagset *s, const char *name)
Z_Espec1 * data1_read_espec1(data1_handle dh, const char *file)
data1_attset * data1_get_attset(data1_handle dh, const char *name)
data1_tag * data1_gettagbynum(data1_handle dh, data1_tagset *s, int type, int value)
void data1_destroy(data1_handle dh)
void data1_remove_node(data1_handle dh, data1_node *n)
const char * data1_get_tabroot(data1_handle dh)
data1_maptab * data1_read_maptab(data1_handle dh, const char *file)
const char * data1_get_tabpath(data1_handle dh)
data1_node * data1_read_record(data1_handle dh, int(*rf)(void *, char *, size_t), void *fh, NMEM m)
data1_node * data1_add_taggeddata(data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m)
data1_element * data1_absyn_getelements(data1_handle dh, data1_node *root)
NMEM data1_nmem_get(data1_handle dh)
struct data1_varset data1_varset
struct data1_node data1_node
data1_node * data1_get_root_tag(data1_handle dh, data1_node *n)
struct data1_sub_elements data1_sub_elements
struct data1_attset_cache_info * data1_attset_cache
void data1_pr_tree(data1_handle dh, data1_node *n, FILE *out)
data1_node * data1_insert_preprocess_n(data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at)
data1_element * data1_getelementbyname(data1_handle dh, data1_absyn *absyn, const char *name)
data1_varset * data1_read_varset(data1_handle dh, const char *file)
data1_node * data1_mk_comment(data1_handle dh, NMEM mem, const char *buf, data1_node *parent)
struct data1_tag data1_tag
Z_ExplainRecord * data1_nodetoexplain(data1_handle dh, data1_node *n, int select, ODR o)
data1_node * data1_mk_tag_n(data1_handle dh, NMEM nmem, const char *tag, size_t len, const char **attr, data1_node *at)
char * data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, int selected, int *len)
data1_node * data1_mk_tag_data_text_uni(data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem)
char * data1_nodetobuf(data1_handle dh, data1_node *n, int select, int *len)
char ** data1_get_read_buf(data1_handle dp, int **lenp)
data1_node * data1_mk_tag_uni(data1_handle dh, NMEM nmem, const char *tag, data1_node *at)
struct data1_maptag data1_maptag
data1_esetname * data1_getesetbyname(data1_handle dh, data1_absyn *a, const char *name)
data1_node * data1_mk_node2(data1_handle dh, NMEM m, int type, data1_node *parent)
struct data1_varclass data1_varclass
data1_node * data1_read_xml(data1_handle dh, int(*rf)(void *, char *, size_t), void *fh, NMEM m)
Z_BriefBib * data1_nodetosummary(data1_handle dh, data1_node *n, int select, ODR o)
data1_node * get_parent_tag(data1_handle dh, data1_node *n)
data1_node * data1_mk_tag_data_zint(data1_handle dh, data1_node *at, const char *tag, zint num, NMEM nmem)
data1_att * data1_getattbyname(data1_handle dh, data1_attset *s, const char *name)
void data1_chop_text(data1_handle dh, NMEM m, data1_node *n)
data1_node * data1_mk_text_n(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
data1_node * data1_mk_tag_data(data1_handle dh, data1_node *at, const char *tagname, NMEM m)
data1_node * data1_mk_text_nf(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
data1_tagset * data1_read_tagset(data1_handle dh, const char *file, int type)
data1_node * data1_mk_preprocess(data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at)
data1_node * data1_insert_taggeddata(data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m)
data1_node * data1_map_record(data1_handle dh, data1_node *n, data1_maptab *map, NMEM m)
Z_GenericRecord * data1_nodetogr(data1_handle dh, data1_node *n, int select, ODR o, int *len)
data1_node * data1_read_node(data1_handle dh, const char **buf, NMEM m)
void data1_set_data_string_n(data1_handle dh, data1_node *res, NMEM m, const char *str, size_t len)
int data1_doespec1(data1_handle dh, data1_node *n, Z_Espec1 *e)
@ DATA1_XPATH_INDEXING_ENABLE
@ DATA1_XPATH_INDEXING_DISABLE
data1_vartype * data1_getvartypeby_absyn(data1_handle dh, data1_absyn *absyn, char *zclass, char *type)
void data1_remove_idzebra_subtree(data1_handle dh, data1_node *n)
data1_node * data1_mk_preprocess_n(data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at)
struct data1_handle_info * data1_handle
data1_node * data1_mk_tag_data_oid(data1_handle dh, data1_node *at, const char *tag, Odr_oid *oid, NMEM nmem)
data1_vartype * data1_getvartypebyct(data1_handle dh, data1_varset *set, const char *zclass, const char *type)
const char * data1_get_encoding(data1_handle dh, data1_node *n)
data1_marctab * data1_absyn_getmarctab(data1_handle dh, data1_node *root)
const char * data1_systag_lookup(data1_absyn *absyn, const char *tag, const char *default_value)
data1_absyn_cache * data1_absyn_cache_get(data1_handle dh)
data1_node * data1_mk_text(data1_handle dh, NMEM mem, const char *buf, data1_node *parent)
data1_node * data1_mk_tag_data_int(data1_handle dh, data1_node *at, const char *tag, int num, NMEM nmem)
int data1_is_xmlmode(data1_handle dh)
void data1_set_root(data1_handle dh, data1_node *res, NMEM nmem, const char *name)
struct data1_vartype data1_vartype
struct data1_maptab data1_maptab
data1_attset_child * next
data1_attset_child * children
data1_termlist * termlists
struct data1_element * next
struct data1_element * children
struct data1_hash_table * hash
struct data1_esetname * next
struct data1_maptab * next
struct data1_maptag * next
union data1_maptag::@0 value
int length_implementation
int force_indicator_length
char implementation_codes[5]
int force_identifier_length
struct data1_marctab * next
char lbuf[DATA1_LOCALDATA]
struct data1_node::@2::@7 preprocess
struct data1_node::@2::@3 root
struct data1_node * parent
struct data1_node * child
unsigned make_variantlist
struct data1_node * last_child
struct data1_absyn * absyn
struct data1_node::@2::@6 variant
struct data1_sub_elements * next
struct data1_tagset * tagset
union data1_tag::@1 value
struct data1_termlist * next
struct data1_varset * set
struct data1_varclass * next
struct data1_vartype * next
struct data1_varclass * zclass
struct data1_xattr * next