IDZEBRA
2.2.7
|
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <yaz/diagbib1.h>
#include <yaz/tpath.h>
#include <yaz/oid_db.h>
#include <yaz/snprintf.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlIO.h>
#include <libxml/xmlreader.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include <idzebra/util.h>
#include <idzebra/recctrl.h>
Go to the source code of this file.
Data Structures | |
struct | filter_schema |
struct | filter_info |
Macros | |
#define | ZEBRA_SCHEMA_XSLT_NS "http://indexdata.dk/zebra/xslt/1" |
#define | XML_STRCMP(a, b) strcmp((char*)a, b) |
#define | XML_STRLEN(a) strlen((char*)a) |
#define | ENABLE_INPUT_CALLBACK 0 |
Functions | |
static void | set_param_str (const char **params, const char *name, const char *value, ODR odr) |
static void | set_param_int (const char **params, const char *name, zint value, ODR odr) |
static void * | filter_init (Res res, RecType recType) |
static int | attr_content (struct _xmlAttr *attr, const char *name, const char **dst_content) |
static void | destroy_schemas (struct filter_info *tinfo) |
static ZEBRA_RES | create_schemas (struct filter_info *tinfo, const char *fname) |
static struct filter_schema * | lookup_schema (struct filter_info *tinfo, const char *est) |
static ZEBRA_RES | filter_config (void *clientData, Res res, const char *args) |
static void | filter_destroy (void *clientData) |
static int | ioread_ex (void *context, char *buffer, int len) |
static int | ioclose_ex (void *context) |
static void | index_cdata (struct filter_info *tinfo, struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) |
static void | index_node (struct filter_info *tinfo, struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) |
static void | index_record (struct filter_info *tinfo, struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) |
static int | extract_doc (struct filter_info *tinfo, struct recExtractCtrl *p, xmlDocPtr doc) |
static int | extract_split (struct filter_info *tinfo, struct recExtractCtrl *p) |
static int | extract_full (struct filter_info *tinfo, struct recExtractCtrl *p) |
static int | filter_extract (void *clientData, struct recExtractCtrl *p) |
static int | ioread_ret (void *context, char *buffer, int len) |
static int | ioclose_ret (void *context) |
static int | filter_retrieve (void *clientData, struct recRetrieveCtrl *p) |
Variables | |
static const char * | zebra_xslt_ns = ZEBRA_SCHEMA_XSLT_NS |
static struct recType | filter_type |
RecType | idzebra_filter [] |
#define ENABLE_INPUT_CALLBACK 0 |
Definition at line 100 of file mod_alvis.c.
#define XML_STRCMP | ( | a, | |
b | |||
) | strcmp((char*)a, b) |
Definition at line 71 of file mod_alvis.c.
#define XML_STRLEN | ( | a | ) | strlen((char*)a) |
Definition at line 72 of file mod_alvis.c.
#define ZEBRA_SCHEMA_XSLT_NS "http://indexdata.dk/zebra/xslt/1" |
Definition at line 69 of file mod_alvis.c.
|
static |
Definition at line 152 of file mod_alvis.c.
References XML_STRCMP.
Referenced by create_schemas(), index_node(), and index_record().
|
static |
Definition at line 182 of file mod_alvis.c.
References attr_content(), filter_schema::default_schema, filter_info::doc, filter_info::fname, filter_info::full_name, filter_schema::identifier, filter_schema::name, filter_schema::next, filter_info::profile_path, filter_info::schemas, filter_info::split_level, filter_schema::stylesheet, filter_schema::stylesheet_xsp, XML_STRCMP, ZEBRA_FAIL, and ZEBRA_OK.
Referenced by filter_config().
|
static |
Definition at line 164 of file mod_alvis.c.
References filter_info::doc, filter_info::fname, filter_schema::next, filter_info::schemas, and filter_schema::stylesheet_xsp.
Referenced by filter_config(), and filter_destroy().
|
static |
Definition at line 440 of file mod_alvis.c.
References recExtractCtrl::flagShowRecords, index_record(), recExtractCtrl::init, lookup_schema(), filter_info::odr, RECCTRL_EXTRACT_OK, set_param_str(), recExtractCtrl::setStoreData, filter_info::split_level, filter_schema::stylesheet, filter_schema::stylesheet_xsp, and zebra_xslt_ns.
Referenced by extract_full(), and extract_split().
|
static |
Definition at line 539 of file mod_alvis.c.
References extract_doc(), recExtractCtrl::first_record, ioclose_ex(), ioread_ex(), RECCTRL_EXTRACT_EOF, and RECCTRL_EXTRACT_ERROR_GENERIC.
Referenced by filter_extract().
|
static |
Definition at line 489 of file mod_alvis.c.
References extract_doc(), recExtractCtrl::first_record, ioclose_ex(), ioread_ex(), filter_info::reader, RECCTRL_EXTRACT_EOF, RECCTRL_EXTRACT_ERROR_GENERIC, and filter_info::split_level.
Referenced by filter_extract().
Definition at line 314 of file mod_alvis.c.
References create_schemas(), destroy_schemas(), filter_info::fname, filter_info::profile_path, res_get(), ZEBRA_FAIL, and ZEBRA_OK.
|
static |
Definition at line 333 of file mod_alvis.c.
References destroy_schemas(), filter_info::full_name, filter_info::odr, and filter_info::reader.
Referenced by zebra_limit_for_rset().
|
static |
Definition at line 563 of file mod_alvis.c.
References extract_full(), extract_split(), filter_info::odr, recExtractCtrl::setStoreData, and filter_info::split_level.
Definition at line 125 of file mod_alvis.c.
References filter_info::doc, filter_info::fname, filter_info::full_name, filter_info::odr, filter_info::profile_path, filter_info::reader, filter_info::schemas, filter_info::split_level, and filter_info::split_path.
|
static |
Definition at line 585 of file mod_alvis.c.
References recRetrieveCtrl::comp, recRetrieveCtrl::diagnostic, filter_info::doc, recRetrieveCtrl::fname, filter_schema::identifier, recRetrieveCtrl::input_format, ioclose_ret(), ioread_ret(), recRetrieveCtrl::localno, lookup_schema(), filter_schema::name, recRetrieveCtrl::odr, recRetrieveCtrl::output_format, recRetrieveCtrl::rec_buf, recRetrieveCtrl::rec_len, recRetrieveCtrl::recordSize, recRetrieveCtrl::score, set_param_int(), set_param_str(), recRetrieveCtrl::staticrank, and filter_schema::stylesheet_xsp.
|
static |
Definition at line 355 of file mod_alvis.c.
References RecWord::term_buf, RecWord::term_len, recExtractCtrl::tokenAdd, and XML_STRLEN.
Referenced by index_node().
|
static |
Definition at line 369 of file mod_alvis.c.
References attr_content(), index_cdata(), RecWord::index_name, RecWord::index_type, XML_STRCMP, and zebra_xslt_ns.
Referenced by index_record().
|
static |
Definition at line 405 of file mod_alvis.c.
References atozint(), attr_content(), index_node(), recExtractCtrl::match_criteria, recExtractCtrl::staticrank, XML_STRCMP, and zebra_xslt_ns.
Referenced by extract_doc().
|
static |
Definition at line 350 of file mod_alvis.c.
Referenced by extract_full(), and extract_split().
|
static |
Definition at line 580 of file mod_alvis.c.
Referenced by filter_retrieve().
|
static |
Definition at line 344 of file mod_alvis.c.
References ZebraRecStream::readf, and recExtractCtrl::stream.
Referenced by extract_full(), and extract_split().
|
static |
Definition at line 574 of file mod_alvis.c.
References ZebraRecStream::readf, and recRetrieveCtrl::stream.
Referenced by filter_retrieve().
|
static |
Definition at line 286 of file mod_alvis.c.
References filter_schema::default_schema, filter_schema::identifier, filter_schema::name, filter_schema::next, and filter_info::schemas.
Referenced by extract_doc(), and filter_retrieve().
|
static |
Definition at line 88 of file mod_alvis.c.
References filter_schema::name, and ZINT_FORMAT.
Referenced by filter_retrieve().
|
static |
Definition at line 76 of file mod_alvis.c.
References filter_schema::name, and ZINT_FORMAT.
Referenced by extract_doc(), and filter_retrieve().
|
static |
Definition at line 585 of file mod_alvis.c.
RecType idzebra_filter[] |
Definition at line 719 of file mod_alvis.c.
|
static |
Definition at line 74 of file mod_alvis.c.
Referenced by extract_doc(), index_node(), and index_record().