didou           Wed Apr  6 07:55:03 2005 EDT

  Modified files:              
    /phpdoc/en/reference/yaz/functions  yaz-connect.xml yaz-record.xml 
                                        yaz-scan.xml yaz-search.xml 
                                        yaz-set-option.xml yaz-wait.xml 
  Log:
  Switch the rest of docs and remove a useless para
  
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-connect.xml?r1=1.11&r2=1.12&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-connect.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-connect.xml:1.11 
phpdoc/en/reference/yaz/functions/yaz-connect.xml:1.12
--- phpdoc/en/reference/yaz/functions/yaz-connect.xml:1.11      Tue Apr  5 
12:18:39 2005
+++ phpdoc/en/reference/yaz/functions/yaz-connect.xml   Wed Apr  6 07:55:00 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
 <refentry id="function.yaz-connect">
  <refnamediv>
   <refname>yaz_connect</refname>
@@ -25,14 +25,12 @@
    a connection  - it merely prepares a connect to be performed later when
    <function>yaz_wait</function> is called.
   </para>
-  <para>
-   <note>
-    <para>
-     The <ulink url="&url.yaz-proxy;">YAZ proxy</ulink> is a
-     freely available Z39.50 proxy.
-    </para>
-   </note>
-  </para>
+  <note>
+   <para>
+    The <ulink url="&url.yaz-proxy;">YAZ proxy</ulink> is a
+    freely available Z39.50 proxy.
+   </para>
+  </note>
  </refsect1>
  <refsect1 role="parameters">
   &reftitle.parameters;
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-record.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-record.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-record.xml:1.8 
phpdoc/en/reference/yaz/functions/yaz-record.xml:1.9
--- phpdoc/en/reference/yaz/functions/yaz-record.xml:1.8        Tue Apr  5 
12:17:59 2005
+++ phpdoc/en/reference/yaz/functions/yaz-record.xml    Wed Apr  6 07:55:00 2005
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
 <refentry id="function.yaz-record">
  <refnamediv>
   <refname>yaz_record</refname>
   <refpurpose>Returns a record</refpurpose>
  </refnamediv>
- <refsect1>
-  <title>Description</title>
+ <refsect1 role="description">
+  &reftitle.description;
   <methodsynopsis>
    <type>string</type><methodname>yaz_record</methodname>
    <methodparam><type>resource</type><parameter>id</parameter></methodparam>
@@ -14,180 +14,212 @@
    <methodparam><type>string</type><parameter>type</parameter></methodparam>
   </methodsynopsis>
   <para>
-   Returns the record at position <parameter>pos</parameter> or an empty
-   string if no record exists at the given position.
-  </para>
-  <para>
    The <function>yaz_record</function> function inspects a record in the
    current result set at the position specified by parameter
-   <parameter>pos</parameter>. If no database record exists at the given
-   position an empty string is returned. 
+   <parameter>pos</parameter>. 
   </para>
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
   <para>
