YAZ
5.34.0
|
Render Z39.50 records (NamePlusRecord) More...
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <yaz/marcdisp.h>
#include <yaz/record_render.h>
#include <yaz/yaz-iconv.h>
#include <yaz/proto.h>
#include <yaz/oid_db.h>
#include <yaz/nmem_xml.h>
#include <yaz/base64.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
Go to the source code of this file.
Functions | |
static yaz_iconv_t | iconv_create_charset (const char *record_charset, yaz_iconv_t *cd2, const char *marc_buf, int sz) |
static const char * | return_marc_record (WRBUF wrbuf, int marc_type, int *len, const char *buf, int sz, const char *record_charset) |
static const char * | return_opac_record (WRBUF wrbuf, int marc_type, int *len, Z_OPACRecord *opac_rec, const char *record_charset) |
static const char * | return_string_record (WRBUF wrbuf, int *len, const char *buf, int sz, const char *record_charset) |
static const char * | return_record_wrbuf (WRBUF wrbuf, int *len, Z_NamePlusRecord *npr, int marctype, const char *charset) |
static const char * | get_record_format (WRBUF wrbuf, int *len, Z_NamePlusRecord *npr, int marctype, const char *charset, const char *format) |
static int | replace_node (NMEM nmem, xmlNode *ptr, const char *type_spec, char *record_buf) |
static const char * | base64_render (NMEM nmem, WRBUF wrbuf, const char *buf, int *len, const char *expr, const char *type_spec) |
const char * | yaz_record_render (Z_NamePlusRecord *npr, const char *schema, WRBUF wrbuf, const char *type_spec, int *len) |
render records (ZOOM style) More... | |
Render Z39.50 records (NamePlusRecord)
Definition in file record_render.c.
|
static |
Definition at line 292 of file record_render.c.
References nmem_malloc(), nmem_text_node_cdata(), replace_node(), wrbuf_cstr(), wrbuf_rewind(), wrbuf_write(), and yaz_base64decode().
Referenced by yaz_record_render().
|
static |
Definition at line 220 of file record_render.c.
References return_record_wrbuf(), wrbuf_cstr(), wrbuf_len, wrbuf_rewind(), and wrbuf_write().
Referenced by yaz_record_render().
|
static |
Definition at line 30 of file record_render.c.
References yaz_iconv_open(), and yaz_marc_check_marc21_coding().
Referenced by return_marc_record(), return_opac_record(), and return_string_record().
|
static |
Definition at line 251 of file record_render.c.
References atoi_n_check(), Z_NamePlusRecord::databaseRecord, odr_createmem(), odr_destroy(), ODR_ENCODE, odr_malloc(), Z_NamePlusRecord::u, Z_NamePlusRecord::which, wrbuf_alloc(), wrbuf_destroy(), yaz_record_render(), z_ext_record_usmarc(), z_ext_record_xml(), and Z_NamePlusRecord_databaseRecord.
Referenced by base64_render().
|
static |
Definition at line 82 of file record_render.c.
References iconv_create_charset(), wrbuf_cstr(), wrbuf_len, yaz_iconv_close(), yaz_marc_create(), yaz_marc_decode_wrbuf(), yaz_marc_destroy(), yaz_marc_iconv(), and yaz_marc_xml().
Referenced by return_record_wrbuf().
|
static |
Definition at line 106 of file record_render.c.
References Z_OPACRecord::bibliographicRecord, odr_oct::buf, iconv_create_charset(), odr_oct::len, Z_External::octet_aligned, Z_External::u, Z_External::which, wrbuf_cstr(), wrbuf_len, yaz_iconv_close(), yaz_marc_create(), yaz_marc_destroy(), yaz_marc_iconv(), yaz_marc_xml(), yaz_opac_decode_wrbuf(), yaz_opac_decode_wrbuf2(), and Z_External_octet.
Referenced by return_record_wrbuf().
|
static |
Definition at line 167 of file record_render.c.
References odr_oct::buf, Z_NamePlusRecord::databaseRecord, Z_External::direct_reference, Z_External::grs1, odr_oct::len, Z_External::octet_aligned, oid_oidcmp(), Z_External::opac, return_marc_record(), return_opac_record(), return_string_record(), Z_External::sutrs, Z_External::u, Z_NamePlusRecord::u, Z_External::which, wrbuf_buf, wrbuf_len, wrbuf_rewind(), yaz_display_grs1(), YAZ_MARC_ISO2709, yaz_oid_is_iso2709(), yaz_oid_recsyn_application_xml, yaz_oid_recsyn_html, yaz_oid_recsyn_mab, yaz_oid_recsyn_xml, Z_External_grs1, Z_External_octet, Z_External_OPAC, and Z_External_sutrs.
Referenced by get_record_format().
|
static |
Definition at line 147 of file record_render.c.
References iconv_create_charset(), wrbuf_cstr(), wrbuf_iconv_reset(), wrbuf_iconv_write(), wrbuf_len, and yaz_iconv_close().
Referenced by return_record_wrbuf().
const char* yaz_record_render | ( | Z_NamePlusRecord * | npr, |
const char * | schema, | ||
WRBUF | wrbuf, | ||
const char * | type_spec, | ||
int * | len | ||
) |
render records (ZOOM style)
npr | record structure to be rendered (Z39.50) |
schema | for record (if known) |
wrbuf | Working WRBUF |
type_spec | format spec |
len | length of returned buffer |
!=0 | buffer |
=0 | record could not be rendered |
txml; charset=marc-8 xml; charset=utf-8 txml; charset=marc-8; base64=/rec/my/text()
Definition at line 355 of file record_render.c.
References base64_render(), Z_NamePlusRecord::databaseName, Z_NamePlusRecord::databaseRecord, Z_External::direct_reference, get_record_format(), nmem_create(), nmem_destroy(), nmem_malloc(), nmem_strdupn(), type, Z_NamePlusRecord::u, Z_External::which, Z_NamePlusRecord::which, YAZ_MARC_ISO2709, YAZ_MARC_JSON, YAZ_MARC_LINE, YAZ_MARC_MARCXML, YAZ_MARC_TURBOMARC, yaz_oid_std(), yaz_oid_to_string(), Z_External_OPAC, and Z_NamePlusRecord_databaseRecord.
Referenced by replace_node(), and ZOOM_record_get().