updated docs to reflect change to 'zebra::index::' special elem set name
[idzebra-moved-to-github.git] / doc / querymodel.xml
index 82d25ec..6c12214 100644 (file)
@@ -1,11 +1,11 @@
  <chapter id="querymodel">
-  <!-- $Id: querymodel.xml,v 1.24 2006-08-14 22:33:46 adam Exp $ -->
+  <!-- $Id: querymodel.xml,v 1.26 2006-09-22 12:34:45 adam Exp $ -->
   <title>Query Model</title>
   
-  <sect1 id="querymodel-overview">
+  <section id="querymodel-overview">
    <title>Query Model Overview</title>  
    
-   <sect2 id="querymodel-query-languages">
+   <section id="querymodel-query-languages">
     <title>Query Languages</title>
  
     <para>
@@ -29,7 +29,7 @@
     </para>
     
     
-    <sect3 id="querymodel-query-languages-pqf">
+    <section id="querymodel-query-languages-pqf">
      <title>Prefix Query Format (PQF)</title>
      <para>
       Index Data has defined a textual representation in the 
       parties developing Z39.50 software, and is often referred to as
       <emphasis>Prefix Query Notation</emphasis>, or in short 
       PQN. See       
-      <xref linkend="querymodel-pqf"/> for further explanations and
+      <xref linkend="querymodel-rpn"/> for further explanations and
       descriptions of Zebra's capabilities.  
      </para>
-    </sect3>    
+    </section>    
     
-    <sect3 id="querymodel-query-languages-cql">
+    <section id="querymodel-query-languages-cql">
      <title>Common Query Language (CQL)</title>
      <para>
       The query model of the type-1 RPN,
       Zebra can be configured to understand and map CQL to PQF. See
       <xref linkend="querymodel-cql-to-pqf"/>.
      </para>
-    </sect3>    
+    </section>    
  
-   </sect2>
+   </section>
 
-   <sect2 id="querymodel-operation-types">
+   <section id="querymodel-operation-types">
     <title>Operation types</title>
     <para>
      Zebra supports all of the three different
@@ -73,7 +73,7 @@
      functionality and purpose of each is quite in order here. 
     </para>
 
-    <sect3 id="querymodel-operation-type-explain">
+    <section id="querymodel-operation-type-explain">
      <title>Explain Operation</title>
      <para>
       The <emphasis>syntax</emphasis> of Z39.50/SRU queries is
       auto-configure a client user interface to the servers
       capabilities.  
      </para>
-    </sect3>
+    </section>
 
-    <sect3 id="querymodel-operation-type-search">
+    <section id="querymodel-operation-type-search">
      <title>Search Operation</title>
      <para>
       Search and retrieve interactions are the raison d'ĂȘtre. 
       query semantic specifications. Search interactions are the heart
       and soul of Z39.50/SRU servers.
      </para>
-    </sect3>
+    </section>
 
-    <sect3 id="querymodel-operation-type-scan">
+    <section id="querymodel-operation-type-scan">
      <title>Scan Operation</title>
      <para>
       The scan operation is a helper functionality,
       spelling of search terms, to auto-fill search boxes, or to 
       display  controlled vocabularies.
      </para>
-    </sect3>
+    </section>
 
-   </sect2>
+   </section>
 
- </sect1>
+ </section>
 
   
-  <sect1 id="querymodel-pqf">
-   <title>Prefix Query Format syntax and semantics</title>
+  <section id="querymodel-rpn">
+   <title>RPN queries and semantics</title>
    <para>
     The <ulink url="&url.yaz.pqf;">PQF grammar</ulink>
     is documented in the YAZ manual, and shall not be
     query parse tree. 
    </para>
    
-   <sect2 id="querymodel-pqf-tree">
-    <title>PQF tree structure</title>
+   <section id="querymodel-rpn-tree">
+    <title>RPN tree structure</title>
     <para>
-     The PQF parse tree - or the equivalent textual representation -
+     The RPN parse tree - or the equivalent textual representation in PQF -
      may start with one specification of the 
      <emphasis>attribute set</emphasis> used. Following is a query
      tree, which 
      complex query trees.   
     </para>
     
