ODR print for HTTP packages
[yaz-moved-to-github.git] / doc / tools.xml
index bb7d90c..f827436 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Id: tools.xml,v 1.17 2003-01-27 21:30:59 adam Exp $ -->
+<!-- $Id: tools.xml,v 1.20 2003-02-14 20:33:00 adam Exp $ -->
  <chapter id="tools"><title>Supporting Tools</title>
   
   <para>
@@ -600,7 +600,7 @@ struct cql_node {
             struct cql_node *right;
             struct cql_node *modifiers;
             struct cql_node *prefixes;
-        } bool;
+        } boolean;
         struct {
             char *name;
             char *value;
@@ -907,7 +907,7 @@ int cql_transform_FILE(cql_transform_t ct,
        This small file defines two index sets, three qualifiers and three
        relations, a position pattern and a default structure.
       </para>
-      <programlisting>
+      <programlisting><![CDATA[
        set.srw    = http://www.loc.gov/zing/cql/srw-indexes/v1.0/
        set.dc     = http://www.loc.gov/zing/cql/dc-indexes/v1.0/
 
@@ -922,7 +922,39 @@ int cql_transform_FILE(cql_transform_t ct,
        position.any               = 3=3 6=1
 
        structure.*                = 4=1
+]]>
       </programlisting>
+      <para>
+       With the mappings above, the CQL query
+       <screen>
+        computer
+       </screen>
+       is converted to the PQF:
+       <screen>
+        @attr 1=1016 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 "computer"
+       </screen>
+       by rules <literal>qualifier.srw.serverChoice</literal>,
+       <literal>relation.scr</literal>, <literal>structure.*</literal>,
+       <literal>position.any</literal>.
+      </para>
+      <para>
+       CQL query
+       <screen>
+        computer^
+       </screen>
+       is rejected, since <literal>position.right</literal> is
+       undefined.
+      </para>
+      <para>
+       CQL query
+       <screen>
+        >my = "http://www.loc.gov/zing/cql/dc-indexes/v1.0/" my.title = x
+       </screen>
+       is converted to
+       <screen>
+        @attr 1=4 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 "x"
+       </screen>
+      </para>
      </example>
     </sect3>
     <sect3 id="tools.cql.xcql"><title>CQL to XCQL conversion</title>