-   Record positions in a result set are numbered 1, 2, ... $hits where
-   $hits is the count returned by <function>yaz_hits</function>.
+   <variablelist>
+    <varlistentry>
+     <term><parameter>id</parameter></term>
+     <listitem>
+      <para>
+       The connection resource returned by <function>yaz_connect</function>.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>pos</parameter></term>
+     <listitem>
+      <para>
+       The record position. Records positions in a result set are numbered 1,
+       2, ... $hits where $hits is the count returned by 
<function>yaz_hits</function>.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>type</parameter></term>
+     <listitem>
+      <para>
+       The <parameter>type</parameter> specifies the form of the
+       returned record.
+      </para>
+      <note>
+       <para>
+        It is the application which is responsible for actually
+        ensuring that the records are returned from the Z39.50/SRW server
+        in the proper format. The type given only specifies a conversion
+        to take place on the client side (in PHP/YAZ).
+       </para>
+      </note>
+      <para>
+       Besides conversion of the transfer record to a string/array, PHP/YAZ
+       it is also possible to perform a character set conversion of the
+       record. Especially for USMARC/MARC21 that is recommended since
+       these are typically returned in the character set MARC-8 that is
+       not supported by browsers, etc. To specify a conversion, add
+       <literal>; charset=</literal><replaceable>from</replaceable><literal>,
+       </literal><replaceable>to</replaceable> where
+       <replaceable>from</replaceable> is the original character set 
+       of the record and <replaceable>to</replaceable> is the resulting 
character
+       set (as seen by PHP).
+      </para>
+      <variablelist>
+       <varlistentry>
+        <term><literal>string</literal></term>
+        <listitem>
+         <para>
+          The record is returned as a string for simple display.
+          In this mode, all MARC records are converted to a line-by-line format
+          since ISO2709 is hardly readable.
+          XML records and SUTRS are returned in their original format.
+          GRS-1 are returned in a (ugly) line-by-line format.
+         </para>
+         <para>
+          This format is suitable if records are to be displayed in a quick
+          way - for debugging - or because it is not feasible to perform
+          proper display.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><literal>xml</literal></term>
+        <listitem>
+         <para>
+          The record is returned as an XML string if possible.
+          In this mode, all MARC records are converted to 
+          <ulink url="&url.yaz-marcxml;">MARCXML</ulink>.
+          XML records and SUTRS are returned in their original format.
+          GRS-1 is not supported.
+         </para>
+         <para>
+          This format is similar to <literal>string</literal> except that
+          MARC records are converted to MARCXML
+         </para>
+         <para>
+          This format is suitable if records are processed by an XML parser
+          or XSLT processor afterwards.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><literal>raw</literal></term>
+        <listitem>
+         <para>
+          The record is returned as a string in its original form.
+          This type is suitable for MARC, XML and SUTRS. It does not
+          work for GRS-1.
+         </para>
+         <para>
+          MARC records are returned as a ISO2709 string. XML and SUTRS are
+          returned as strings.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><literal>syntax</literal></term>
+        <listitem>
+         <para>
+          The syntax of the record is returned as a string, i.e.
+          <literal>USmarc</literal>, <literal>GRS-1</literal>,
+          <literal>XML</literal>, etc.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><literal>database</literal></term>
+        <listitem>
+         <para>
+          The name of database associated with record at the position
+          is returned as a string.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><literal>array</literal></term>
+        <listitem>
+         <para>
+          The record is returned as an array that reflects the GRS-1
+          structure. This type is suitable for MARC and GRS-1. XML, SUTRS
+          are not supported and if the actual record is XML or SUTRS an
+          empty string will be returned.
+         </para>
+         <para>
+          The array returned consists of a list corresponding to
+          each leaf/internal node of GRS-1. Each list item consists
+          a sub list with first element <emphasis>path</emphasis> and
+          <emphasis>data</emphasis> (if data is available).
+         </para>
+         <para>
+          The path which is a string holds a list of each tree component (of
+          the structured GRS-1 record) from root to leaf. Each component is
+          a tag type, tag value pair of the form
+          
<literal>(</literal><replaceable>type</replaceable><literal>,</literal>
+          <replaceable>value</replaceable>
+         </para>
+         <para>
+          String tags normally has a corresponding tag type 3.
+          MARC can also be returned as an array (they are converted to
+          GRS-1 internally).
+         </para>
+        </listitem>
+       </varlistentry>
+      </variablelist>
+     </listitem>
+    </varlistentry>
+   </variablelist>
   </para>
-  <para>
-   The <parameter>type</parameter> specifies the form of the
-   returned record.
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>    
+   Returns the record at position <parameter>pos</parameter> or an empty
+   string if no record exists at the given position.
   </para>
-
-  <variablelist>
-   <varlistentry>
-    <term><literal>string</literal></term>
-    <listitem>
-     <para>
-      The record is returned as a string for simple display.
-      In this mode, all MARC records are converted to a line-by-line format
-      since ISO2709 is hardly readable.
-      XML records and SUTRS are returned in their original format.
-      GRS-1 are returned in a (ugly) line-by-line format.
-     </para>
-     <para>
-      This format is suitable if records are to be displayed in a quick
-      way - for debugging - or because it is not feasible to perform
-      proper display.
-     </para>
-    </listitem>
-   </varlistentry>
-   <varlistentry>
-    <term><literal>xml</literal></term>
-    <listitem>
-     <para>
-      The record is returned as an XML string if possible.
-      In this mode, all MARC records are converted to 
-      <ulink url="&url.yaz-marcxml;">MARCXML</ulink>.
-      XML records and SUTRS are returned in their original format.
-      GRS-1 is not supported.
-     </para>
-     <para>
-      This format is similar to <literal>string</literal> except that
-      MARC records are converted to MARCXML
-     </para>
-     <para>
-      This format is suitable if records are processed by an XML parser
-      or XSLT processor afterwards.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><literal>raw</literal></term>
-    <listitem>
-     <para>
-      The record is returned as a string in its original form.
-      This type is suitable for MARC, XML and SUTRS. It does not
-      work for GRS-1.
-     </para>
-     <para>
-      MARC records are returned as a ISO2709 string. XML and SUTRS are
-      returned as strings.
-     </para>
-    </listitem>
-   </varlistentry>
-   
-   <varlistentry>
-    <term><literal>syntax</literal></term>
-    <listitem>
-     <para>
-      The syntax of the record is returned as a string, i.e.
-      <literal>USmarc</literal>, <literal>GRS-1</literal>,
-      <literal>XML</literal>, etc.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><literal>database</literal></term>
-    <listitem>
-     <para>
-      The name of database associated with record at the position
-      is returned as a string.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><literal>array</literal></term>
-    <listitem>
-     <para>
-      The record is returned as an array that reflects the GRS-1
-      structure. This type is suitable for MARC and GRS-1. XML, SUTRS
-      are not supported and if the actual record is XML or SUTRS an
-      empty string will be returned.
-     </para>
-     <para>
-      The array returned consists of a list corresponding to
-      each leaf/internal node of GRS-1. Each list item consists
-      a sub list with first element <emphasis>path</emphasis> and
-      <emphasis>data</emphasis> (if data is available).
-      </para>
-     <para>
-      The path which is a string holds a list of each tree component (of
-      the structured GRS-1 record) from root to leaf. Each component is
-      a tag type, tag value pair of the form
-      <literal>(</literal><replaceable>type</replaceable><literal>,</literal>
-      <replaceable>value</replaceable>
-     </para>
-     <para>
-      String tags normally has a corresponding tag type 3.
-      MARC can also be returned as an array (they are converted to
-      GRS-1 internally).
-     </para>
-    </listitem>
-   </varlistentry>
-   
-  </variablelist>
-
-  <note>
-   <para>
-    It is the application which is responsible for actually
-    ensuring that the records are returned from the Z39.50/SRW server
-    in the proper format. The type given only specifies a conversion
-    to take place on the client side (in PHP/YAZ).
-   </para>
-  </note>
-
   <para>
-   Besides conversion of the transfer record to a string/array, PHP/YAZ
-   it is also possible to perform a character set conversion of the
-   record. Especially for USMARC/MARC21 that is recommended since
-   these are typically returned in the character set MARC-8 that is
-   not supported by browsers, etc. To specify a conversion, add
-   <literal>; charset=</literal><replaceable>from</replaceable><literal>,
-   </literal><replaceable>to</replaceable> where
-   <replaceable>from</replaceable> is the original character set 
-   of the record and <replaceable>to</replaceable> is the resulting character
-   set (as seen by PHP).
+   If no database record exists at the given position an empty string is 
+   returned.
   </para>
-  
+ </refsect1>
+ <refsect1 role="examples">
+  &reftitle.examples;
   <example>
    <title>Array for GRS-1 record</title>
    <para>
-    Consider GRS-1 record
+    Consider this GRS-1 record:
     <screen>
+<![CDATA[
 (4,52)Robert M. Pirsig
 (4,70)
       (4,90)
             (2,7)Transworld Publishers, ltd.
+]]>
     </screen>
-    This record has two nodes at root level.
-    First element at root level is (4,52) 
-    [tag type 4, tag value 52], and has data 
-    <literal>Robert M. Pirsig</literal>. Second element at root level 
-    (4,70) has a subtree with a single element (4,90). (4,90) has
-    yet another sub tree (2,7) with data <literal>Transworld Publishers,
-     ltd.</literal>.
+    This record has two nodes at root level. First element at root level is
+    (4,52) [tag type 4, tag value 52], and has data <literal>Robert M. 
+    Pirsig</literal>. Second element at root level (4,70) has a subtree with
+    a single element (4,90). (4,90) has yet another sub tree (2,7) with data
+    <literal>Transworld Publishers, ltd.</literal>.
    </para>
    <para>
     If this record is present at position $p, then
     <programlisting role="php">
+<![CDATA[
+<?php
+
 $ar = yaz_record($id, $p, "array");
 print_r($ar);
+
+?>
+]]>
     </programlisting>
-    produces
+    will output:
     <screen>
- Array
+<![CDATA[
+Array
 (
     [0] => Array
         (
@@ -208,41 +240,48 @@
             [1] => Transworld Publishers, ltd.
         )
 )      
+]]>
     </screen>
    </para>
   </example>
-
   <example>
    <title>Working with MARCXML</title>
    <para>
-    The following PHP snippet returns a MARC21/USMARC record as
-    MARCXML. The original record is returned in marc-8 (unknown
-    to most XML parsers), so we convert it to UTF-8 (which all 
-    XML parsers must support).
+    The following PHP snippet returns a MARC21/USMARC record as MARCXML. 
+    The original record is returned in marc-8 (unknown to most XML parsers),
+    so we convert it to UTF-8 (which all XML parsers must support).
     <programlisting role="php">
-     $rec = yaz_record($id, $p, "xml; charset=marc-8,utf-8");
+<![CDATA[
+<?php
+$rec = yaz_record($id, $p, "xml; charset=marc-8,utf-8");
+?>
+]]>
     </programlisting>
    </para>
    <para>
-    The record <literal>$rec</literal> can be processed with
-    the <link linkend="ref.xslt">Sablotron XSLT</link> processor as follows:
+    The record <literal>$rec</literal> can be processed with the 
+    <link linkend="ref.xslt">Sablotron XSLT</link> processor as follows:
    </para>
    <para>
     <programlisting role="php">
 <![CDATA[ 
+<?php
+
 $xslfile = 'display.xsl';
 $processor = xslt_create();
 $parms = array('/_xml' => $rec);
 $res = xslt_process($processor, 'arg:/_xml', $xslfile, NULL, $parms);
 xslt_free($processor);
 $res = preg_replace("'</?html[^>]*>'", '', $res);
-print $res;
+echo $res;
+
+?>
 ]]>
     </programlisting>
    </para>
    <para>
-    For PHP 5 the <link linkend="ref.xsl">XSL</link> extension can be
-    used instead of Sablotron XSLT.
+    For PHP 5 the <link linkend="ref.xsl">XSL</link> extension must be used
+    instead of Sablotron XSLT.
    </para>
   </example>
  </refsect1>
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-scan.xml?r1=1.10&r2=1.11&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-scan.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.10 
phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.11
--- phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.10 Tue Apr  5 12:17:59 2005
+++ phpdoc/en/reference/yaz/functions/yaz-scan.xml      Wed Apr  6 07:55:00 2005
@@ -1,43 +1,93 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
 <refentry id="function.yaz-scan">
  <refnamediv>
   <refname>yaz_scan</refname>
   <refpurpose>Prepares for a scan</refpurpose>
  </refnamediv>
- <refsect1>
-  <title>Description</title>
+ <refsect1 role="description">
+  &reftitle.description;
   <methodsynopsis>
-   <type>int</type><methodname>yaz_scan</methodname>
+   <void/><methodname>yaz_scan</methodname>
    <methodparam><type>resource</type><parameter>id</parameter></methodparam>
    <methodparam><type>string</type><parameter>type</parameter></methodparam>
    
<methodparam><type>string</type><parameter>startterm</parameter></methodparam>
    <methodparam 
choice="opt"><type>array</type><parameter>flags</parameter></methodparam>
   </methodsynopsis>
   <para>
-   This function prepares for a Z39.50 Scan Request, where parameter
-   <parameter>id</parameter> specifies connection. Starting term
-   point for the scan is given by <parameter>startterm</parameter>.
-   The form in which the starting term is specified is given by parameter
-   <parameter>type</parameter>. Currently only type <literal>rpn</literal>
-   is supported. The optional parameter <parameter>flags</parameter>
-   specifies additional information to control the behaviour of the
-   scan request. Three indexes are currently read from the flags:
-   <literal>number</literal> (number of terms requested),
-   <literal>position</literal> (preferred position of term) and
-   <literal>stepSize</literal> (preferred step size).
+   This function prepares for a Z39.50 Scan Request on the specified 
+   connection.
+  </para>
+  <para>
    To actually transfer the Scan Request to the server and receive the
    Scan Response, <function>yaz_wait</function> must be called. Upon
    completion of <function>yaz_wait</function> call
    <function>yaz_error</function> and <function>yaz_scan_result</function> to
    handle the response.
   </para>
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
   <para>
-   The syntax of <parameter>startterm</parameter> is similar to the
-   RPN query as described in <function>yaz_search</function>. The
-   startterm consists of zero or more <literal>@attr</literal>-operator 
-   specifications, then followed by exactly one token.
+   <variablelist>
+    <varlistentry>
+     <term><parameter>id</parameter></term>
+     <listitem>
+      <para>
+       The connection resource returned by <function>yaz_connect</function>.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>type</parameter></term>
+     <listitem>
+      <para>
+       Currently only type <literal>rpn</literal> is supported.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>startterm</parameter></term>
+     <listitem>
+      <para>
+       Starting term point for the scan.
+      </para>
+      <para>
+       The form in which the starting term is specified is given by parameter
+       <parameter>type</parameter>.
+      </para>
+      <para>
+       The syntax this parameter is similar to the RPN query as described in
+       <function>yaz_search</function>. It consists of zero or more 
+       <literal>@attr</literal>-operator specifications, then followed by 
+       exactly one token.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>flags</parameter></term>
+     <listitem>
+      <para>
+       This optional parameter specifies additional information to control 
+       the behaviour of the scan request. Three indexes are currently read 
+       from the flags array:
+       <literal>number</literal> (number of terms requested),
+       <literal>position</literal> (preferred position of term) and
+       <literal>stepSize</literal> (preferred step size).
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
   </para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   &return.void;
+  </para>
+ </refsect1>
+ <refsect1 role="examples">
+  &reftitle.examples;
   <para>
    <example>
     <title>PHP function that scans titles</title>
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-search.xml?r1=1.7&r2=1.8&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-search.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-search.xml:1.7 
phpdoc/en/reference/yaz/functions/yaz-search.xml:1.8
--- phpdoc/en/reference/yaz/functions/yaz-search.xml:1.7        Tue Apr  5 
12:17:59 2005
+++ phpdoc/en/reference/yaz/functions/yaz-search.xml    Wed Apr  6 07:55:00 2005
@@ -1,131 +1,185 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
 <refentry id="function.yaz-search">
  <refnamediv>
   <refname>yaz_search</refname>
   <refpurpose>Prepares for a search</refpurpose>
  </refnamediv>
- <refsect1>
-  <title>Description</title>
+ <refsect1 role="description">
+  &reftitle.description;
   <methodsynopsis>
-   <type>int</type><methodname>yaz_search</methodname>
+   <type>bool</type><methodname>yaz_search</methodname>
    <methodparam><type>resource</type><parameter>id</parameter></methodparam>
    <methodparam><type>string</type><parameter>type</parameter></methodparam>
    <methodparam><type>string</type><parameter>query</parameter></methodparam>
   </methodsynopsis>
   <para>
-   <function>yaz_search</function> prepares for a search on the
-   connection given by parameter <parameter>id</parameter>.
-   The parameter <parameter>type</parameter> represents the query type - only
-   <literal>"rpn"</literal> is supported now in which case the
-   third argument specifies a Type-1 query in prefix query notation.
-   Like <function>yaz_connect</function> this
-   function is non-blocking and only prepares for a search to be
-   executed later when <function>yaz_wait</function> is called.
+   <function>yaz_search</function> prepares for a search on the given 
+   connection.
+  </para>
+  <para>
+   Like <function>yaz_connect</function> this function is non-blocking and
+   only prepares for a search to be executed later when 
+   <function>yaz_wait</function> is called.
   </para>
  </refsect1>
- <refsect1>
-  <title>The RPN query</title>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
   <para>
-   The RPN query is a textual representation of the Type-1 query as
-   defined by the Z39.50 standard. However, in the text representation
-   as used by YAZ a prefix notation is used, that is the operator
-   precedes the operands. The query string is a sequence of tokens where
-   white space is ignored unless surrounded by double quotes. Tokens beginning
-   with an at-character (<literal>@</literal>) are considered operators,
-   otherwise they are treated as search terms.
+   <variablelist>
+    <varlistentry>
+     <term><parameter>id</parameter></term>
+     <listitem>
+      <para>
+       The connection resource returned by <function>yaz_connect</function>.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>type</parameter></term>
+     <listitem>
+      <para>
+       This parameter represents the query type - only <literal>"rpn"</literal>
+       is supported now in which case the third argument specifies a Type-1 
+       query in prefix query notation. 
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>query</parameter></term>
+     <listitem>
+      <para>
+       The RPN query is a textual representation of the Type-1 query as
+       defined by the Z39.50 standard. However, in the text representation
+       as used by YAZ a prefix notation is used, that is the operator
+       precedes the operands. The query string is a sequence of tokens where
+       white space is ignored unless surrounded by double quotes. Tokens 
beginning
+       with an at-character (<literal>@</literal>) are considered operators,
+       otherwise they are treated as search terms.
+      </para>
+      <table>
+       <title>RPN Operators</title>
+       <tgroup cols="2">
+        <colspec colwidth="1*" colname="construct"/>
+        <colspec colwidth="2*" colname="description"/>
+        <thead>
+         <row>
+          <entry>Construct</entry>
+          <entry>Description</entry>
+         </row>
+        </thead>
+        <tbody>
+         <row>
+          <entry><literal>@and</literal> query1 query2</entry>
+          <entry>intersection of query1 and query2</entry>
+         </row>
+         <row>
+          <entry><literal>@or</literal> query1 query2</entry>
+          <entry>union of query1 and query2</entry>
+         </row>
+         <row>
+          <entry><literal>@not</literal> query1 query2</entry>
+          <entry>query1 and not query2</entry>
+         </row>
+         <row>
+          <entry><literal>@set</literal> name</entry>
+          <entry>result set reference</entry>
+         </row>
+         <row>
+          <entry><literal>@attrset</literal> set query</entry>
+          <entry>
+           specifies attribute-set for query. This construction is only allowed
+           once - in the beginning of the whole query
+          </entry>
+         </row>
+         <row>
+          <entry><literal>@attr</literal> [set] type=value query</entry>
+          <entry>
+           applies attribute to query. The type and value are integers 
+           specifying the attribute-type and attribute-value respectively. 
+           The set, if given, specifies the attribute-set.
+          </entry>
+         </row>
+        </tbody>
+       </tgroup>
+      </table>     
+      <para>
+       You can find information about attributes at the 
+       <ulink url="&url.yaz-loc-bib1;">Z39.50 Maintenance Agency</ulink>
+       site.
+      </para>
+      <note>
+       <para>
+        If you would like to use a more friendly notation,
+        use the CCL parser - functions <function>yaz_ccl_conf</function> and 
+        <function>yaz_ccl_parse</function>.
+       </para>
+      </note>
+     </listitem>
+    </varlistentry>
+   </variablelist>
   </para>
-  <table>
-   <title>RPN Operators</title>
-   <tgroup cols="2">
-    <colspec colwidth="1*" colname="construct"/>
-    <colspec colwidth="2*" colname="description"/>
-    <thead>
-      <row>
-        <entry>Construct</entry>
-        <entry>Description</entry>
-      </row>
-    </thead>
-    <tbody>
-     <row>
-      <entry><literal>@and</literal> query1 query2</entry>
-      <entry>intersection of query1 and query2</entry>
-     </row>
-     <row>
-      <entry><literal>@or</literal> query1 query2</entry>
-      <entry>union of query1 and query2</entry>
-     </row>
-     <row>
-      <entry><literal>@not</literal> query1 query2</entry>
-      <entry>query1 and not query2</entry>
-     </row>
-     <row>
-      <entry><literal>@set</literal> name</entry>
-      <entry>result set reference</entry>
-     </row>
-     <row>
-      <entry><literal>@attrset</literal> set query</entry>
-      <entry>specifies attribute-set for query. This construction is only
-             allowed once - in the beginning of the whole query</entry>
-     </row>
-     <row>
-       <entry><literal>@attr</literal> [set] type=value query</entry>
-       <entry>applies attribute to query. The type and value are
-               integers specifying the attribute-type and attribute-value
-               respectively. The set, if given, specifies the
-               attribute-set.</entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>     
-  <example>
-  <title>Query Examples</title>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
   <para>
-   You can search for simple terms, like this
-    <screen>computer</screen>
-    which matches documents where "computer" occur.
-    No attributes are specified.
+   &return.success;
   </para>
+ </refsect1>
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title>Query Examples</title>
    <para>
-   The Query
-    <screen>"knuth donald"</screen>
-   matches documents where "knuth donald" occur (provided that the
-   server supports phrase search).
+    You can search for simple terms, like this:
+    <screen>
+<![CDATA[
+computer
+]]>
+    </screen>
+    which matches documents where "computer" occur. No attributes are 
+    specified.
    </para>
    <para>
-   This query applies two attributes for the same phrase.
-    <screen>@attr 1=1003 @attr 4=1 "knuth donald"</screen>
-   First attribute is type 1 (Bib-1 use), attribute value is 1003
-   (Author).
-   Second attribute has is type 4 (structure), value 1 (phrase),
-   so this should match documents where Donald Knuth is author.
+    The query 
+    <screen>
+<![CDATA[
+"knuth donald"
+]]>
+    </screen>
+    matches documents where "knuth donald" occur (provided that the
+    server supports phrase search).
    </para>
    <para>
-    This query
-    <screen>@and @or a b @not @or c d e</screen>
-    would in infix notation look like
-      <literal>(a or b) and ((c or d) not e)</literal>.
+    This query applies two attributes for the same phrase.
+    <screen>@attr 1=1003 @attr 4=1 "knuth donald"</screen>
+    First attribute is type 1 (Bib-1 use), attribute value is 1003
+    (Author).
+    Second attribute has is type 4 (structure), value 1 (phrase),
+    so this should match documents where Donald Knuth is author.
    </para>
    <para>
-   Another, more complex, one:
-<screen>@attrset gils @and @attr 1=4 art @attr 1=2000 company</screen>
-   The query as a whole uses the GILS attributeset. The query matches
-   documents where <literal>art</literal> occur in the title (GILS,BIB-1)
-   and in which <literal>company</literal> occur as Distributor (GILS).
+    The query
+    <screen>
+<![CDATA[
[EMAIL PROTECTED] @or a b @not @or c d e
+]]>
+    </screen>
+    would in infix notation look like <literal>(a or b) and ((c or d) not 
+    e)</literal>.
    </para>
-  </example>
-  <para>
-   You can find information about attributes at the 
-   <ulink url="&url.yaz-loc-bib1;">Z39.50 Maintenance Agency</ulink>
-   site.
-  </para>
-  <note>
    <para>
-    If you would like to use a more friendly notation,
-    use the CCL parser - functions <function>yaz_ccl_conf</function> and 
-    <function>yaz_ccl_parse</function>.
+    Another, more complex, one:
+    <screen>
+<![CDATA[
[EMAIL PROTECTED] gils @and @attr 1=4 art @attr 1=2000 company
+]]>
+    </screen>
+    The query as a whole uses the GILS attributeset. The query matches
+    documents where <literal>art</literal> occur in the title (GILS,BIB-1)
+    and in which <literal>company</literal> occur as Distributor (GILS).
    </para>
-  </note>
+  </example>
  </refsect1>
 </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-set-option.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-set-option.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-set-option.xml:1.4 
phpdoc/en/reference/yaz/functions/yaz-set-option.xml:1.5
--- phpdoc/en/reference/yaz/functions/yaz-set-option.xml:1.4    Tue Apr  5 
12:17:59 2005
+++ phpdoc/en/reference/yaz/functions/yaz-set-option.xml        Wed Apr  6 
07:55:00 2005
@@ -1,89 +1,140 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.yaz-set-option">
  <refnamediv>
   <refname>yaz_set_option</refname>
   <refpurpose>Sets one or more options for connection</refpurpose>
  </refnamediv>
- <refsect1>
-  <title>Description</title>
+ <refsect1 role="description">
+  &reftitle.description;
   <methodsynopsis>
-   <type>string</type><methodname>yaz_set_option</methodname>
+   <void/><methodname>yaz_set_option</methodname>
    <methodparam><type>resource</type><parameter>id</parameter></methodparam>
    <methodparam><type>string</type><parameter>name</parameter></methodparam>
    <methodparam><type>string</type><parameter>value</parameter></methodparam>
   </methodsynopsis>
   <methodsynopsis>
-   <type>string</type><methodname>yaz_set_option</methodname>
+   <void/><methodname>yaz_set_option</methodname>
    <methodparam><type>resource</type><parameter>id</parameter></methodparam>
    <methodparam><type>array</type><parameter>options</parameter></methodparam>
   </methodsynopsis>
   <para>
-   Sets option <parameter>name</parameter> to <parameter>value</parameter>.
+   Sets one or more options on the given connection.
+  </para>
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <para>
+   <variablelist>
+    <varlistentry>
+     <term><parameter>id</parameter></term>
+     <listitem>
+      <para>
+       The connection resource returned by <function>yaz_connect</function>.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>name</parameter> or <parameter>options</parameter></term>
+     <listitem>
+      <para>
+       May be either a string or an array.
+      </para>
+      <para>
+       If given as a string, this will be the name of the option to set. You'll
+       need to give it's <parameter>value</parameter>.
+      </para>
+      <para>
+       If given as an array, this will be an associative array (option name 
+       => option value).
+      </para>
+      <table>
+       <title>PYP/YAZ Connection Options</title>
+       <tgroup cols="2">
+        <colspec colwidth="2*" colname="name"/>
+        <colspec colwidth="5*" colname="description"/>
+        <thead>
+         <row>
+          <entry>Name</entry>
+          <entry>Description</entry>
+         </row>
+        </thead>
+        <tbody>
+         <row>
+          <entry>implementationName</entry>
+          <entry>implementation name of server</entry>
+         </row>
+         <row>
+          <entry>implementationVersion</entry>
+          <entry>implementation version of server</entry>
+         </row>
+         <row>
+          <entry>implementationId</entry>
+          <entry>implementation ID of server</entry>
+         </row>
+         <row>
+          <entry>schema</entry>
+          <entry>
+           schema for retrieval. By default, no schema is used. Setting this
+           option is equivalent to using function 
+           <function>yaz_schema</function>
+          </entry>
+         </row>
+         <row>
+          <entry>preferredRecordSyntax</entry>
+          <entry>
+           record syntax for retrieval. By default, no syntax is used. Setting
+           this option is equivalent to using function 
+           <function>yaz_syntax</function>
+          </entry>
+         </row>
+         <row>
+          <entry>start</entry>
+          <entry>
+           offset for first record to be retrieved via 
+           <function>yaz_search</function> or <function>yaz_present</function>.
+           First record is numbered has a start value of 0. Second record has
+           start value 1.
+           Setting this option in combination with option
+           <literal>count</literal> has the same effect as calling
+           <function>yaz_range</function> except that records are
+           numbered from 1 in <function>yaz_range</function>
+          </entry>
+         </row>
+         <row>
+          <entry>count</entry>
+          <entry>maximum number of records to be retrieved via
+           <function>yaz_search</function> or <function>yaz_present</function>.
+          </entry>
+         </row>
+         <row>
+          <entry>elementSetName</entry>
+          <entry>element-set-name for retrieval. Setting this option is
+           equivalent to calling <function>yaz_element</function>.
+          </entry>
+         </row>
+        </tbody>
+       </tgroup>
+      </table>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>value</parameter></term>
+     <listitem>
+      <para>
+       The new value of the option. Use this only if the previous argument is
+       a string.
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   &return.void;
   </para>
-  <table>
-   <title>PYP/YAZ Connection Options</title>
-   <tgroup cols="2">
-    <colspec colwidth="2*" colname="name"/>
-    <colspec colwidth="5*" colname="description"/>
-    <thead>
-     <row>
-      <entry>Name</entry>
-      <entry>Description</entry>
-     </row>
-    </thead>
-    <tbody>
-     <row>
-      <entry>implementationName</entry>
-      <entry>implementation name of server</entry>
-     </row>
-     <row>
-      <entry>implementationVersion</entry>
-      <entry>implementation version of server</entry>
-     </row>
-     <row>
-      <entry>implementationId</entry>
-      <entry>implementation ID of server</entry>
-     </row>
-     <row>
-      <entry>schema</entry>
-      <entry>schema for retrieval. By default, no
-       schema is used. Setting this option is equivalent to
-       using function <function>yaz_schema</function></entry>
-     </row>
-     <row>
-      <entry>preferredRecordSyntax</entry>
-      <entry>record syntax for retrieval. By default, no
-       syntax is used. Setting this option is equivalent to
-       using function <function>yaz_syntax</function></entry>
-     </row>
-     <row>
-      <entry>start</entry>
-      <entry>offset for first record to be retrieved via
-       <function>yaz_search</function> or <function>yaz_present</function>.
-       First record is numbered has a start value of 0. Second record has
-       start value 1.
-       Setting this option in combination with option
-       <literal>count</literal> has the same effect as calling
-       <function>yaz_range</function> except that records are
-       numbered from 1 in <function>yaz_range</function>
-      </entry>
-     </row>
-     <row>
-      <entry>count</entry>
-      <entry>maximum number of records to be retrieved via
-       <function>yaz_search</function> or <function>yaz_present</function>.
-      </entry>
-     </row>
-     <row>
-      <entry>elementSetName</entry>
-      <entry>element-set-name for retrieval. Setting this option is
-       equivalent to calling <function>yaz_element</function>.
-      </entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
  </refsect1>
 </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/functions/yaz-wait.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/reference/yaz/functions/yaz-wait.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-wait.xml:1.8 
phpdoc/en/reference/yaz/functions/yaz-wait.xml:1.9
--- phpdoc/en/reference/yaz/functions/yaz-wait.xml:1.8  Tue Apr  5 12:17:59 2005
+++ phpdoc/en/reference/yaz/functions/yaz-wait.xml      Wed Apr  6 07:55:00 2005
@@ -1,41 +1,68 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
 <refentry id="function.yaz-wait">
  <refnamediv>
   <refname>yaz_wait</refname>
   <refpurpose>Wait for Z39.50 requests to complete</refpurpose>
  </refnamediv>
- <refsect1>
-  <title>Description</title>
+ <refsect1 role="description">
+  &reftitle.description;
   <methodsynopsis>
-   <type>int</type><methodname>yaz_wait</methodname>
+   <type>bool</type><methodname>yaz_wait</methodname>
    <methodparam choice="opt"><type>array</type><parameter 
role="reference">options</parameter></methodparam>
   </methodsynopsis>
   <para>
-   This function carries out networked (blocked) activity for
-   outstanding requests which have been prepared by the functions
-   <function>yaz_connect</function>,
-   <function>yaz_search</function>, <function>yaz_present</function>,
-   <function>yaz_scan</function> and <function>yaz_itemorder</function>.
+   This function carries out networked (blocked) activity for outstanding
+   requests which have been prepared by the functions 
+   <function>yaz_connect</function>, <function>yaz_search</function>, 
+   <function>yaz_present</function>, <function>yaz_scan</function> and 
+   <function>yaz_itemorder</function>.
+  </para>
+  <para>
    <function>yaz_wait</function> returns when all servers have either
    completed all requests or aborted (in case of errors).
   </para>
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <para>
+   <variablelist>
+    <varlistentry>
+     <term><parameter>options</parameter></term>
+     <listitem>
+      <para>
+       An associative array of options:
+       <variablelist>
+        <varlistentry>
+         <term><literal>timeout</literal></term>
+         <listitem>
+          <para>
+           Sets timeout in seconds. If a server has not responded within the
+           timeout it is considered dead and <function>yaz_wait</function>
+           returns. The default value for timeout is 15 seconds.
+          </para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><literal>event</literal></term>
+         <listitem>
+          <para>
+           A boolean.
+          </para>
+         </listitem>
+        </varlistentry>
+       </variablelist>
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
   <para>
-   If the <parameter>options</parameter> array is given that holds
-   options that change the behaviour of <function>yaz_wait</function>.
+   &return.success;
   </para>
-  <variablelist>
-   <varlistentry>
-    <term><literal>timeout</literal></term>
-    <listitem>
-     <para>
-      Sets timeout in seconds. If a server has not responded within
-      the timeout it is considered dead and <function>yaz_wait</function>
-      returns. The default value for timeout is 15 seconds.
-     </para>
-    </listitem>
-   </varlistentry>
-  </variablelist>
  </refsect1>
 </refentry>
 

Reply via email to