-    <sect3 id="querymodel-attribute-sets">
+    <section id="querymodel-attribute-sets">
      <title>Attribute sets</title>
      <para>
       Attribute sets define the exact meaning and semantics of queries
        <thead>
        <row>
          <entry>Attribute set</entry>
-         <entry>Short hand</entry>
+         <entry>PQF notation (Short hand)</entry>
          <entry>Status</entry>
          <entry>Notes</entry>
         </row>
        
        <tbody>
         <row>
-         <entry><literal>Explain</literal></entry>
+         <entry>Explain</entry>
          <entry><literal>exp-1</literal></entry>
          <entry>Special attribute set used on the special automagic
           <literal>IR-Explain-1</literal> database to gain information on
          <entry>predefined</entry>
         </row>
         <row>
-         <entry><literal>Bib1</literal></entry>
+         <entry>Bib-1</entry>
          <entry><literal>bib-1</literal></entry>
          <entry>Standard PQF query language attribute set which defines the
           semantics of Z39.50 searching. In addition, all of the
          <entry>default</entry>
         </row>
         <row>
-         <entry><literal>GILS</literal></entry>
+         <entry>GILS</entry>
          <entry><literal>gils</literal></entry>
-         <entry>Extension to the <literal>Bib1</literal> attribute set.</entry>
+         <entry>Extension to the Bib-1 attribute set.</entry>
          <entry>predefined</entry>
         </row>
         <!--
         <row>
-       <entry><literal>IDXPATH</literal></entry>
+       <entry>IDXPATH</entry>
        <entry><literal>idxpath</literal></entry>
        <entry>Hardwired XPATH like attribute set, only available for
        indexing with the GRS record model</entry>
      <note>
       <para>
        The Zebra internal query processing is modeled after 
-       the <literal>Bib1</literal> attribute set, and the non-use
+       the Bib-1 attribute set, and the non-use
        attributes type 2-6 are hard-wired in. It is therefore essential
        to be familiar with <xref linkend="querymodel-bib1-nonuse"/>. 
       </para>
      </note>
      
-    </sect3>
+    </section>
     
-    <sect3 id="querymodel-boolean-operators">
+    <section id="querymodel-boolean-operators">
      <title>Boolean operators</title>
      <para>
       A pair of sub query trees, or of atomic queries, is combined
        </thead>
        <tbody>
        <row><entry><literal>@and</literal></entry>
-        <entry>binary <literal>AND</literal> operator</entry>
+        <entry>binary AND operator</entry>
         <entry>Set intersection of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@or</literal></entry>
-        <entry>binary <literal>OR</literal> operator</entry>
+        <entry>binary OR operator</entry>
         <entry>Set union of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@not</literal></entry>
-        <entry>binary <literal>AND NOT</literal> operator</entry>
+        <entry>binary AND NOT operator</entry>
         <entry>Set complement of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@prox</literal></entry>
-        <entry>binary <literal>PROXIMITY</literal> operator</entry>
+        <entry>binary PROXIMITY operator</entry>
         <entry>Set intersection of two atomic queries hit sets. In 
          addition, the intersection set is purged for all 
          documents which do not satisfy the requested query 
        Z> find "information retrieval"
       </screen>
      </para>
-    </sect3>
+    </section>
     
     
-    <sect3 id="querymodel-atomic-queries">
+    <section id="querymodel-atomic-queries">
      <title>Atomic queries (APT)</title>
      <para>
       Atomic queries are the query parts which work on one access point
-      only. These consist of <literal>an attribute list</literal>
-      followed by a <literal>single term</literal> or a
-      <literal>quoted term list</literal>, and are often called 
+      only. These consist of <emphasis>an attribute list</emphasis>
+      followed by a <emphasis>single term</emphasis> or a
+      <emphasis>quoted term list</emphasis>, and are often called 
       <emphasis>Attributes-Plus-Terms (APT)</emphasis> queries.
      </para>
      <para>
        <tbody>
         <row>
          <entry><emphasis>attribute list</emphasis></entry>
