+ <para>
+ When writing your own input filters, the
+ <emphasis>record-begin</emphasis> command
+ introduces the profile, and should always be called first thing when
+ introducing a new record.
+ </para>
+
+ <para>
+ The file may contain the following directives:
+ </para>
+
+ <para>
+ <variablelist>
+
+ <varlistentry>
+ <term>name <replaceable>symbolic-name</replaceable></term>
+ <listitem>
+ <para>
+ (m) This provides a shorthand name or
+ description for the profile. Mostly useful for diagnostic purposes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>reference <replaceable>OID-name</replaceable></term>
+ <listitem>
+ <para>
+ (m) The reference name of the OID for the profile.
+ The reference names can be found in the <emphasis>util</emphasis>
+ module of YAZ.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>attset <replaceable>filename</replaceable></term>
+ <listitem>
+ <para>
+ (m) The attribute set that is used for
+ indexing and searching records belonging to this profile.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>tagset <replaceable>filename</replaceable></term>
+ <listitem>
+ <para>
+ (o) The tag set (if any) that describe
+ that fields of the records.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>varset <replaceable>filename</replaceable></term>
+ <listitem>
+ <para>
+ (o) The variant set used in the profile.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>maptab <replaceable>filename</replaceable></term>
+ <listitem>
+ <para>
+ (o,r) This points to a
+ conversion table that might be used if the client asks for the record
+ in a different schema from the native one.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>marc <replaceable>filename</replaceable></term>
+ <listitem>
+ <para>
+ (o) Points to a file containing parameters
+ for representing the record contents in the ISO2709 syntax.
+ Read the description of the MARC representation facility below.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>esetname <replaceable>name filename</replaceable></term>
+ <listitem>
+ <para>
+ (o,r) Associates the
+ given element set name with an element selection file. If an (@) is
+ given in place of the filename, this corresponds to a null mapping for
+ the given element set name.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>any <replaceable>tags</replaceable></term>
+ <listitem>
+ <para>
+ (o) This directive specifies a list of attributes
+ which should be appended to the attribute list given for each
+ element. The effect is to make every single element in the abstract
+ syntax searchable by way of the given attributes. This directive
+ provides an efficient way of supporting free-text searching across all
+ elements. However, it does increase the size of the index
+ significantly. The attributes can be qualified with a structure, as in
+ the <replaceable>elm</replaceable> directive below.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>elm <replaceable>path name attributes</replaceable></term>
+ <listitem>
+ <para>
+ (o,r) Adds an element to the abstract record syntax of the schema.
+ The <replaceable>path</replaceable> follows the
+ syntax which is suggested by the Z39.50 document - that is, a sequence
+ of tags separated by slashes (/). Each tag is given as a
+ comma-separated pair of tag type and -value surrounded by parenthesis.
+ The <replaceable>name</replaceable> is the name of the element, and
+ the <replaceable>attributes</replaceable>
+ specifies which attributes to use when indexing the element in a
+ comma-separated list.
+ A ! in place of the attribute name is equivalent to
+ specifying an attribute name identical to the element name.
+ A - in place of the attribute name
+ specifies that no indexing is to take place for the given element.
+ The attributes can be qualified with <replaceable>field
+ types</replaceable> to specify which
+ character set should govern the indexing procedure for that field.
+ The same data element may be indexed into several different
+ fields, using different character set definitions.
+ See the <xref linkend="field-structure-and-character-sets"/>.
+ The default field type is <literal>w</literal> for
+ <emphasis>word</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>xelm <replaceable>xpath attributes</replaceable></term>
+ <listitem>
+ <para>
+ Specifies indexing for record nodes given by
+ <replaceable>xpath</replaceable>. Unlike directive
+ elm, this directive allows you to index attribute
+ contents. The <replaceable>xpath</replaceable> uses
+ a syntax similar to XPath. The <replaceable>attributes</replaceable>
+ have same syntax and meaning as directive elm, except that operator
+ ! refers to the nodes selected by <replaceable>xpath</replaceable>.
+ <!--
+ xelm / !:w default index
+ xelm // !:w additional index
+ xelm /gils/title/@att myatt:w index attribute @att in myatt
+ xelm title/@att myatt:w same meaning.
+ -->
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>encoding <replaceable>encodingname</replaceable></term>
+ <listitem>
+ <para>
+ This directive specifies character encoding for external records.
+ For records such as XML that specifies encoding within the
+ file via a header this directive is ignored.
+ If neither this directive is given, nor an encoding is set
+ within external records, ISO-8859-1 encoding is assumed.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>xpath <literal>enable</literal>/<literal>disable</literal></term>
+ <listitem>
+ <para>
+ If this directive is followed by <literal>enable</literal>,
+ then extra indexing is performed to allow for XPath-like queries.
+ If this directive is not specified - equivalent to
+ <literal>disable</literal> - no extra XPath-indexing is performed.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <!-- Adam's version
+ <varlistentry>
+ <term>systag <replaceable>systemtag</replaceable> <replaceable>element</replaceable></term>
+ <listitem>
+ <para>
+ This directive maps system information to an element during
+ retrieval. This information is dynamically created. The
+ following system tags are defined
+ <variablelist>
+ <varlistentry>
+ <term>size</term>
+ <listitem>
+ <para>
+ Size of record in bytes. By default this
+ is mapped to element <literal>size</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>rank</term>
+ <listitem>
+ <para>
+ Score/rank of record. By default this
+ is mapped to element <literal>rank</literal>.
+ If no score was calculated for the record (non-ranked
+ searched) search this directive is ignored.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>sysno</term>
+ <listitem>
+ <para>
+ Zebra's system number (record ID) for the
+ record. By default this is mapped to element
+ <literal>localControlNumber</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ If you do not want a particular system tag to be applied,
+ then set the resulting element to something undefined in the
+ abs file (such as <literal>none</literal>).
+ </para>
+ </listitem>
+ </varlistentry>
+ -->
+
+ <!-- Mike's version -->
+ <varlistentry>
+ <term>
+ systag
+ <replaceable>systemTag</replaceable>
+ <replaceable>actualTag</replaceable>
+ </term>
+ <listitem>
+ <para>
+ Specifies what information, if any, Zebra should
+ automatically include in retrieval records for the
+ ``system fields'' that it supports.
+ <replaceable>systemTag</replaceable> may
+ be any of the following:
+ <variablelist>
+ <varlistentry>
+ <term><literal>rank</literal></term>
+ <listitem><para>
+ An integer indicating the relevance-ranking score
+ assigned to the record.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>sysno</literal></term>
+ <listitem><para>
+ An automatically generated identifier for the record,
+ unique within this database. It is represented by the
+ <literal><localControlNumber></literal> element in
+ XML and the <literal>(1,14)</literal> tag in GRS-1.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>size</literal></term>
+ <listitem><para>
+ The size, in bytes, of the retrieved record.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ The <replaceable>actualTag</replaceable> parameter may be
+ <literal>none</literal> to indicate that the named element
+ should be omitted from retrieval records.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ <note>
+ <para>
+ The mechanism for controlling indexing is not adequate for
+ complex databases, and will probably be moved into a separate
+ configuration table eventually.
+ </para>
+ </note>
+
+ <para>
+ The following is an excerpt from the abstract syntax file for the GILS
+ profile.
+ </para>