mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
112 lines
4.7 KiB
HTML
112 lines
4.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Configure CCL parser</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.yaz-ccl-conf" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">yaz_ccl_conf</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.0.5, PECL yaz >= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_ccl_conf</span> — <span class="dc-title">Configure CCL parser</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.yaz-ccl-conf-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>yaz_ccl_conf</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>
|
|
, <span class="methodparam"><span class="type">array</span> <code class="parameter">$config</code></span>
|
|
) : <span class="type"><span class="type void">void</span></span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
This function configures the CCL query parser for a server with
|
|
definitions of access points (CCL qualifiers) and their mapping to RPN.
|
|
</p>
|
|
<p class="para">
|
|
To map a specific CCL query to RPN afterwards call the
|
|
<span class="function"><a href="yaz_ccl_parse.html" class="function">yaz_ccl_parse()</a></span> function.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.yaz-ccl-conf-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">id</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The connection resource returned by <span class="function"><a href="yaz_connect.html" class="function">yaz_connect()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">config</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
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.
|
|
</p>
|
|
<p class="para">
|
|
The mapping is a sequence of attribute-type, attribute-value pairs.
|
|
Attribute-type and attribute-value is separated by an equal sign
|
|
(<em>=</em>). Each pair is separated by white space.
|
|
</p>
|
|
<p class="para">
|
|
Additional information can be found on the <a href="http://www.indexdata.dk/yaz/doc/tools.tkl#CCL" class="link external">» CCL</a> page.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.yaz-ccl-conf-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
没有返回值。
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.yaz-ccl-conf-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
In the example below, the CCL parser is configured to support three CCL
|
|
fields: <em>ti</em>, <em>au</em> and
|
|
<em>isbn</em>. Each field is mapped to their BIB-1 equivalent.
|
|
It is assumed that variable <em>$id</em> is the connection ID.
|
|
</p>
|
|
<div class="example" id="example-5684">
|
|
<p><strong>Example #1 CCL configuration</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$fields </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">"ti" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"1=4"</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">"au" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"1=1"</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">"isbn" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"1=7"<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">yaz_ccl_conf</span><span style="color: #007700">(</span><span style="color: #0000BB">$id</span><span style="color: #007700">, </span><span style="color: #0000BB">$fields</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.yaz-ccl-conf-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="yaz_ccl_parse.html" class="function" rel="rdfs-seeAlso">yaz_ccl_parse()</a> - Invoke CCL Parser</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |