<chapter id="record-model">
- <!-- $Id: recordmodel.xml,v 1.5 2002-08-28 09:39:45 mike Exp $ -->
+ <!-- $Id: recordmodel.xml,v 1.12 2002-10-30 11:09:39 adam Exp $ -->
<title>The Record Model</title>
<para>
kind of structured data. Each record in the system is associated with
a <emphasis>record schema</emphasis> which lends context to the data
elements of the record.
- Any number of record schema can coexist in the system.
+ Any number of record schemas can coexist in the system.
Although it may be wise to use only a single schema within
one database, the system poses no such restrictions.
</para>
<para>
The record model described in this chapter applies to the fundamental,
structured
- record type <literal>grs</literal> as introduced in
+ record type <literal>grs</literal>, introduced in
<xref linkend="record-types"/>.
+ <!--
FIXME - Need to describe the simple string-tag model, or at least
refer to it here. -H
+ -->
</para>
<para>
input filter by preparing conversion rules based on regular
expressions and possibly augmented by a flexible scripting language
(Tcl).
- The input filter produces as output an internal representation:
+ The input filter produces as output an internal representation,
+ a tree structure.
</para>
</listitem>
subsequent sections.
Zebra can read structured records in many different formats.
How this is done is governed by additional parameters after the
- "grs" keyboard, separated by "." characters.
+ "grs" keyword, separated by "." characters.
</para>
<para>
<screen>
<Distributor>
- <Name> USGS/WRD </Name>
- <Organization> USGS/WRD </Organization>
- <Street-Address>
- U.S. GEOLOGICAL SURVEY, 505 MARQUETTE, NW
- </Street-Address>
- <City> ALBUQUERQUE </City>
- <State> NM </State>
- <Zip-Code> 87102 </Zip-Code>
- <Country> USA </Country>
- <Telephone> (505) 766-5560 </Telephone>
+ <Name> USGS/WRD </Name>
+ <Organization> USGS/WRD </Organization>
+ <Street-Address>
+ U.S. GEOLOGICAL SURVEY, 505 MARQUETTE, NW
+ </Street-Address>
+ <City> ALBUQUERQUE </City>
+ <State> NM </State>
+ <Zip-Code> 87102 </Zip-Code>
+ <Country> USA </Country>
+ <Telephone> (505) 766-5560 </Telephone>
</Distributor>
</screen>
</para>
- <note>
- <para>
+ <!-- There is no indentation in the example above! -H
+ -note-
+ -para-
The indentation used above is used to illustrate how Zebra
interprets the mark-up. The indentation, in itself, has no
significance to the parser for the canonical input format, which
discards superfluous whitespace.
- </para>
- </note>
+ -/para-
+ -/note-
+ -->
+
<para>
The keywords surrounded by <...> are
<emphasis>tags</emphasis>, while the sections of text
Each element is terminated by a closing tag - beginning
with <literal><</literal>/, and containing the same symbolic
tag-name as the corresponding opening tag.
- The general closing tag - <literal><</literal>>/ -
+ The general closing tag - <literal></></literal> -
terminates the element started by the last opening tag. The
structuring of elements is significant.
The element <emphasis>Telephone</emphasis>,
<screen>
<gils>
- <title>Zen and the Art of Motorcycle Maintenance</title>
+ <title>Zen and the Art of Motorcycle Maintenance</title>
</gils>
</screen>
</sect3>
- <sect3>
+ <sect3><!-- ### we shouldn't make such a big deal about this -->
<title>Variants</title>
<para>
tag with the same <emphasis>class</emphasis> and
<emphasis>value</emphasis> settings, or by the
appearance of another, normal tag. In other words, the end-tags for
- the variants used in the example above could have been saved.
+ the variants used in the example above could have been omitted.
</para>
<para>
</para>
<para>
- An action is surrounded by curly braces ({...}), and
+ An action is surrounded by curly braces ({...}), and
consists of a sequence of statements. Statements may be separated
by newlines or semicolons (;).
Within actions, the strings that matched the expressions
immediately preceding the action can be referred to as
- $0, $1, $2, etc.
+ $0, $1, $2, etc.
</para>
<para>
<variablelist>
<varlistentry>
- <term>begin <emphasis>type [parameter ... ]</emphasis></term>
+ <term>begin <emphasis>type [parameter ... ]</emphasis></term>
<listitem>
<para>
Begin a new
</listitem>
</varlistentry>
<varlistentry>
- <term>end <emphasis>[type]</emphasis></term>
+ <term>end <emphasis>[type]</emphasis></term>
<listitem>
<para>
Close a tagged element. If no parameter is given,
<para>
<screen>
- TITLE "Zen and the Art of Motorcycle Maintenance"
ROOT
- AUTHOR "Robert Pirsig"
+ TITLE "Zen and the Art of Motorcycle Maintenance"
+ AUTHOR "Robert Pirsig"
</screen>
</para>
<para>
<screen>
- TITLE "Zen and the Art of Motorcycle Maintenance"
ROOT
- FIRST-NAME "Robert"
- AUTHOR
- SURNAME "Pirsig"
+ TITLE "Zen and the Art of Motorcycle Maintenance"
+ AUTHOR
+ FIRST-NAME "Robert"
+ SURNAME "Pirsig"
</screen>
</para>
tree).
</para>
- <note>
- <para>
+ <!--
FIXME! Documentation needs extension here about types of nodes - numerical,
textual, etc., plus the various types of inclusion notes.
</para>
- </note>
+ -->
</sect2>
or all of the following:
</para>
- <para>
+ <!--
FIXME - Need a diagram here, or a simple explanation how it all hangs together -H
- </para>
+ -->
<para>
<listitem>
<para>
- The Tag set (again, this can consist of several different sets).
+ The tag set (again, this can consist of several different sets).
This is used when reading the records from a file, to recognize the
different tags, and when transmitting the record to the client -
mapping the tags to their numerical representation, if they are
<para>
Generally, the files are simple ASCII files, which can be maintained
- using any text editor. Blank lines, and lines beginning with a (#) are
- ignored. Any characters on a line followed by a (#) are also ignored.
+ using any text editor. Blank lines, and lines beginning with a (#) are
+ ignored. Any characters on a line followed by a (#) are also ignored.
All other lines contain <emphasis>directives</emphasis>, which provide
some setting or value to the system.
Generally, settings are characterized by a single
</sect2>
- <sect2>
+ <sect2 id="abs-file">
<title>The Abstract Syntax (.abs) Files</title>
<para>
</listitem></varlistentry>
<varlistentry>
<term>att
- <emphasis>att-value att-name [local-value]</emphasis></term>
+ <emphasis>att-value att-name [local-value]</emphasis></term>
<listitem>
<para>
(o,r) This
</listitem></varlistentry>
<varlistentry>
<term>simpleElement
- <emphasis>path ['variant' variant-request]</emphasis></term>
+ <emphasis>path ['variant' variant-request]</emphasis></term>
<listitem>
<para>
(o,r) This corresponds to a simple element request
is assumed by the MARC family in Z39.50.
</para>
- <para>
+ <!--
<emphasis>NOTE: FIXME! The schema-mapping functions are so far limited to a
straightforward mapping of elements. This should be extended with
mechanisms for conversions of the element contents, and conditional
mappings of elements based on the record contents.</emphasis>
- </para>
+ -->
<para>
These are the directives of the schema mapping file format:
header of the record.
</para>
- <para>
- <emphasis>NOTE: FIXME! This will be described better. We're in the process of
+ <!--
+ NOTE: FIXME! This will be described better. We're in the process of
re-evaluating and most likely changing the way that MARC records are
handled by the system.</emphasis>
- </para>
+ -->
</sect2>
<listitem>
<para>
- Curly braces {} may be used to enclose ranges of single
+ Curly braces {} may be used to enclose ranges of single
characters (possibly using the escape convention described in the
- preceding point), eg. {a-z} to introduce the
+ preceding point), eg. {a-z} to introduce the
standard range of ASCII characters.
Note that the interpretation of such a range depends on
the concrete representation in your local, physical character set.
is used to show the hierarchical structure of the record. All
"GRS" type records support both the GRS-1 and SUTRS
representations.
- FIXME - What is SUTRS - should be expanded here
+ <!-- FIXME - What is SUTRS - should be expanded here -->
</para>
</listitem>
abstract syntaxes can be mapped to the SOIF format, although nested
elements are represented by concatenation of the tag names at each
level.
- FIXME - Is this used anywhere ? -H
+ <!-- FIXME - Is this used anywhere ? -H -->
</para>
</listitem>