Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

yaz_ccl_parse(3) [php man page]

YAZ_CCL_PARSE(3)							 1							  YAZ_CCL_PARSE(3)

yaz_ccl_parse - Invoke CCL Parser

SYNOPSIS
bool yaz_ccl_parse (resource $id, string $query, array &$result) DESCRIPTION
This function invokes a CCL parser. It converts a given CCL FIND query to an RPN query which may be passed to the yaz_search(3) function to perform a search. To define a set of valid CCL fields call yaz_ccl_conf(3) prior to this function. PARAMETERS
o $id - The connection resource returned by yaz_connect(3). o $query - The CCL FIND query. o $result - If the function was executed successfully, this will be an array containing the valid RPN query under the key rpn. Upon fail- ure, three indexes are set in this array to indicate the cause of failure: o errorcode - the CCL error code (integer) o errorstring - the CCL error string o errorpos - approximate position in query of failure (integer is character position) RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 CCL Parsing We will try to search using CCL. In the example below, $ccl is a CCL query. <?php yaz_ccl_conf($id, $fields); // see example for yaz_ccl_conf if (!yaz_ccl_parse($id, $ccl, &$cclresult)) { echo 'Error: ' . $cclresult["errorstring"]; } else { $rpn = $cclresult["rpn"]; yaz_search($id, "rpn", $rpn); } ?> PHP Documentation Group YAZ_CCL_PARSE(3)

Check Out this Related Man Page

YAZ_CCL_CONF(3) 							 1							   YAZ_CCL_CONF(3)

yaz_ccl_conf - Configure CCL parser

SYNOPSIS
void yaz_ccl_conf (resource $id, array $config) DESCRIPTION
This function configures the CCL query parser for a server with definitions of access points (CCL qualifiers) and their mapping to RPN. To map a specific CCL query to RPN afterwards call the yaz_ccl_parse(3) function. PARAMETERS
o $id - The connection resource returned by yaz_connect(3). o $config - An array of configuration. Each key of the array is the name of a CCL field and the corresponding value holds a string that specifies a mapping to RPN. The mapping is a sequence of attribute-type, attribute-value pairs. Attribute-type and attribute- value is separated by an equal sign ( =). Each pair is separated by white space. Additional information can be found on the CCL page. RETURN VALUES
No value is returned. EXAMPLES
In the example below, the CCL parser is configured to support three CCL fields: ti, au and isbn. Each field is mapped to their BIB-1 equivalent. It is assumed that variable $id is the connection ID. Example #1 CCL configuration <?php $fields = array( "ti" => "1=4", "au" => "1=1", "isbn" => "1=7" ); yaz_ccl_conf($id, $fields); ?> SEE ALSO
yaz_ccl_parse(3). PHP Documentation Group YAZ_CCL_CONF(3)
Man Page