-         <entry>List of <literal>orthogonal</literal> attributes</entry>
+         <entry>List of <emphasis>orthogonal</emphasis> attributes</entry>
          <entry>Any of the orthogonal attribute types may be omitted,
           these are inherited from higher query tree nodes, or if not
           inherited, are set to the default Zebra configuration values.
         </row>
         <row>
          <entry><emphasis>term</emphasis></entry>
-         <entry>single <literal>term</literal> 
-          or <literal>quoted term list</literal>   </entry>
+         <entry>single <emphasis>term</emphasis> 
+          or <emphasis>quoted term list</emphasis>   </entry>
          <entry>Here the search terms or list of search terms is added
           to the query</entry>
         </row>
      </para>
 
      <para>
-      The <literal>scan</literal> operation is only supported with 
+      The <emphasis>scan</emphasis> operation is only supported with 
       atomic APT queries, as it is bound to one access point at a
       time. Boolean query trees are not allowed during
-      <literal>scan</literal>.
+      <emphasis>scan</emphasis>.
       </para>
      
      <para>
        Z> scan @attr 1=4 debussy
       </screen>
      </para>
-    </sect3>
+    </section>
     
     
-    <sect3 id="querymodel-resultset">
+    <section id="querymodel-resultset">
      <title>Named Result Sets</title>
      <para>
       Named result sets are supported in Zebra, and result sets can be
      
      <para>
       Defining a named result set and re-using it in the next query,
-      using <literal>yaz-client</literal>. Notice that the client, not
-      the server, assigns the string <literal>'1'</literal> to the
+      using <application>yaz-client</application>. Notice that the client, not
+      the server, assigns the string '1' to the
       named result set. 
       <screen>
        Z> f @attr 1=4 mozart
        the SRU protocol.
       </para>
      </note>
-    </sect3>
+    </section>
     
-    <sect3 id="querymodel-use-string">
+    <section id="querymodel-use-string">
      <title>Zebra's special access point of type 'string'</title>
      <para>
-      The numeric <literal>use (type 1)</literal> attribute is usually 
+      The numeric <emphasis>use (type 1)</emphasis> attribute is usually 
       referred to from a given
       attribute set. In addition, Zebra let you use 
       <emphasis>any internal index
      </para>
      <para>
       See also <xref linkend="querymodel-pqf-apt-mapping"/> for details, and 
-      <xref linkend="server-sru"/>
+      <xref linkend="zebrasrv-sru"/>
       for the SRU PQF query extension using string names as a fast
       debugging facility.
      </para>
-    </sect3>
+    </section>
     
-    <sect3 id="querymodel-use-xpath">
+    <section id="querymodel-use-xpath">
      <title>Zebra's special access point of type 'XPath' 
       for GRS filters</title>
      <para>
       As we have seen above, it is possible (albeit seldom a great
       idea) to emulate 
       <ulink url="http://www.w3.org/TR/xpath">XPath 1.0</ulink> based
-      search by defining <literal>use (type 1)</literal> 
+      search by defining <emphasis>use (type 1)</emphasis>
       <emphasis>string</emphasis> attributes which in appearance 
       <emphasis>resemble XPath queries</emphasis>. There are two
       problems with this approach: first, the XPath-look-alike has to
       than it pretends to access. 
      </para>
      <para>
-      When using the <literal>GRS Record Model</literal> 
-      (see  <xref linkend="record-model-grs"/>), we have the
+      When using the GRS Record Model
+      (see  <xref linkend="grs"/>), we have the
       possibility to embed <emphasis>life</emphasis> 
       XPath expressions
       in the PQF queries, which are here called
-      <literal>use (type 1)</literal> <emphasis>xpath</emphasis>
+      <emphasis>use (type 1)</emphasis> <emphasis>xpath</emphasis>
       attributes. You must enable the 
       <literal>xpath enable</literal> directive in your 
       <literal>.abs</literal> configuration files. 
        size is medium to large.
       </para>
      </warning>
-    </sect3>
-   </sect2>
+    </section>
+   </section>
    
