<refsect1><title>TYPES</title>
<para>
- The Bib-1 attribute defines six attribute types: Use (1), Relation (2),
- Position (3), Structure (4), Truncation (5) and completeness (6).
+ The Bib-1 attribute set defines six attribute types: Use (1), Relation (2),
+ Position (3), Structure (4), Truncation (5) and Completeness (6).
</para>
</refsect1>
</para>
</refsect1>
- <refsect1><title>COMPLETENSS (6)</title>
+ <refsect1><title>COMPLETENESS (6)</title>
<para>
<screen>
1 Incomplete subfield
<sect1 id="odr.introduction">
<title>Introduction</title>
<para>
- &odr; is the BER-encoding/decoding subsystem of &yaz;. Care as been taken
+ &odr; is the BER-encoding/decoding subsystem of &yaz;. Care has been taken
to isolate &odr; from the rest of the package - specifically from the
transport interface. &odr; may be used in any context where basic
ASN.1/BER representations are used.
odr_setprint(ODR o, FILE *file);
</synopsis>
before encoders or decoders are being invoked.
- It is also possible to direct the output to a buffer (of indeed
+ It is also possible to direct the output to a buffer (or indeed
another file), by using the more generic mechanism:
<synopsis>
void odr_set_stream(ODR o, void *handle,
The <replaceable>stream_write</replaceable> takes the ODR handle
as parameter, the user-defined handle, a type
<literal>ODR_OCTETSTRING</literal>, <literal>ODR_VISIBLESTRING</literal>
- which indicates the type of contents is being written.
+ which indicates the type of contents being written.
</para>
<para>
Another utility useful for diagnostics (error handling) or as
</synopsis>
which returns a list of current elements that ODR deals with at the
moment. For the returned array, say <literal>ar</literal>,
- <literal>ar[0]</literal> is the top level element,
+ then <literal>ar[0]</literal> is the top level element,
<literal>ar[n]</literal> is the last. The last element has the
property that <literal>ar[n+1] == NULL</literal>.
</para>
The <literal>buf</literal> field should point to the character array
that holds the octetstring. The <literal>len</literal> field holds the
actual length.
- The character array need not be null terminated.
+ The character array need not be null-terminated.
</para>
<para>
To make things a little easier, an alternative is given for string
int odr_cstring(ODR o, char **p, int optional, const char *name);
</synopsis>
<para>
- Which encoded or decodes between OCTETSTRING representations and
- null-terminates C strings.
+ which encodes or decodes between OCTETSTRING representations and
+ null-terminated C strings.
</para>
<para>
Functions are provided for the derived string types, e.g.:
parameter is ignored. On decoding, it returns 1 if the type is found in
the data stream. <literal>size</literal> bytes of memory are allocated,
and <literal>*p</literal> is set to point to this space.
- <function>odr_sequence_end()</function> is called at the end of the
+ The <function>odr_sequence_end()</function> is called at the end of the
complex function. Assume that a type is defined like this:
</para>
<screen>
</synopsis>
<para>
Assume that the IMPLICIT in the type definition above were replaced
- with EXPLICIT (or that the IMPLICIT keyword were simply deleted, which
+ with EXPLICIT (or that the IMPLICIT keyword was simply deleted, which
would be equivalent). The structure definition would look the same,
but the function would look like this:
</para>
Notice that the interface here gets kind of nasty. The reason is
simple: Explicitly tagged, constructed types are fairly rare in
the protocols that we care about, so the
- esthetic annoyance (not to mention the dangers of a cluttered
+ aesthetic annoyance (not to mention the dangers of a cluttered
interface) is less than the time that would be required to develop a
better interface. Nevertheless, it is far from satisfying, and it's a
point that will be worked on in the future. One option for you would
declaring sequence elements (including CHOICEs) optional.
</para>
<para>
- The ASN.1 specifications naturally requires that each member of a
+ The ASN.1 specifications naturally require that each member of a
CHOICE have a distinct tag, so they can be told apart on decoding.
Sometimes it can be useful to define a CHOICE that has multiple types
that share the same tag. You'll need some other mechanism, perhaps
<para>
provides this functionality. When called, it leaves a notice for the next
call to <function>odr_choice()</function> to be called on the decoding
- stream <literal>o</literal> that only the <literal>arm</literal> entry with
+ stream <literal>o</literal>, that only the <literal>arm</literal> entry with
a <literal>which</literal> field equal to <literal>what</literal>
should be tried.
</para>
<para>
The <function>cs_create</function> function returns a null-pointer
if a system error occurs.
- The <literal>blocking</literal> parameter should be one if
- you wish the association to operate in blocking mode, zero otherwise.
+ The <literal>blocking</literal> parameter should be '1' if
+ you wish the association to operate in blocking mode, and '0' otherwise.
The <literal>protocol</literal> field should be
<literal>PROTO_Z3950</literal> or <literal>PROTO_HTTP</literal>.
Protocol <literal>PROTO_SR</literal> is no longer supported.
should call it repeatedly with the same values of <literal>buf</literal>
and <literal>len</literal>, until the buffer has been transmitted.
When a full buffer has been sent, the function will return 0 for
- success. -1 indicates an error condition (see below).
+ success. The return value -1 indicates an error condition (see below).
</para>
<synopsis>
int cs_get(COMSTACK handle, char **buf, int *size);
around internally by the subsystem when partial packages are read. Before
calling
<function>cs_get</function>
- for the fist time, the buffer can be initialized to the null pointer,
- and the length should also be set to 0 - cs_get will perform a
+ for the first time, the buffer can be initialized to the null pointer,
+ and the length should also be set to 0 (cs_get will perform a
<function>malloc(2)</function>
- on the buffer for you. When a full buffer has been read, the size of
- the package is returned (which will always be greater than 1). -1
- indicates an error condition.
+ on the buffer for you). When a full buffer has been read, the size of
+ the package is returned (which will always be greater than 1).
+ The return value -1 indicates an error condition.
</para>
<para>
See also the <function>cs_more()</function> function below.
int cs_fileno(COMSTACK h);
</synopsis>
<para>
- Returns the file descriptor of the association. Use this when
+ returns the file descriptor of the association. Use this when
file-level operations on the endpoint are required
(<function>select(2)</function> operations, specifically).
</para>
<note>
<para>
You may need to use this function with some care if your
- name server service is slow or unreliable
+ name server service is slow or unreliable.
</para>
</note>
</sect1>
<function>cs_straddr</function>. The <parameter>str</parameter>
is similar to that described for <function>cs_straddr</function>
but with a prefix denoting the &comstack; type. Prefixes supported
- are <literal>tcp:</literal>, <literal>unix:</literal> and
- <literal>ssl:</literal> for TCP/IP, UNIX and SSL respectively.
+ are <literal>tcp:</literal> and <literal>unix:</literal> and
+ <literal>ssl:</literal> for TCP/IP and UNIX and SSL respectively.
If no prefix is given, then TCP/IP is used.
The <parameter>blocking</parameter> is passed to
function <function>cs_create</function>. The third parameter
void *cs_get_ssl(COMSTACK cs);
</synopsis>
Returns the SSL handle, <literal>SSL *</literal> for comstack. If comstack
- is not of type SSL, NULL is returned.
+ is not of type SSL, then NULL is returned.
</para>
<para>
<synopsis>
</synopsis>
<para>
You can the textual representation of the error code
- by using <function>cs_errmsg</function> - which
- works like <function>strerror(3)</function>
+ by using <function>cs_errmsg</function>, which
+ works like <function>strerror(3)</function>.
</para>
<synopsis>
const char *cs_errmsg(int n);
</synopsis>
<para>
- It is also possible to get straight to the textual represenataion
- without the error code by using
+ It is also possible to get straight to the textual representation
+ without the error code, by using
<function>cs_strerror</function>.
</para>
<synopsis>
which is a library that encodes/decodes/prints BER packages.
<command>yaz-asncomp</command> allows you to specify name of
resulting source via options. Alternatively, you can specify
- a DEFINISIONS file, which provides customized output to
+ a DEFINITIONS file, which provides customized output to
many output files - if the ASN.1 specification file consists
of many modules.
</para>
The definitions file is really a Tcl script but follows
traditional rules for Shell like configuration files.
That is # denotes the beginning of a comment. Definitions
- are line oriented. The definitions files usually consists of
+ are line oriented. The definitions files usually consist of
a series of variable assignments of the form:
</para>
<para>
Maps member <replaceable>member</replaceable> in CHOICE of
<replaceable>name</replaceable> in module
<replaceable>module</replaceable> to value.
- Value consists of to or three tokens. The first token
+ Value consists of two or three tokens. The first token
is name of the integer in the <literal>union</literal> that
is used as selector for the <literal>union</literal> itself.
The second token is name of the <literal>union</literal>.
<term>-a <replaceable>filename</replaceable></term>
<listitem><para>
If specified, logging of protocol packages will be appended
- file given. If <replaceable>filename</replaceable> is
+ to the file given. If <replaceable>filename</replaceable> is
specified as <literal>-</literal>, the output is written
to <literal>stdout</literal>.
</para></listitem>
given. YAZ client will
connect to a proxy on the address and port given.
The actual target will be specified as part of the InitRequest
- to inform the proxy about actual target.
+ to inform the proxy about the actual target.
</para></listitem>
</varlistentry>
<varlistentry>
</term>
<listitem>
<para>Sets the name(s) of the database(s) to search. One or more
- databases may be specified separated by blanks. This commands overrides
+ databases may be specified, separated by blanks. This command overrides
the database given in <replaceable>zurl</replaceable>.
</para>
</listitem>
<para>Fetches records by sending a Present Request from the start
position given by
<replaceable>start</replaceable>
- a number of records given by <replaceable>number</replaceable>. If
+ and a number of records given by <replaceable>number</replaceable>. If
<replaceable>start</replaceable> is not given, then the client
- will fetch from position of the last retrieved record plus 1. If
+ will fetch from the position of the last retrieved record plus 1. If
<replaceable>number</replaceable> is not given, then one record will
be fetched at a time.
</para>
<listitem>
<simpara>
Sets preferred position for scan. This value
- is used in next scan. By default position is 1.
+ is used in the next scan. By default, position is 1.
</simpara>
</listitem>
</varlistentry>
</term>
<listitem>
<simpara>
- Set step-size for scan. This value is used in next scan
+ Set step-size for scan. This value is used in the next scan
sent to the target. By default step-size is 0.
</simpara>
</listitem>
<literal>authentication</literal> <replaceable>openauth</replaceable>
</term>
<listitem>
- <para>Sets up a authentication string if a server requires
+ <para>Sets up an authentication string if a server requires
authentication (v2 OpenStyle). The authentication string is first
sent to the server when the
<link linkend="command-open"><literal>open</literal></link> command is
<literal>mspn</literal> <replaceable>n</replaceable>
</term>
<listitem>
- <para>Sets the number of records should be returned if the
+ <para>Sets the number of records that should be returned if the
number of records in the result set is between the values of
<literal>lslb</literal> and <literal>ssub</literal>.
See the
</term>
<listitem>
<para>Sets the element set name for the records. Many targets support
- element sets are B (for brief) and F (for full).
+ element sets B (for brief) and F (for full).
</para>
</listitem>
</varlistentry>
<literal>ccl</literal> for CCL search (Type-2 Query),
<literal>cql</literal> for CQL (Type-104 search with CQL OID),
<literal>ccl2rpn</literal> for
- <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
+ <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query),
<literal>cql2rpn</literal> for
CQL to RPN conversion (Type-1 Query).
</para>
the record document for the request. If doc is preceded with
"<", then the following characters are treated as a filename
with the records to be updated. Otherwise doc is treated as
- a document itself. The doc may also be quited in double quotes.
+ a document itself. The doc may also be quoted in double quotes.
If doc is omitted, the last received record (as part of present
response or piggybacked search response) is used for the update.
</para>
</term>
<listitem>
<para>Executes list of commands from
- file <replaceable>filename</replaceable>, just like source on
+ file <replaceable>filename</replaceable>, just like 'source' on
most UNIX shells. A single dot (<literal>.</literal>) can be used
as an alternative.
</para>
<replaceable>flag</replaceable>
</term>
<listitem>
- <para>Specifies whether YAZ client automatically reconnect if
+ <para>Specifies whether YAZ client automatically reconnects if the
target closes connection (Z39.50 only).
</para>
<para>
<listitem>
<para>Specifies whether YAZ client should wait for
response protocol packages after a request.
- By default YAZ client waits (on) for response packages immediately
+ By default YAZ client waits (<literal>on</literal>) for response packages immediately
after a command (find, show) has been issued. If <literal>off</literal>
is used, YAZ client does not attempt to receive packages automatically.
These will have to be manually received when command
terminal as returned by <function>nl_langinfo</function> call.
</para>
<para>
- If <replaceable>marcharset</replaceable> is given, it specifies name
+ If <replaceable>marccharset</replaceable> is given, it specifies name
of the character set of retrieved MARC records from server. See
- also <literal>marcharset</literal> command.
+ also <literal>marccharset</literal> command.
</para>
<note>
<para>
The <replaceable>name</replaceable> is your
name for the OID, <replaceable>class</replaceable> is the
class, and <replaceable>OID</replaceable> is the raw OID in
- dot notation. Class is one <literal>appctx</literal>,
+ dot notation. Class is one of: <literal>appctx</literal>,
<literal>absyn</literal>, <literal>attet</literal>,
<literal>transyn</literal>, <literal>diagset</literal>,
<literal>recsyn</literal>, <literal>resform</literal>,
<screen>
f "donald knuth"
</screen>
- In those queries no attributes was specified.
+ In those queries, no attributes were specified.
This leaves it up to the server what fields to search but
- most servers will search in all fields. Some servers does not
+ most servers will search in all fields. Some servers do not
support this feature though, and require that some attributes
are defined. To add one attribute you could do:
<screen>
<refsect1><title>DESCRIPTION</title>
<para>
- <command>yaz-iconv</command> converts data in file in character
+ <command>yaz-iconv</command> converts data in the character
set specified by <replaceable>from</replaceable> to output in
- character set as specified by <replaceable>to</replaceable>.
+ the character set as specified by <replaceable>to</replaceable>.
</para>
<para>
- This <command>yaz-iconv</command> utility similar to the
+ This <command>yaz-iconv</command> utility is similar to the
<command>iconv</command> found on many POSIX systems (Glibc, Solaris, etc).
</para>
<para>
The yaz-iconv command and the API as defined in
<filename>yaz/yaz-iconv.h</filename> is a wrapper for the
library system call iconv. But YAZ' iconv utility also implements
- conversions on its own. The table below lists characters sets (or encodings).
+ conversions on its own. The table below lists characters sets (or encodings)
that are supported by YAZ. Each character set is marked with either
<emphasis>encode</emphasis> or <emphasis>decode</emphasis>. If
- an encoding is encode-enabled YAZ may convert <emphasis>to</emphasis>
- to the designated encoding. If an encoding is decode-enabled, YAZ
+ an encoding is encode-enabled, YAZ may convert <emphasis>to</emphasis>
+ the designated encoding. If an encoding is decode-enabled, YAZ
may convert <emphasis>from</emphasis> the designated encoding.
</para>
<variablelist>
<term>marc8s (encode, decode)</term>
<listitem>
<para>
- Like MARC8 but with conversion prefers non-combined characters
+ Like MARC8 but conversion prefers non-combined characters
in the Latin-1 plane over combined characters.
</para>
</listitem>
<refsect1><title>DESCRIPTION</title>
<para>
- <command>yaz-icu</command> is utility which demonstrates
+ <command>yaz-icu</command> is a utility which demonstrates
the ICU chain module of yaz. (<filename>yaz/icu.h</filename>).
</para>
<para>
The utility can be used in two ways. It may read some text
using an XML configuration for configuring ICU and show text analysis.
- This mode is triggered by option <literal>-c</literal> which specififies
+ This mode is triggered by option <literal>-c</literal> which specifies
the configuration to be used. The input file is read from standard
input or from a file if <literal>infile</literal> is specified.
</para>
Specifies extra information to be printed about the ICU system.
If <replaceable>type</replaceable> is <literal>c</literal>
then ICU converters are printed.
- If <replaceable>type</replaceable> is <literal>l</literal>
- available locales are printed.
- If <replaceable>type</replaceable> is <literal>t</literal>
- available transliterators are printed.
+ If <replaceable>type</replaceable> is <literal>l</literal>,
+ then available locales are printed.
+ If <replaceable>type</replaceable> is <literal>t</literal>,
+ then available transliterators are printed.
</para></listitem>
</varlistentry>
</refsect1>
<refsect1><title>ICU chain configuration</title>
<para>
- The ICU chain configuration speicifies one or more rules to convert
+ The ICU chain configuration specifies one or more rules to convert
text data into tokens. The configuration format is XML based.
</para>
<para>
<varlistentry>
<term>casemap</term>
<listitem><para>
- Converts case and rule specifies how:
+ Converts case (and rule specifies how):
<variablelist>
<varlistentry>
<term>l</term>
<listitem>
- <para>Lowercase using ICU function u_strToLower. </para>
+ <para>Lower case using ICU function u_strToLower. </para>
</listitem>
</varlistentry>
<varlistentry>
<term>t</term>
<listitem>
- <para>To title using UCU function u_strToTitle.</para>
+ <para>To title using ICU function u_strToTitle.</para>
</listitem>
</varlistentry>
<refsect1><title>DESCRIPTION</title>
<para>
- <command>yaz-illclient</command> is an client which sends an ISO
+ <command>yaz-illclient</command> is a client which sends an ISO
ILL request to a remote server and decodes the response from it.
Exactly one server address ( <replaceable>server-addr</replaceable> )
must be specified.
<varlistentry>
<term>-v <replaceable>loglevel</replaceable>]</term>
<listitem><para>
- Specify the log level
+ Specify the log level.
</para></listitem>
</varlistentry>
<refsect1><title>DESCRIPTION</title>
<para>
- <command>yaz-json-parse</command> is utility which demonstrates
+ <command>yaz-json-parse</command> is a utility which demonstrates
the JSON API of YAZ. (<filename>yaz/json.h</filename>).
</para>
<para>
The program attempts to parse a JSON from standard input (stdin).
It will return exit code 1 if parsing fails and the parsing error message
will be printed to standard error (stderr). The program returns exit code
- 0 parsing succeeds and return no output, unless -p is given (see below).
+ 0 if parsing succeeds, and returns no output unless -p is given (see below).
</para>
</refsect1>
<varlistentry>
<term>-p</term>
<listitem><para>
- Makes the JSON parser echo the JSON result string to standard output -
- if parsing from stdin was successful. If -p is given twice the
- output is a multi line output with indentation (pretty print).
+ Makes the JSON parser echo the JSON result string to standard output,
+ if parsing from stdin was successful. If -p is given twice, then the
+ output is a multi-line output with indentation (pretty print).
</para></listitem>
</varlistentry>
</para>
<para>
<literal>request</literal> logs a one-liner for each request (init, search,
- etc).
+ etc.).
</para>
<para>
<literal>requestdetail</literal> logs the details of every request, before
it is passed to the back-end, and the results received from it.
</para>
<para>
- Each server program (zebra, etc) is supposed to define its own log levels
+ Each server program (zebra, etc.) is supposed to define its own log levels
in addition to these. As they depend on the server in question, they can
not be described here. See above how to find out about them.
</para>
<refsect1><title>LOG FILENAME EXAMPLES</title>
<para>
- A file with format my_YYYYMMDD.log is where Y, M, D is year, month, and day
- digits is given as follows
+ A file with format my_YYYYMMDD.log (where Y, M, D is year, month, and day
+ digits) is given as follows:
<literal>-l my_%Y%m%d.log</literal> . And since the filename
- is depending on day, rotaion will occur on midnight.
+ is depending on day, rotation will occur on midnight.
</para>
<para>
A weekly log could be specified as
<varlistentry>
<term>-f <replaceable>from</replaceable></term>
<listitem><para>
- Specify the character set <replaceable>from</replaceable>
+ Specify the character set
of the input MARC record.
Should be used in conjunction with option <literal>-t</literal>.
Refer to the yaz-iconv man page for supported character sets.
<varlistentry>
<term>-t <replaceable>to</replaceable></term>
<listitem><para>
- Specify the character set <replaceable>of</replaceable>
+ Specify the character set
of the output.
Should be used in conjunction with option <literal>-f</literal>.
Refer to the yaz-iconv man page for supported character sets.
<listitem><para>
Writes a chunk of records to a separate file with prefix given,
i.e. splits a record batch into files with only at most
- "chunk" ISO2709 record per file. By default chunk is 1 (one record
+ "chunk" ISO2709 records per file. By default chunk is 1 (one record
per file). See option <literal>-C</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem><para>
- Makes yaz-marcdump prints record number and input file offset
+ Makes yaz-marcdump print record number and input file offset
of each record read.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-n</term>
<listitem><para>
- MARC output is omitted so that MARC input is only checkecd.
+ MARC output is omitted so that MARC input is only checked.
</para></listitem>
</varlistentry>
limited in functionality compared to programs such as curl, wget.
</para>
<para>
- The options must be precede the URL given on the command line to take
+ The options must precede the URL given on the command line, to take
effect.
</para>
<para>
<listitem><para>
Specifies a user and a password to be uesd in HTTP
basic authentication in the following URL fetch. The user
- and password must be separated by a slash (this it is not
+ and password must be separated by a slash (thus it is not
possible to specify a user with a slash in it).
</para></listitem>
</varlistentry>
</screen>
</para>
<para>
- For UNIX local socket the address is the filename of the local socket.
+ For UNIX local socket, the address is the filename of the local socket.
</para>
</refsect1>
<refsect1>
integer value of that term is used as hit count. This allows testers
to return any number of hits. <command>yaz-ztest</command> includes
24 MARC records for testing. Hit counts exceeding 24 will make
- <command>yaz-ztest</command> return the same record batch over and over..
- So record at position 1, 25, 49, etc .. are equivalent.
+ <command>yaz-ztest</command> return the same record batch over and over.
+ So record at position 1, 25, 49, etc. are equivalent.
</para>
<para>
- For XML if no element set is given or element has value "marcxml",
+ For XML, if no element set is given or element has value "marcxml",
MARCXML is returned (each of the 24 dummy records converted from
- ISO2709 to XML). For element set OP, OPAC XML is returned.
+ ISO2709 to XML). For element set OP, then OPAC XML is returned.
</para>
<para>
yaz-ztest may also return predefined XML records (for testing).
This is enabled if <literal>YAZ_ZTEST_XML_FETCH</literal> environment
- variable is defined. A record is fetched form a file (one record per file).
+ variable is defined. A record is fetched from a file (one record per file).
The path for the filename is
<replaceable>F</replaceable><replaceable>E</replaceable><literal>.</literal><replaceable>d</replaceable><literal>.xml</literal>
where <replaceable>F</replaceable> is the YAZ_ZTEST_XML_FETCH value
The value of the delay may either be a fixed floating point
value which specifies the delay in seconds.
Alternatively the value may be given as two floating point numbers
- separated by colon, which wil make <command>yaz-ztest</command> perform
+ separated by colon, which will make <command>yaz-ztest</command> perform
a random sleep between the first and second number.
</para>
<para>