YAZ  5.23.1
Functions
cclxmlconfig.c File Reference

XML configuration for CCL. More...

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <yaz/ccl_xml.h>

Go to the source code of this file.

Functions

static int ccl_xml_config_combqual (WRBUF wrbuf, const xmlNode *ptr, const char **addinfo)
 
static int ccl_xml_config_attr (const char *default_set, WRBUF wrbuf, const xmlNode *ptr, const char **addinfo)
 
static int ccl_xml_config_qual (CCL_bibset bibset, const char *default_set, WRBUF wrbuf, const xmlNode *ptr, const char **addinfo)
 
int ccl_xml_config_directive (CCL_bibset bibset, const xmlNode *ptr, const char **addinfo)
 
int ccl_xml_config (CCL_bibset bibset, const xmlNode *ptr, const char **addinfo)
 configures CCL bibset using XML configuration More...
 

Detailed Description

XML configuration for CCL.

Definition in file cclxmlconfig.c.

Function Documentation

int ccl_xml_config ( CCL_bibset  bibset,
const xmlNode *  ptr,
const char **  addinfo 
)

configures CCL bibset using XML configuration

Parameters
bibsetCCL bibliographic profile
ptrxml node pointer pointing to "cclmap" element
addinfohas error message if configuration could not be parsed
Return values
0OK
-1errors. Inspect addinfo for error message

Configuration example:

<cclmap defaultattrset="bib-1">
   <qual name="term">
       <attr type="u" value="1016"/>
       <attr type="s" value="pw"/>
   </qual>
   <qual name="title">
       <attr type="u" value="4"/>
   </qual>
   <qual name="distributor">
       <attr attrset="gils" type="u" value="2000"/>
   </qual>
  <directive name="and" value="+"/>
</cclmap>

Definition at line 182 of file cclxmlconfig.c.

References ccl_xml_config_directive(), ccl_xml_config_qual(), wrbuf_alloc(), and wrbuf_destroy().

static int ccl_xml_config_attr ( const char *  default_set,
WRBUF  wrbuf,
const xmlNode *  ptr,
const char **  addinfo 
)
static

Definition at line 49 of file cclxmlconfig.c.

References type, and wrbuf_printf().

Referenced by ccl_xml_config_qual().

static int ccl_xml_config_combqual ( WRBUF  wrbuf,
const xmlNode *  ptr,
const char **  addinfo 
)
static

Definition at line 20 of file cclxmlconfig.c.

References name, and wrbuf_printf().

Referenced by ccl_xml_config_qual().

int ccl_xml_config_directive ( CCL_bibset  bibset,
const xmlNode *  ptr,
const char **  addinfo 
)

Definition at line 147 of file cclxmlconfig.c.

References ccl_qual_add_special(), and name.

Referenced by ccl_xml_config().

static int ccl_xml_config_qual ( CCL_bibset  bibset,
const char *  default_set,
WRBUF  wrbuf,
const xmlNode *  ptr,
const char **  addinfo 
)
static