-   <sect2 id="querymodel-exp1">
+   <section id="querymodel-exp1">
     <title>Explain Attribute Set</title>
     <para>
      The Z39.50 standard defines the  
      <ulink url="&url.z39.50.explain;">Explain</ulink> attribute set
-     <literal>Exp-1</literal>, which is used to discover information 
+     Exp-1, which is used to discover information 
      about a server's search semantics and functional capabilities
      Zebra exposes a  "classic" 
      Explain database by base name <literal>IR-Explain-1</literal>, which
     </para>
    <para>
      The attribute-set <literal>exp-1</literal> consists of a single 
-     <literal>use attribute (type 1)</literal>. 
+     use attribute (type 1). 
     </para>
     <para>
      In addition, the non-Use
-     <literal>bib-1</literal> attributes, that is, the types 
-     <literal>Relation</literal>, <literal>Position</literal>,
-     <literal>Structure</literal>, <literal>Truncation</literal>, 
-     and <literal>Completeness</literal> are imported from 
-     the <literal>bib-1</literal> attribute set, and may be used
+     Bib-1 attributes, that is, the types 
+     <emphasis>Relation</emphasis>, <emphasis>Position</emphasis>,
+     <emphasis>Structure</emphasis>, <emphasis>Truncation</emphasis>, 
+     and <emphasis>Completeness</emphasis> are imported from 
+     the Bib-1 attribute set, and may be used
      within any explain query. 
     </para>
     
-    <sect3 id="querymodel-exp1-use">
+    <section id="querymodel-exp1-use">
     <title>Use Attributes (type = 1)</title>
      <para>
       The following Explain search attributes are supported:
       <ulink url="&url.z39.50;">Z39.50</ulink> standard
       for more information.
      </para>
-    </sect3>
+    </section>
     
-    <sect3>
+    <section id="querymodel-examples">
      <title>Explain searches with yaz-client</title>
      <para>
       Classic Explain only defines retrieval of Explain information
        Z> find @attrset exp1 @and @attr 1=1 attributedetails @attr 1=3 Default
       </screen>
      </para>
-    </sect3>
+    </section>
     
-   </sect2>
+   </section>
    
-   <sect2 id="querymodel-bib1">
-    <title>Bib1 Attribute Set</title>
+   <section id="querymodel-bib1">
+    <title>Bib-1 Attribute Set</title>
     <para>
      Most of the information contained in this section is an excerpt of
-     the <literal>ATTRIBUTE SET BIB-1 (Z39.50-1995)
-      SEMANTICS</literal>, 
-     found at <ulink url="&url.z39.50.attset.bib1.1995;">. The BIB-1
+     the ATTRIBUTE SET BIB-1 (Z39.50-1995) SEMANTICS
+     found at <ulink url="&url.z39.50.attset.bib1.1995;">. The Bib-1
       Attribute Set Semantics</ulink> from 1995, also in an updated 
      <ulink url="&url.z39.50.attset.bib1;">Bib-1
       Attribute Set</ulink> 
     </para>
     
     
-   <sect3 id="querymodel-bib1-use">
+   <section id="querymodel-bib1-use">
      <title>Use Attributes (type 1)</title>
 
     <para>
      <filename>tab/gils.att</filename>.
      </para>
     <para>
-      For example, some few  <literal>Bib-1</literal> use
+      For example, some few Bib-1 use
       attributes from the  <filename>tab/bib1.att</filename> are:
       <screen>
        att 1               Personal-name
       Z> scan @attr 1=4 information
      </screen>
     </para>
-    </sect3>
+    </section>
 
-   </sect2>
+   </section>
 
 
-   <sect2 id="querymodel-bib1-nonuse">
+   <section id="querymodel-bib1-nonuse">
      <title>Zebra general Bib1 Non-Use Attributes (type 2-6)</title>
     
-    <sect3 id="querymodel-bib1-relation">
+    <section id="querymodel-bib1-relation">
      <title>Relation Attributes (type 2)</title>
      
      <para>
         <row>
          <entry>AlwaysMatches</entry>
          <entry>103</entry>
