IDZEBRA  2.1.2
data1.h
Go to the documentation of this file.
1 /* This file is part of the Zebra server.
2  Copyright (C) Index Data
3 
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8 
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18 */
19 
20 #ifndef DATA1_H
21 #define DATA1_H
22 
23 #include <stdio.h>
24 
25 #include <yaz/nmem.h>
26 #include <yaz/proto.h>
27 #include <yaz/yaz-util.h>
28 
29 #include <idzebra/util.h>
30 
31 #define d1_isspace(c) strchr(" \r\n\t\f", c)
32 #define d1_isdigit(c) ((c) <= '9' && (c) >= '0')
33 
34 YAZ_BEGIN_CDECL
35 
36 #define data1_matchstr(s1, s2) yaz_matchstr(s1, s2)
37 
38 #define DATA1_MAX_SYMBOL 31
39 
40 /*
41  * This structure describes a attset, perhaps made up by inclusion
42  * (supersetting) of other attribute sets. When indexing and searching,
43  * we perform a normalisation, where we associate a given tag with
44  * the set that originally defined it, rather than the superset. This
45  * allows the most flexible access. Eg, the tags common to GILS and BIB-1
46  * should be searchable by both names.
47  */
48 
49 struct data1_attset;
50 
51 typedef struct data1_attset data1_attset;
52 typedef struct data1_att data1_att;
54 
55 struct data1_att
56 {
57  data1_attset *parent; /* attribute set */
58  char *name; /* symbolic name of this attribute */
59  int value; /* attribute value */
61 };
62 
66 };
67 
69 {
70  char *name; /* symbolic name */
71  Odr_oid *oid; /* attribute set OID */
72  data1_att *atts; /* attributes */
73  data1_attset_child *children; /* included attset */
74  data1_attset *next; /* next in cache */
75 };
76 
78 
79 YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
80  const char *name);
81 YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
82 
83 YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
84 
85 typedef struct data1_maptag
86 {
87  int new_field;
88  int type;
89 #define D1_MAPTAG_numeric 1
90 #define D1_MAPTAG_string 2
91  int which;
92  union
93  {
94  int numeric;
95  char *string;
96  } value;
97  struct data1_maptag *next;
98 } data1_maptag;
99 
101 
102 typedef struct data1_maptab
103 {
104  char *name;
105  Odr_oid *oid; /* target abstract syntax */
109 } data1_maptab;
110 
111 
112 typedef struct data1_name
113 {
114  char *name;
115  struct data1_name *next;
116 } data1_name;
117 
120 typedef struct data1_absyn data1_absyn;
121 
122 typedef enum data1_datatype
123 {
136 
137 typedef struct data1_marctab
138 {
139  char *name;
140  Odr_oid *oid; /* MARC OID */
141 
142  char record_status[2];
143  char implementation_codes[5];
146  char user_systems[4];
147 
151  char future_use[2];
152 
155  char leader[24]; /* Fixme! Need linear access to LEADER of MARC record */
157 } data1_marctab;
158 
159 typedef struct data1_esetname
160 {
161  char *name;
162  Z_Espec1 *spec;
165 
166 /*
167  * Variant set definitions.
168  */
169 
170 typedef struct data1_vartype
171 {
172  char *name;
174  int type;
177 } data1_vartype;
178 
179 typedef struct data1_varclass
180 {
181  char *name;
182  struct data1_varset *set;
183  int zclass;
187 
188 typedef struct data1_varset
189 {
190  char *name;
191  Odr_oid *oid; /* variant OID */
193 } data1_varset;
194 
195 /*
196  * Tagset definitions
197  */
198 
199 struct data1_tagset;
200 
201 typedef struct data1_tag
202 {
204 #define DATA1T_numeric 1
205 #define DATA1T_string 2
206  int which;
207  union
208  {
209  int numeric;
210  char *string;
211  } value;
213 
215  struct data1_tag *next;
216 } data1_tag;
217 
218 typedef struct data1_tagset data1_tagset;
219 
221 {
222  int type; /* type of tagset in current context */
223  char *name; /* symbolic name */
224  Odr_oid *oid; /* variant OID */
225  data1_tag *tags; /* tags defined by this set */
226  data1_tagset *children; /* children */
227  data1_tagset *next; /* sibling */
228 };
229 
230 typedef struct data1_termlist
231 {
232  char *index_name;
233  char *structure;
234  char *source;
237 
238 /*
239  * abstract syntax specification
240  */
241 
242 typedef struct data1_element
243 {
244  char *name;
247  char *sub_name;
251 } data1_element;
252 
253 typedef struct data1_sub_elements {
254  char *name;
258 
259 typedef struct data1_xattr {
260  char *name;
261  char *value;
262  struct data1_xattr *next;
263  unsigned short what; /* DATA1I_text, .. see data1_node.u.data */
264 } data1_xattr;
265 
266 
267 /*
268  * record data node (tag/data/variant)
269  */
270 
271 typedef struct data1_node
272 {
273  /* the root of a record (containing global data) */
274 #define DATA1N_root 1
275  /* a tag */
276 #define DATA1N_tag 2
277  /* some data under a leaf tag or variant */
278 #define DATA1N_data 3
279  /* variant specification (a triple, actually) */
280 #define DATA1N_variant 4
281  /* comment (same as data) */
282 #define DATA1N_comment 5
283  /* preprocessing instruction */
284 #define DATA1N_preprocess 6
285  int which;
286  union
287  {
288  struct
289  {
290  char *type;
291  struct data1_absyn *absyn; /* abstract syntax for this type */
292  } root;
293 
294  struct
295  {
296  char *tag;
300  unsigned node_selected : 1;
301  unsigned make_variantlist : 1;
303  } tag;
304 
305  struct
306  {
307  char *data; /* filename or data */
308  int len;
309  /* text inclusion */
310 #define DATA1I_inctxt 1
311  /* binary data inclusion */
312 #define DATA1I_incbin 2
313  /* text data */
314 #define DATA1I_text 3
315  /* numerical data */
316 #define DATA1I_num 4
317  /* object identifier */
318 #define DATA1I_oid 5
319  /* XML text */
320 #define DATA1I_xmltext 6
321  unsigned what:7;
322  unsigned formatted_text : 1; /* newlines are significant */
323  } data;
324 
325  struct
326  {
328  char *value;
329  } variant;
330 
331  struct
332  {
333  char *target;
334  data1_xattr *attributes;
335  } preprocess;
336  } u;
337 
338 #define DATA1_LOCALDATA 12
339  char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
340  struct data1_node *next;
341  struct data1_node *child;
344  struct data1_node *root;
345 } data1_node;
346 
350 };
351 
352 YAZ_EXPORT data1_handle data1_create (void);
353 
354 
355 YAZ_EXPORT void data1_destroy(data1_handle dh);
356 YAZ_EXPORT data1_node *get_parent_tag(data1_handle dh, data1_node *n);
357 YAZ_EXPORT data1_node *data1_read_node(data1_handle dh, const char **buf,
358  NMEM m);
359 YAZ_EXPORT data1_node *data1_read_nodex (data1_handle dh, NMEM m,
360  int (*get_byte)(void *fh), void *fh,
361  WRBUF wrbuf);
362 YAZ_EXPORT data1_node *data1_read_record(data1_handle dh,
363  int (*rf)(void *, char *, size_t),
364  void *fh, NMEM m);
365 
366 YAZ_EXPORT void data1_remove_node (data1_handle dh, data1_node *n);
367 YAZ_EXPORT void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n);
368 YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
369  data1_tagset *s,
370  int type, int value);
371 YAZ_EXPORT data1_tagset *data1_empty_tagset (data1_handle dh);
372 YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh,
373  const char *file,
374  int type);
375 YAZ_EXPORT data1_element *data1_getelementbytagname(data1_handle dh,
376  data1_absyn *abs,
378  const char *tagname);
379 YAZ_EXPORT Z_GenericRecord *data1_nodetogr(data1_handle dh, data1_node *n,
380  int select, ODR o,
381  int *len);
382 YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
383  const char *name);
384 YAZ_EXPORT char *data1_nodetobuf(data1_handle dh, data1_node *n,
385  int select, int *len);
386 YAZ_EXPORT data1_node *data1_mk_tag_data_wd(data1_handle dh,
387  data1_node *at,
388  const char *tagname, NMEM m);
389 YAZ_EXPORT data1_node *data1_mk_tag_data(data1_handle dh, data1_node *at,
390  const char *tagname, NMEM m);
391 YAZ_EXPORT data1_datatype data1_maptype(data1_handle dh, char *t);
392 YAZ_EXPORT data1_varset *data1_read_varset(data1_handle dh, const char *file);
393 YAZ_EXPORT data1_vartype *data1_getvartypebyct(data1_handle dh,
394  data1_varset *set,
395  const char *zclass,
396  const char *type);
397 YAZ_EXPORT data1_vartype *data1_getvartypeby_absyn(data1_handle dh,
399  char *zclass, char *type);
400 YAZ_EXPORT Z_Espec1 *data1_read_espec1(data1_handle dh, const char *file);
401 YAZ_EXPORT int data1_doespec1(data1_handle dh, data1_node *n, Z_Espec1 *e);
402 YAZ_EXPORT data1_esetname *data1_getesetbyname(data1_handle dh,
403  data1_absyn *a,
404  const char *name);
405 YAZ_EXPORT data1_element *data1_getelementbyname(data1_handle dh,
407  const char *name);
408 YAZ_EXPORT data1_node *data1_mk_node2(data1_handle dh, NMEM m,
409  int type, data1_node *parent);
410 
411 YAZ_EXPORT data1_node *data1_mk_tag (data1_handle dh, NMEM nmem,
412  const char *tag, const char **attr,
413  data1_node *at);
414 YAZ_EXPORT data1_node *data1_mk_tag_n (data1_handle dh, NMEM nmem,
415  const char *tag, size_t len,
416  const char **attr,
417  data1_node *at);
418 YAZ_EXPORT void data1_tag_add_attr (data1_handle dh, NMEM nmem,
419  data1_node *res, const char **attr);
420 
421 YAZ_EXPORT data1_node *data1_mk_text_n (data1_handle dh, NMEM mem,
422  const char *buf, size_t len,
423  data1_node *parent);
424 YAZ_EXPORT data1_node *data1_mk_text_nf (data1_handle dh, NMEM mem,
425  const char *buf, size_t len,
426  data1_node *parent);
427 YAZ_EXPORT data1_node *data1_mk_text (data1_handle dh, NMEM mem,
428  const char *buf, data1_node *parent);
429 
430 YAZ_EXPORT data1_node *data1_mk_comment_n (data1_handle dh, NMEM mem,
431  const char *buf, size_t len,
432  data1_node *parent);
433 
434 YAZ_EXPORT data1_node *data1_mk_comment (data1_handle dh, NMEM mem,
435  const char *buf, data1_node *parent);
436 
437 YAZ_EXPORT data1_node *data1_mk_preprocess_n (data1_handle dh, NMEM nmem,
438  const char *target, size_t len,
439  const char **attr,
440  data1_node *at);
441 
442 YAZ_EXPORT data1_node *data1_mk_preprocess (data1_handle dh, NMEM nmem,
443  const char *target,
444  const char **attr,
445  data1_node *at);
446 
447 YAZ_EXPORT data1_node *data1_insert_preprocess_n (data1_handle dh, NMEM nmem,
448  const char *target,
449  size_t len,
450  const char **attr,
451  data1_node *at);
452 
453 YAZ_EXPORT data1_node *data1_insert_preprocess (data1_handle dh, NMEM nmem,
454  const char *target,
455  const char **attr,
456  data1_node *at);
457 
458 YAZ_EXPORT data1_node *data1_mk_root (data1_handle dh, NMEM nmem,
459  const char *name);
460 YAZ_EXPORT void data1_set_root(data1_handle dh, data1_node *res,
461  NMEM nmem, const char *name);
462 
463 YAZ_EXPORT data1_node *data1_mk_tag_data_zint (data1_handle dh, data1_node *at,
464  const char *tag, zint num,
465  NMEM nmem);
466 YAZ_EXPORT data1_node *data1_mk_tag_data_int (data1_handle dh, data1_node *at,
467  const char *tag, int num,
468  NMEM nmem);
469 YAZ_EXPORT data1_node *data1_mk_tag_data_oid (data1_handle dh, data1_node *at,
470  const char *tag, Odr_oid *oid,
471  NMEM nmem);
472 YAZ_EXPORT data1_node *data1_mk_tag_data_text (data1_handle dh, data1_node *at,
473  const char *tag,
474  const char *str,
475  NMEM nmem);
476 YAZ_EXPORT data1_node *data1_mk_tag_data_text_uni (data1_handle dh,
477  data1_node *at,
478  const char *tag,
479  const char *str,
480  NMEM nmem);
481 
482 YAZ_EXPORT data1_absyn *data1_get_absyn (data1_handle dh, const char *name,
483  enum DATA1_XPATH_INDEXING en);
484 
485 YAZ_EXPORT data1_node *data1_search_tag (data1_handle dh, data1_node *n,
486  const char *tag);
487 YAZ_EXPORT data1_node *data1_mk_tag_uni (data1_handle dh, NMEM nmem,
488  const char *tag, data1_node *at);
489 YAZ_EXPORT data1_attset *data1_get_attset (data1_handle dh, const char *name);
490 YAZ_EXPORT data1_maptab *data1_read_maptab(data1_handle dh, const char *file);
491 YAZ_EXPORT data1_node *data1_map_record(data1_handle dh, data1_node *n,
492  data1_maptab *map, NMEM m);
493 YAZ_EXPORT data1_marctab *data1_read_marctab (data1_handle dh,
494  const char *file);
495 YAZ_EXPORT data1_marctab *data1_absyn_getmarctab(data1_handle dh,
496  data1_node *root);
497 YAZ_EXPORT data1_element *data1_absyn_getelements(data1_handle dh,
498  data1_node *root);
499 YAZ_EXPORT char *data1_nodetomarc(data1_handle dh, data1_marctab *p,
500  data1_node *n, int selected, int *len);
501 YAZ_EXPORT char *data1_nodetoidsgml(data1_handle dh, data1_node *n,
502  int select, int *len);
503 YAZ_EXPORT Z_ExplainRecord *data1_nodetoexplain(data1_handle dh,
504  data1_node *n, int select,
505  ODR o);
506 YAZ_EXPORT Z_BriefBib *data1_nodetosummary(data1_handle dh,
507  data1_node *n, int select,
508  ODR o);
509 YAZ_EXPORT char *data1_nodetosoif(data1_handle dh, data1_node *n, int select,
510  int *len);
511 YAZ_EXPORT void data1_set_tabpath(data1_handle dh, const char *path);
512 YAZ_EXPORT void data1_set_tabroot (data1_handle dp, const char *p);
513 YAZ_EXPORT const char *data1_get_tabpath(data1_handle dh);
514 YAZ_EXPORT const char *data1_get_tabroot(data1_handle dh);
515 
516 YAZ_EXPORT WRBUF data1_get_wrbuf (data1_handle dp);
517 YAZ_EXPORT char **data1_get_read_buf (data1_handle dp, int **lenp);
518 YAZ_EXPORT char **data1_get_map_buf (data1_handle dp, int **lenp);
519 YAZ_EXPORT data1_absyn_cache *data1_absyn_cache_get (data1_handle dh);
520 YAZ_EXPORT data1_attset_cache *data1_attset_cache_get (data1_handle dh);
521 YAZ_EXPORT NMEM data1_nmem_get (data1_handle dh);
522 YAZ_EXPORT void data1_pr_tree (data1_handle dh, data1_node *n, FILE *out);
523 YAZ_EXPORT char *data1_insert_string (data1_handle dh, data1_node *res,
524  NMEM m, const char *str);
525 YAZ_EXPORT char *data1_insert_string_n (data1_handle dh, data1_node *res,
526  NMEM m, const char *str, size_t len);
527 YAZ_EXPORT data1_node *data1_read_sgml (data1_handle dh, NMEM m,
528  const char *buf);
529 YAZ_EXPORT data1_node *data1_read_xml (data1_handle dh,
530  int (*rf)(void *, char *, size_t),
531  void *fh, NMEM m);
532 YAZ_EXPORT void data1_absyn_trav (data1_handle dh, void *handle,
533  void (*fh)(data1_handle dh,
534  void *h, data1_absyn *a));
535 
536 YAZ_EXPORT data1_attset *data1_attset_search_id (data1_handle dh,
537  const Odr_oid *oid);
538 
539 YAZ_EXPORT char *data1_getNodeValue(data1_node* node, char* pTagPath);
540 YAZ_EXPORT data1_node *data1_LookupNode(data1_node* node, char* pTagPath);
541 YAZ_EXPORT int data1_CountOccurences(data1_node* node, char* pTagPath);
542 
543 YAZ_EXPORT FILE *data1_path_fopen (data1_handle dh, const char *file,
544  const char *mode);
545 
546 /* obsolete functions ... */
547 
548 YAZ_EXPORT data1_node *data1_mk_node (data1_handle dh, NMEM m);
549 YAZ_EXPORT data1_node *data1_insert_taggeddata (data1_handle dh,
550  data1_node *root,
551  data1_node *at,
552  const char *tagname, NMEM m);
553 YAZ_EXPORT data1_node *data1_mk_node_type (data1_handle dh, NMEM m, int type);
554 YAZ_EXPORT data1_node *data1_add_taggeddata (data1_handle dh, data1_node *root,
555  data1_node *at,
556  const char *tagname,
557  NMEM m);
558 
559 YAZ_EXPORT data1_node *data1_get_root_tag (data1_handle dh, data1_node *n);
560 
561 YAZ_EXPORT int data1_iconv (data1_handle dh, NMEM m, data1_node *n,
562  const char *tocode,
563  const char *fromcode);
564 
565 YAZ_EXPORT const char *data1_get_encoding (data1_handle dh, data1_node *n);
566 
567 YAZ_EXPORT int data1_is_xmlmode(data1_handle dh);
568 
569 YAZ_EXPORT const char *data1_systag_lookup(data1_absyn *absyn, const char *tag,
570  const char *default_value);
571 
572 YAZ_EXPORT void data1_concat_text(data1_handle dh, NMEM m, data1_node *n);
573 YAZ_EXPORT void data1_chop_text(data1_handle dh, NMEM m, data1_node *n);
574 
575 YAZ_EXPORT void data1_absyn_destroy(data1_handle dh);
576 
577 YAZ_EXPORT const char *data1_absyn_get_staticrank(data1_absyn *absyn);
578 
579 YAZ_END_CDECL
580 
581 #endif
582 /*
583  * Local variables:
584  * c-basic-offset: 4
585  * c-file-style: "Stroustrup"
586  * indent-tabs-mode: nil
587  * End:
588  * vim: shiftwidth=4 tabstop=8 expandtab
589  */
590 
int identifier_length
Definition: data1.h:145
int force_indicator_length
Definition: data1.h:153
data1_node * data1_read_xml(data1_handle dh, int(*rf)(void *, char *, size_t), void *fh, NMEM m)
data1_datatype kind
Definition: data1.h:212
Odr_oid * oid
Definition: data1.h:224
data1_tag * data1_gettagbynum(data1_handle dh, data1_tagset *s, int type, int value)
Definition: d1_tagset.c:64
data1_name * names
Definition: data1.h:203
char * name
Definition: data1.h:104
data1_node * data1_mk_comment_n(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
Definition: d1_read.c:355
char * structure
Definition: data1.h:233
data1_node * data1_read_nodex(data1_handle dh, NMEM m, int(*get_byte)(void *fh), void *fh, WRBUF wrbuf)
Definition: d1_read.c:660
data1_absyn * data1_get_absyn(data1_handle dh, const char *name, enum DATA1_XPATH_INDEXING en)
Definition: d1_absyn.c:230
char ** data1_get_read_buf(data1_handle dp, int **lenp)
Definition: d1_handle.c:111
data1_node * data1_mk_root(data1_handle dh, NMEM nmem, const char *name)
Definition: d1_read.c:173
struct data1_sub_elements * next
Definition: data1.h:255
int data1_iconv(data1_handle dh, NMEM m, data1_node *n, const char *tocode, const char *fromcode)
Definition: d1_read.c:1088
struct data1_node data1_node
struct data1_attset_cache_info * data1_attset_cache
Definition: data1.h:119
char * name
Definition: data1.h:190
Z_BriefBib * data1_nodetosummary(data1_handle dh, data1_node *n, int select, ODR o)
Definition: d1_sumout.c:54
struct data1_maptag * next
Definition: data1.h:97
data1_node * data1_read_sgml(data1_handle dh, NMEM m, const char *buf)
Definition: d1_read.c:1000
char * name
Definition: data1.h:70
Odr_oid * oid
Definition: data1.h:191
struct data1_termlist data1_termlist
int which
Definition: data1.h:91
struct data1_maptab data1_maptab
char * name
Definition: data1.h:260
Z_GenericRecord * data1_nodetogr(data1_handle dh, data1_node *n, int select, ODR o, int *len)
Definition: d1_grs.c:376
data1_node * data1_mk_tag_data_oid(data1_handle dh, data1_node *at, const char *tag, Odr_oid *oid, NMEM nmem)
Definition: d1_read.c:480
int force_identifier_length
Definition: data1.h:154
data1_varset * data1_read_varset(data1_handle dh, const char *file)
Definition: d1_varset.c:56
data1_node * data1_mk_tag_data_text(data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem)
Definition: d1_read.c:506
struct data1_xattr data1_xattr
data1_node * data1_mk_preprocess(data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at)
Definition: d1_read.c:218
data1_vartype * data1_getvartypebyct(data1_handle dh, data1_varset *set, const char *zclass, const char *type)
Definition: d1_varset.c:30
int value
Definition: data1.h:59
data1_tag * tags
Definition: data1.h:225
struct data1_tag data1_tag
data1_node * data1_mk_tag_n(data1_handle dh, NMEM nmem, const char *tag, size_t len, const char **attr, data1_node *at)
Definition: d1_read.c:258
int new_field
Definition: data1.h:87
struct data1_marctab * next
Definition: data1.h:156
char * index_name
Definition: data1.h:232
struct data1_xattr * next
Definition: data1.h:262
void data1_absyn_destroy(data1_handle dh)
Definition: d1_absyn.c:176
int indicator_length
Definition: data1.h:144
struct data1_varclass data1_varclass
void data1_pr_tree(data1_handle dh, data1_node *n, FILE *out)
Definition: d1_prtree.c:134
data1_att * next
Definition: data1.h:60
int no_data_requested
Definition: data1.h:298
struct data1_node * last_child
Definition: data1.h:342
data1_attset * data1_read_attset(data1_handle dh, const char *file)
Definition: d1_attset.c:63
data1_maptab * data1_read_maptab(data1_handle dh, const char *file)
Definition: d1_map.c:42
data1_vartype * types
Definition: data1.h:184
char * value
Definition: data1.h:261
data1_datatype datatype
Definition: data1.h:175
Odr_oid * oid
Definition: data1.h:71
data1_node * data1_mk_tag_uni(data1_handle dh, NMEM nmem, const char *tag, data1_node *at)
Definition: d1_read.c:319
struct data1_varclass * next
Definition: data1.h:185
data1_node * data1_get_root_tag(data1_handle dh, data1_node *n)
Definition: d1_read.c:35
struct data1_marctab data1_marctab
int length_data_entry
Definition: data1.h:148
data1_node * data1_mk_tag_data_zint(data1_handle dh, data1_node *at, const char *tag, zint num, NMEM nmem)
Definition: d1_read.c:457
struct data1_varclass * zclass
Definition: data1.h:173
struct data1_varset data1_varset
char * name
Definition: data1.h:114
data1_node * data1_mk_text_nf(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
Definition: d1_read.c:341
char * target
Definition: data1.h:333
struct data1_element * children
Definition: data1.h:248
data1_att * atts
Definition: data1.h:72
char * name
Definition: data1.h:244
Z_Espec1 * spec
Definition: data1.h:162
data1_termlist * termlists
Definition: data1.h:246
FILE * data1_path_fopen(data1_handle dh, const char *file, const char *mode)
Definition: d1_handle.c:151
data1_node * data1_mk_tag(data1_handle dh, NMEM nmem, const char *tag, const char **attr, data1_node *at)
Definition: d1_read.c:294
data1_datatype data1_maptype(data1_handle dh, char *t)
Definition: d1_tagset.c:36
data1_element * data1_absyn_getelements(data1_handle dh, data1_node *root)
Definition: d1_absyn.c:669
int type
Definition: data1.h:88
Z_ExplainRecord * data1_nodetoexplain(data1_handle dh, data1_node *n, int select, ODR o)
Definition: d1_expout.c:1349
struct data1_absyn_cache_info * data1_absyn_cache
Definition: data1.h:118
char * name
Definition: data1.h:172
int type
Definition: data1.h:174
struct data1_element data1_element
data1_node * data1_insert_taggeddata(data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m)
Definition: d1_read.c:443
const char * data1_get_encoding(data1_handle dh, data1_node *n)
Definition: d1_read.c:1069
WRBUF data1_get_wrbuf(data1_handle dp)
Definition: d1_handle.c:106
int numeric
Definition: data1.h:94
int numeric
Definition: data1.h:209
struct data1_tagset * tagset
Definition: data1.h:214
const char * data1_absyn_get_staticrank(data1_absyn *absyn)
int data1_doespec1(data1_handle dh, data1_node *n, Z_Espec1 *e)
Definition: d1_doespec.c:356
data1_attset * data1_attset_search_id(data1_handle dh, const Odr_oid *oid)
Definition: d1_absyn.c:253
char * data1_nodetobuf(data1_handle dh, data1_node *n, int select, int *len)
Definition: d1_sutrs.c:141
data1_node * data1_mk_node2(data1_handle dh, NMEM m, int type, data1_node *parent)
Definition: d1_read.c:145
data1_handle data1_create(void)
Definition: d1_handle.c:48
data1_node * data1_mk_node(data1_handle dh, NMEM m)
Definition: d1_read.c:70
data1_element * elements
Definition: data1.h:256
char * name
Definition: data1.h:161
struct data1_maptag data1_maptag
char * tag
Definition: data1.h:296
char ** data1_get_map_buf(data1_handle dp, int **lenp)
Definition: d1_handle.c:118
void data1_destroy(data1_handle dh)
Definition: d1_handle.c:81
char * data1_insert_string_n(data1_handle dh, data1_node *res, NMEM m, const char *str, size_t len)
Definition: d1_read.c:373
data1_node * get_parent_tag(data1_handle dh, data1_node *n)
Definition: d1_read.c:52
Z_Espec1 * data1_read_espec1(data1_handle dh, const char *file)
Definition: d1_espec.c:213
data1_node * data1_mk_comment(data1_handle dh, NMEM mem, const char *buf, data1_node *parent)
Definition: d1_read.c:367
data1_datatype
Definition: data1.h:122
struct data1_sub_elements data1_sub_elements
struct data1_termlist * next
Definition: data1.h:235
struct data1_node::@2::@3 root
char * data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, int selected, int *len)
Definition: d1_marc.c:468
data1_attset * child
Definition: data1.h:64
data1_vartype * type
Definition: data1.h:327
data1_node * data1_map_record(data1_handle dh, data1_node *n, data1_maptab *map, NMEM m)
Definition: d1_map.c:324
struct data1_esetname * next
Definition: data1.h:163
data1_attset_cache * data1_attset_cache_get(data1_handle dh)
Definition: d1_handle.c:76
void data1_set_tabroot(data1_handle dp, const char *p)
Definition: d1_handle.c:133
struct data1_node * child
Definition: data1.h:341
struct data1_name data1_name
const char * data1_systag_lookup(data1_absyn *absyn, const char *tag, const char *default_value)
Definition: d1_absyn.c:611
data1_attset_child * children
Definition: data1.h:73
struct data1_vartype data1_vartype
data1_tagset * next
Definition: data1.h:227
data1_node * data1_mk_tag_data_int(data1_handle dh, data1_node *at, const char *tag, int num, NMEM nmem)
Definition: d1_read.c:473
char * string
Definition: data1.h:95
char * data1_insert_string(data1_handle dh, data1_node *res, NMEM m, const char *str)
Definition: d1_read.c:386
data1_node * data1_mk_node_type(data1_handle dh, NMEM m, int type)
Definition: d1_read.c:75
data1_marctab * data1_read_marctab(data1_handle dh, const char *file)
Definition: d1_marc.c:37
int zclass
Definition: data1.h:183
data1_node * data1_mk_preprocess_n(data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at)
Definition: d1_read.c:226
struct data1_absyn * absyn
Definition: data1.h:291
data1_attset * data1_empty_attset(data1_handle dh)
Definition: d1_attset.c:50
char * data1_nodetoidsgml(data1_handle dh, data1_node *n, int select, int *len)
Definition: d1_write.c:230
int get_bytes
Definition: data1.h:299
data1_element * element
Definition: data1.h:297
int which
Definition: data1.h:206
data1_esetname * data1_getesetbyname(data1_handle dh, data1_absyn *a, const char *name)
Definition: d1_absyn.c:297
data1_node * data1_mk_text(data1_handle dh, NMEM mem, const char *buf, data1_node *parent)
Definition: d1_read.c:349
int which
Definition: data1.h:285
struct data1_node * parent
Definition: data1.h:343
void data1_tag_add_attr(data1_handle dh, NMEM nmem, data1_node *res, const char **attr)
Definition: d1_read.c:285
void data1_set_root(data1_handle dh, data1_node *res, NMEM nmem, const char *name)
Definition: d1_read.c:190
data1_element * data1_getelementbytagname(data1_handle dh, data1_absyn *abs, data1_element *parent, const char *tagname)
Definition: d1_absyn.c:311
void data1_remove_node(data1_handle dh, data1_node *n)
Definition: d1_utils.c:31
void data1_set_tabpath(data1_handle dh, const char *path)
Definition: d1_handle.c:125
int length_starting
Definition: data1.h:149
Odr_oid * oid
Definition: data1.h:105
int data1_CountOccurences(data1_node *node, char *pTagPath)
Count the number of occurences of the last instance on a tagpath.
Definition: d1_if.c:253
data1_node * data1_mk_tag_data_wd(data1_handle dh, data1_node *at, const char *tagname, NMEM m)
Definition: d1_read.c:437
data1_node * data1_insert_preprocess(data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at)
Definition: d1_read.c:238
data1_marctab * data1_absyn_getmarctab(data1_handle dh, data1_node *root)
Definition: d1_absyn.c:662
data1_xattr * attributes
Definition: data1.h:302
struct data1_element * next
Definition: data1.h:249
data1_mapunit * map
Definition: data1.h:107
int type
Definition: data1.h:222
data1_varclass * classes
Definition: data1.h:192
unsigned short what
Definition: data1.h:263
data1_node * data1_LookupNode(data1_node *node, char *pTagPath)
Definition: d1_if.c:115
long zint
Zebra integer.
Definition: util.h:66
data1_att * data1_getattbyname(data1_handle dh, data1_attset *s, const char *name)
Definition: d1_attset.c:31
char * name
Definition: data1.h:223
struct data1_node * next
Definition: data1.h:340
char * data
Definition: data1.h:307
data1_vartype * data1_getvartypeby_absyn(data1_handle dh, data1_absyn *absyn, char *zclass, char *type)
Definition: d1_varset.c:50
data1_node * data1_read_node(data1_handle dh, const char **buf, NMEM m)
Definition: d1_read.c:956
struct data1_node * root
Definition: data1.h:344
data1_node * data1_mk_text_n(data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent)
Definition: d1_read.c:330
Odr_oid * oid
Definition: data1.h:140
data1_node * data1_insert_preprocess_n(data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at)
Definition: d1_read.c:246
int len
Definition: data1.h:308
char * source
Definition: data1.h:234
data1_attset_child * next
Definition: data1.h:65
data1_tag * data1_gettagbyname(data1_handle dh, data1_tagset *s, const char *name)
Definition: d1_tagset.c:84
int data1_is_xmlmode(data1_handle dh)
Definition: d1_handle.c:174
struct data1_esetname data1_esetname
char * sub_name
Definition: data1.h:247
data1_node * data1_mk_tag_data(data1_handle dh, data1_node *at, const char *tagname, NMEM m)
Definition: d1_read.c:425
char * name
Definition: data1.h:58
NMEM data1_nmem_get(data1_handle dh)
Definition: d1_handle.c:66
data1_node * data1_mk_tag_data_text_uni(data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem)
Definition: d1_read.c:522
char * data1_getNodeValue(data1_node *node, char *pTagPath)
Definition: d1_if.c:75
data1_tag * tag
Definition: data1.h:245
DATA1_XPATH_INDEXING
Definition: data1.h:347
void data1_remove_idzebra_subtree(data1_handle dh, data1_node *n)
Definition: d1_utils.c:65
data1_tagset * data1_empty_tagset(data1_handle dh)
Definition: d1_tagset.c:107
char * target_absyn_name
Definition: data1.h:106
data1_node * data1_add_taggeddata(data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m)
Definition: d1_read.c:450
struct data1_name * next
Definition: data1.h:115
data1_attset * data1_get_attset(data1_handle dh, const char *name)
Definition: d1_absyn.c:288
int length_implementation
Definition: data1.h:150
void data1_concat_text(data1_handle dh, NMEM m, data1_node *n)
Definition: d1_read.c:1137
char * type
Definition: data1.h:290
data1_element * data1_getelementbyname(data1_handle dh, data1_absyn *absyn, const char *name)
Definition: d1_absyn.c:360
data1_attset * next
Definition: data1.h:74
data1_attset * parent
Definition: data1.h:57
const char * data1_get_tabroot(data1_handle dh)
Definition: d1_handle.c:146
struct data1_vartype * next
Definition: data1.h:176
struct data1_hash_table * hash
Definition: data1.h:250
char * name
Definition: data1.h:181
data1_node * data1_search_tag(data1_handle dh, data1_node *n, const char *tag)
Definition: d1_read.c:300
struct data1_tag * next
Definition: data1.h:215
data1_absyn_cache * data1_absyn_cache_get(data1_handle dh)
Definition: d1_handle.c:71
struct data1_handle_info * data1_handle
Definition: data1.h:77
const char * data1_get_tabpath(data1_handle dh)
Definition: d1_handle.c:141
data1_node * data1_read_record(data1_handle dh, int(*rf)(void *, char *, size_t), void *fh, NMEM m)
Definition: d1_read.c:969
char * name
Definition: data1.h:139
data1_tagset * children
Definition: data1.h:226
#define DATA1_LOCALDATA
Definition: data1.h:338
struct data1_maptab * next
Definition: data1.h:108
void data1_chop_text(data1_handle dh, NMEM m, data1_node *n)
Definition: d1_read.c:1108
char * value
Definition: data1.h:328
char * data1_nodetosoif(data1_handle dh, data1_node *n, int select, int *len)
Definition: d1_soif.c:75
char * string
Definition: data1.h:210
void data1_absyn_trav(data1_handle dh, void *handle, void(*fh)(data1_handle dh, void *h, data1_absyn *a))
Definition: d1_absyn.c:198
data1_tagset * data1_read_tagset(data1_handle dh, const char *file, int type)
Definition: d1_tagset.c:120