|
YAZ 5.38.1
|
Query / XML conversions. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <libxml/parser.h>#include <libxml/tree.h>#include <yaz/logrpn.h>#include <yaz/xmlquery.h>#include <yaz/nmem_xml.h>#include <yaz/xml_get.h>#include <yaz/oid_db.h>#include <yaz/snprintf.h>Go to the source code of this file.
Functions | |
| static int | check_diagnostic (const xmlNode *ptr, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_query2xml_attribute_element (const Z_AttributeElement *element, xmlNodePtr parent) |
| static xmlNodePtr | yaz_query2xml_term (const Z_Term *term, xmlNodePtr parent) |
| static xmlNodePtr | yaz_query2xml_apt (const Z_AttributesPlusTerm *zapt, xmlNodePtr parent) |
| static void | yaz_query2xml_operator (Z_Operator *op, xmlNodePtr node) |
| static xmlNodePtr | yaz_query2xml_rpnstructure (const Z_RPNStructure *zs, xmlNodePtr parent) |
| static xmlNodePtr | yaz_query2xml_rpn (const Z_RPNQuery *rpn, xmlNodePtr parent) |
| static xmlNodePtr | yaz_query2xml_ccl (const Odr_oct *ccl, xmlNodePtr node) |
| static xmlNodePtr | yaz_query2xml_z3958 (const Odr_oct *ccl, xmlNodePtr node) |
| static xmlNodePtr | yaz_query2xml_cql (const char *cql, xmlNodePtr node) |
| void | yaz_rpnquery2xml (const Z_RPNQuery *rpn, xmlDocPtr *docp) |
| void | yaz_query2xml (const Z_Query *q, xmlDocPtr *docp) |
| static bool_t * | boolVal (ODR odr, const char *str) |
| static Odr_int * | intVal (ODR odr, const char *str) |
| static void | yaz_xml2query_operator (const xmlNode *ptr, Z_Operator **op, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_attribute_element (const xmlNode *ptr, Z_AttributeElement **elem, ODR odr, int *error_code, const char **addinfo) |
| static char * | strVal (const xmlNode *ptr_cdata, ODR odr) |
| static void | yaz_xml2query_term (const xmlNode *ptr, Z_Term **term, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_apt (const xmlNode *ptr_apt, Z_AttributesPlusTerm **zapt, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_rset (const xmlNode *ptr, Z_ResultSetId **rset, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_rpnstructure (const xmlNode *ptr, Z_RPNStructure **zs, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_rpn (const xmlNode *ptr, Z_RPNQuery **query, ODR odr, int *error_code, const char **addinfo) |
| static void | yaz_xml2query_ (const xmlNode *ptr, Z_Query **query, ODR odr, int *error_code, const char **addinfo) |
| void | yaz_xml2query (const xmlNode *xmlnodep, Z_Query **query, ODR odr, int *error_code, const char **addinfo) |
Query / XML conversions.
Definition in file xmlquery.c.
Definition at line 351 of file xmlquery.c.
References bool_t, boolVal(), and odr_booldup().
Referenced by boolVal(), and yaz_xml2query_operator().
|
static |
Definition at line 28 of file xmlquery.c.
References check_diagnostic(), and odr_strdup().
Referenced by check_diagnostic(), yaz_xml2query_(), yaz_xml2query_apt(), and yaz_xml2query_rpnstructure().
Definition at line 358 of file xmlquery.c.
References intVal(), and odr_intdup().
Referenced by intVal(), yaz_xml2query_attribute_element(), yaz_xml2query_operator(), and yaz_xml2query_term().
|
static |
Definition at line 539 of file xmlquery.c.
References nmem_text_node_cdata(), odr_getmem, and strVal().
Referenced by strVal(), yaz_xml2query_rset(), and yaz_xml2query_term().
| void yaz_query2xml | ( | const Z_Query * | q, |
| xmlDocPtr * | docp ) |
Definition at line 308 of file xmlquery.c.
References Z_Query::u, Z_Query::which, yaz_query2xml(), yaz_query2xml_ccl(), yaz_query2xml_cql(), yaz_query2xml_rpn(), yaz_query2xml_z3958(), Z_External_CQL, Z_Query_type_1, Z_Query_type_100, Z_Query_type_101, Z_Query_type_104, and Z_Query_type_2.
Referenced by yaz_query2xml(), and yaz_rpnquery2xml().
|
static |
Definition at line 171 of file xmlquery.c.
References Z_AttributeList::attributes, Z_AttributesPlusTerm::attributes, Z_AttributeList::num_attributes, Z_AttributesPlusTerm::term, yaz_query2xml_apt(), yaz_query2xml_attribute_element(), and yaz_query2xml_term().
Referenced by yaz_query2xml_apt(), and yaz_query2xml_rpnstructure().
|
static |
Definition at line 67 of file xmlquery.c.
References Z_AttributeElement::attributeSet, Z_AttributeElement::attributeType, ODR_INT_PRINTF, OID_STR_MAX, Z_AttributeElement::value, Z_AttributeElement::which, yaz_oid_to_string_buf(), yaz_query2xml_attribute_element(), yaz_snprintf(), Z_AttributeValue_complex, Z_AttributeValue_numeric, Z_StringOrNumeric_numeric, and Z_StringOrNumeric_string.
Referenced by yaz_query2xml_apt(), and yaz_query2xml_attribute_element().
|
static |
Definition at line 284 of file xmlquery.c.
References yaz_query2xml_ccl().
Referenced by yaz_query2xml(), and yaz_query2xml_ccl().
|
static |
Definition at line 294 of file xmlquery.c.
References yaz_query2xml_cql().
Referenced by yaz_query2xml(), and yaz_query2xml_cql().
|
static |
Definition at line 185 of file xmlquery.c.
References ODR_INT_PRINTF, Z_Operator::u, Z_Operator::which, yaz_query2xml_operator(), yaz_snprintf(), Z_Operator_and, Z_Operator_and_not, Z_Operator_or, Z_Operator_prox, Z_ProximityOperator_known, and Z_ProximityOperator_private.
Referenced by yaz_query2xml_operator(), and yaz_query2xml_rpnstructure().
|
static |
Definition at line 271 of file xmlquery.c.
References Z_RPNQuery::attributeSetId, OID_STR_MAX, Z_RPNQuery::RPNStructure, yaz_oid_to_string_buf(), yaz_query2xml_rpn(), and yaz_query2xml_rpnstructure().
Referenced by yaz_query2xml(), and yaz_query2xml_rpn().
|
static |
Definition at line 245 of file xmlquery.c.
References Z_Complex::roperator, Z_Complex::s1, Z_Complex::s2, Z_RPNStructure::u, Z_RPNStructure::which, yaz_query2xml_apt(), yaz_query2xml_operator(), yaz_query2xml_rpnstructure(), Z_Operand_APT, Z_Operand_resultSetId, Z_RPNStructure_complex, and Z_RPNStructure_simple.
Referenced by yaz_query2xml_rpn(), and yaz_query2xml_rpnstructure().
|
static |
Definition at line 124 of file xmlquery.c.
References ODR_INT_PRINTF, Z_Term::u, Z_Term::which, yaz_query2xml_term(), yaz_snprintf(), Z_Term_characterString, Z_Term_dateTime, Z_Term_external, Z_Term_general, Z_Term_integerAndUnit, Z_Term_null, Z_Term_numeric, and Z_Term_oid.
Referenced by yaz_query2xml_apt(), and yaz_query2xml_term().
|
static |
Definition at line 289 of file xmlquery.c.
References yaz_query2xml_z3958().
Referenced by yaz_query2xml(), and yaz_query2xml_z3958().
| void yaz_rpnquery2xml | ( | const Z_RPNQuery * | rpn, |
| xmlDocPtr * | docp ) |
Definition at line 299 of file xmlquery.c.
References Z_Query::u, Z_Query::which, yaz_query2xml(), yaz_rpnquery2xml(), and Z_Query_type_1.
Referenced by yaz_rpnquery2xml().
| void yaz_xml2query | ( | const xmlNode * | xmlnodep, |
| Z_Query ** | query, | ||
| ODR | odr, | ||
| int * | error_code, | ||
| const char ** | addinfo ) |
Definition at line 823 of file xmlquery.c.
References yaz_xml2query(), and yaz_xml2query_().
Referenced by yaz_xml2query().
|
static |
Definition at line 768 of file xmlquery.c.
References check_diagnostic(), odr_malloc(), yaz_xml2query_(), yaz_xml2query_rpn(), and Z_Query_type_1.
Referenced by yaz_xml2query(), and yaz_xml2query_().
|
static |
Definition at line 608 of file xmlquery.c.
References check_diagnostic(), odr_malloc(), yaz_xml2query_apt(), yaz_xml2query_attribute_element(), and yaz_xml2query_term().
Referenced by yaz_xml2query_apt(), and yaz_xml2query_rpnstructure().
|
static |
Definition at line 444 of file xmlquery.c.
References CLASS_ATTSET, intVal(), odr_malloc(), odr_strdup(), yaz_oid_std(), yaz_string_to_oid_odr(), yaz_xml2query_attribute_element(), Z_AttributeValue_complex, Z_AttributeValue_numeric, and Z_StringOrNumeric_string.
Referenced by yaz_xml2query_apt(), and yaz_xml2query_attribute_element().
|
static |
Definition at line 363 of file xmlquery.c.
References boolVal(), Z_ProximityOperator::distance, Z_ProximityOperator::exclusion, intVal(), odr_booldup(), odr_intdup(), odr_malloc(), odr_nullval(), Z_ProximityOperator::ordered, Z_ProximityOperator::relationType, Z_ProximityOperator::u, Z_ProximityOperator::which, yaz_xml2query_operator(), yaz_xml_get_prop(), Z_Operator_and, Z_Operator_and_not, Z_Operator_or, Z_Operator_prox, Z_ProximityOperator_known, Z_ProximityOperator_private, Z_ProximityOperator_Prox_lessThanOrEqual, and Z_ProxUnit_word.
Referenced by yaz_xml2query_operator(), and yaz_xml2query_rpnstructure().
|
static |
Definition at line 750 of file xmlquery.c.
References CLASS_ATTSET, odr_malloc(), yaz_oid_std(), yaz_string_to_oid_odr(), yaz_xml2query_rpn(), yaz_xml2query_rpnstructure(), and yaz_xml_get_prop().
Referenced by yaz_xml2query_(), and yaz_xml2query_rpn().
|
static |
Definition at line 689 of file xmlquery.c.
References check_diagnostic(), odr_malloc(), Z_Complex::roperator, Z_Complex::s1, Z_Complex::s2, Z_Operand::u, Z_Operand::which, yaz_xml2query_apt(), yaz_xml2query_operator(), yaz_xml2query_rpnstructure(), yaz_xml2query_rset(), Z_Operand_APT, Z_Operand_resultSetId, Z_RPNStructure_complex, and Z_RPNStructure_simple.
Referenced by yaz_xml2query_rpn(), and yaz_xml2query_rpnstructure().
|
static |
Definition at line 675 of file xmlquery.c.
References strVal(), and yaz_xml2query_rset().
Referenced by yaz_xml2query_rpnstructure(), and yaz_xml2query_rset().
|
static |
Definition at line 544 of file xmlquery.c.
References intVal(), odr_create_Odr_oct(), odr_malloc(), odr_nullval(), strVal(), yaz_xml2query_term(), Z_Term_characterString, Z_Term_general, Z_Term_null, and Z_Term_numeric.
Referenced by yaz_xml2query_apt(), and yaz_xml2query_term().