-         <entry>supported</entry>
+         <entry>supported *</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
+     <note>
+      <para>
+       AlwaysMatches searches are only supported if alwaysmatches indexing
+       has been enabled. See <xref linkend="default-idx-file"/>
+      </para>
+      </note>
      
      <para>
       The relation attributes 1-5 are supported and work exactly as
       expected.
       All ordering operations are based on a lexicographical ordering, 
       <emphasis>expect</emphasis> when the 
-      <literal>structure attribute numeric (109)</literal> is used. In
+      structure attribute numeric (109) is used. In
       this case, ordering is numerical. See 
       <xref linkend="querymodel-bib1-structure"/>.
       <screen>
 
      <para>
       The relation attribute 
-      <literal>Relevance (102)</literal> is supported, see
+      <emphasis>Relevance (102)</emphasis> is supported, see
       <xref linkend="administration-ranking"/> for full information.
      </para>
      
 
      <para>
       The relation attribute 
-      <literal>AlwaysMatches (103)</literal> is in the default
+      <emphasis>AlwaysMatches (103)</emphasis> is in the default
       configuration
       supported in conjecture with structure attribute 
-      <literal>Phrase (1)</literal> (which may be omitted by
+      <emphasis>Phrase (1)</emphasis> (which may be omitted by
       default). 
       It can be configured to work with other structure attributes,
       see the configuration file 
        <xref linkend="querymodel-pqf-apt-mapping"/>. 
      </para>
      <para>
-      <literal>AlwaysMatches (103)</literal> is a
+      <emphasis>AlwaysMatches (103)</emphasis> is a
       great way to discover how many documents have been indexed in a
       given field. The search term is ignored, but needed for correct
       PQF syntax. An empty search term may be supplied.
      </para>
 
 
-    </sect3>
+    </section>
 
-    <sect3 id="querymodel-bib1-position">
+    <section id="querymodel-bib1-position">
      <title>Position Attributes (type 3)</title>
  
      <para>
         <row>
          <entry>First in field </entry>
          <entry>1</entry>
-         <entry>unsupported</entry>
+         <entry>supported *</entry>
         </row>
         <row>
          <entry>First in subfield</entry>
          <entry>2</entry>
-         <entry>unsupported</entry>
+         <entry>supported *</entry>
         </row>
         <row>
          <entry>Any position in field</entry>
          <entry>3</entry>
-         <entry>supported</entry>
+         <entry>default</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
-    <para>
-      The position attribute values <literal>first in field (1)</literal>,
-      and <literal>first in subfield(2)</literal> are unsupported.
-      Using them silently maps to 
-      <literal>any position in field (3)</literal>. A proper diagnostic
-      should have been issued.
+
+     <note>
+      <para>
+       Zebra only supports first-in-field seaches if the
+       <literal>firstinfield</literal> is enabled for the index
+       Refer to <xref linkend="default-idx-file"/>.
+       Zebra does not distinguish between first in field and
+       first in subfield. They result in the same hit count.
+       Searching for first position in (sub)field in only supported in Zebra
+       2.0.2 and later.
       </para>
-    </sect3>
+     </note>
+    </section>
     
-    <sect3 id="querymodel-bib1-structure">
+    <section id="querymodel-bib1-structure">
      <title>Structure Attributes (type 4)</title>
    
      <para>
        <xref linkend="querymodel-pqf-apt-mapping"/>.
       </para>
      </note>
-    </sect3>
+    </section>
     
-    <sect3 id="querymodel-bib1-truncation">
+    <section id="querymodel-bib1-truncation">
      <title>Truncation Attributes (type = 5)</title>
 
      <para>
        ...
       </screen>
       </para>  
-    </sect3>
+    </section>
     
-    <sect3 id="querymodel-bib1-completeness">
+    <section id="querymodel-bib1-completeness">
     <title>Completeness Attributes (type = 6)</title>
 
 
        <xref linkend="querymodel-pqf-apt-mapping"/>.
       </para>
      </note>
-    </sect3>
-   </sect2>
+    </section>
+   </section>
   
-   </sect1>
+   </section>
 
 
-  <sect1 id="querymodel-zebra">
-   <title>Advanced Zebra PQF Features</title>
+  <section id="querymodel-zebra">
+   <title>Extended Zebra RPN Features</title>
    <para>
     The Zebra internal query engine has been extended to specific needs
     not covered by the <literal>bib-1</literal> attribute set query
     <literal>idxpath</literal> attribute set.  
    </para>
     
-   <sect2 id="querymodel-zebra-attr-allrecords">
+   <section id="querymodel-zebra-attr-allrecords">
     <title>Zebra specific retrieval of all records</title>
     <para>
      Zebra defines a hardwired <literal>string</literal> index name
       well change in future releases of Zebra.
      </para>
     </warning>
-   </sect2>
+   </section>
 
-   <sect2 id="querymodel-zebra-attr-search">
+   <section id="querymodel-zebra-attr-search">
     <title>Zebra specific Search Extensions to all Attribute Sets</title>
     <para>
-     Zebra extends the Bib1 attribute types, and these extensions are
+     Zebra extends the Bib-1 attribute types, and these extensions are
      recognized regardless of attribute 
      set used in a <literal>search</literal> operation query.
     </para>
      </tgroup>
     </table>      
     
-    <sect3 id="querymodel-zebra-attr-sorting">
+    <section id="querymodel-zebra-attr-sorting">
      <title>Zebra Extension Embedded Sort Attribute (type 7)</title>
      <para>
       The embedded sort is a way to specify sort within a query - thus
        Z> find @or @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 @attr 7=2 @attr 1=30 1
       </screen>
      </para>
-    </sect3>
+    </section>
 
      <!--
     Zebra Extension Term Set Attribute
     -->
 
      <!--
-    <sect3 id="querymodel-zebra-attr-estimation">
+    <section id="querymodel-zebra-attr-estimation">
      <title>Zebra Extension Term Set Attribute (type 8)</title>
     <para>
      The Term Set feature is a facility that allows a search to store
      The model has one serious flaw: we don't know the size of term
      set. Experimental. Do not use in production code.
     </warning>
-    </sect3>
+    </section>
     -->
 
 
-    <sect3 id="querymodel-zebra-attr-weight">
+    <section id="querymodel-zebra-attr-weight">
      <title>Zebra Extension Rank Weight Attribute (type 9)</title>
      <para>
       Rank weight is a way to pass a value to a ranking algorithm - so
        Z> find @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 utah
       </screen>
      </para>
-     </sect3>
+     </section>
      
-    <sect3 id="querymodel-zebra-attr-limit">
+    <section id="querymodel-zebra-attr-limit">
      <title>Zebra Extension Approximative Limit Attribute (type 11)</title>
      <para>
       Zebra  computes - unless otherwise configured -
        extension. Do not use in production code.
       </para>
      </warning>
-    </sect3>
+    </section>
 
-    <sect3 id="querymodel-zebra-attr-termref">
+    <section id="querymodel-zebra-attr-termref">
      <title>Zebra Extension Term Reference Attribute (type 10)</title>
      <para>
       Zebra supports the searchResult-1 facility. 
        </para>
      </warning>
      
-    </sect3>
-   </sect2>
+    </section>
+   </section>
     
 
-   <sect2 id="querymodel-zebra-attr-scan">
+   <section id="querymodel-zebra-attr-scan">
     <title>Zebra specific Scan Extensions to all Attribute Sets</title>
     <para>
      Zebra extends the Bib1 attribute types, and these extensions are
      </tgroup>
     </table>      
     
-    <sect3 id="querymodel-zebra-attr-narrow">
+    <section id="querymodel-zebra-attr-narrow">
      <title>Zebra Extension Result Set Narrow (type 8)</title>
      <para>
       If attribute Result Set Narrow (type 8)
       </screen>
      </para>
      
-    <warning>
-      <para>
-       Experimental. Do not use in production code.
-      </para>
-     </warning>
-    </sect3>
+     <para>
+      Zebra 2.0.2 and later is able to skip 0 hit counts. This, however,
+      is known not to scale if the number of terms to skip is high.
+      This most likely will happen if the result set is small (and
+      result in many 0 hits).
+     </para>
+    </section>
 
-    <sect3 id="querymodel-zebra-attr-approx">
+    <section id="querymodel-zebra-attr-approx">
      <title>Zebra Extension Approximative Limit (type 11)</title>
      <para>
       The Zebra Extension Approximative Limit (type 11) is a way to
       enable approximate hit counts for scan hit counts, in the same
       way as for search hit counts. 
      </para>
-     <!--
-     <para>
-     <screen>
-    </screen>
-    </para>
-     -->
-     <warning>
-      <para>
-       Experimental and buggy. Definitely not to be used in production code.
-      </para>
-     </warning>
-    </sect3>
-   </sect2>
+    </section>
+   </section>
    
-   <sect2 id="querymodel-idxpath">
+   <section id="querymodel-idxpath">
     <title>Zebra special IDXPATH Attribute Set for GRS indexing</title>
     <para>
      The attribute-set <literal>idxpath</literal> consists of a single 
      </para>
     </warning>
 
-    <sect3 id="querymodel-idxpath-use">
+    <section id="querymodel-idxpath-use">
     <title>IDXPATH Use Attributes (type = 1)</title>
      <para>
       This attribute set allows one to search GRS filter indexed
       </screen>
      </para>
 
-    </sect3>
-   </sect2>
+    </section>
+   </section>
 
 
-   <sect2 id="querymodel-pqf-apt-mapping">
+   <section id="querymodel-pqf-apt-mapping">
     <title>Mapping from PQF atomic APT queries to Zebra internal 
      register indexes</title>
     <para>
      the named register. 
     </para>
 
-   <sect3 id="querymodel-pqf-apt-mapping-accesspoint">
+   <section id="querymodel-pqf-apt-mapping-accesspoint">
     <title>Mapping of PQF APT access points</title>
     <para>
       Zebra understands four fundamental different types of access
      </para>
 
 
-    </sect3>
+    </section>
 
 
-   <sect3 id="querymodel-pqf-apt-mapping-structuretype">
+   <section id="querymodel-pqf-apt-mapping-structuretype">
      <title>Mapping of PQF APT structure and completeness to 
       register type</title>
     <para>
      contents.
     </para>
 
-     </sect3>
-   </sect2>
+     </section>
+   </section>
 
-   <sect2  id="querymodel-regular">
+   <section  id="querymodel-regular">
     <title>Zebra Regular Expressions in Truncation Attribute (type = 5)</title>
     
     <para>
       Z> find @attr 1=4 @attr 5=102 @attr 2=102 "informat.* retrieval"
      </screen>
     </para>
-   </sect2>
+   </section>
 
   
    <!--
     Zebra can read structured records in many different formats.
    </para>
    -->
-  </sect1>
+  </section>
 
 
-  <sect1 id="querymodel-cql-to-pqf">
+  <section id="querymodel-cql-to-pqf">
    <title>Server Side CQL to PQF Query Translation</title>
    <para>
     Using the
    <para>
     Exhaustive information can be found in the
     Section "Specification of CQL to RPN mappings" in the YAZ manual.
-    <ulink url="http://www.indexdata.dk/yaz/doc/tools.tkl#tools.cql.map">
-     http://www.indexdata.dk/yaz/doc/tools.tkl#tools.cql.map</ulink>,
-   and shall therefore not be repeated here.
+    <ulink url="&url.yaz.cql2pqf;"/>,
+     and shall therefore not be repeated here.
    </para> 
   <!-- 
   <para>
     See 
-      <ulink url="http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html">
-      http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html</ulink>
-    for the Maintenance Agency's work-in-progress mapping of Dublin Core
+   <ulink url="http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html"/>
+   for the Maintenance Agency's work-in-progress mapping of Dublin Core
     indexes to Attribute Architecture (util, XD and BIB-2)
-    attributes.
-   </para>
+   attributes.
+  </para>
    -->
- </sect1>
-
-
+ </section>
 
 </chapter>