+ This example shows how Zebra can be used with absolutely minimal
+ configuration to index a body of
+ <ulink url="http://www.w3.org/xml/###">XML</ulink>
+ documents, and search them using
+ <ulink url="http://www.w3.org/xpath/###">XPath</ulink>
+ expressions to specify access points.
+ </para>
+ <para>
+ Go to the <literal>examples/dinosauricon</literal> subdirectory
+ of the distribution archive.
+ There you will find a <literal>records</literal> subdirectory,
+ which contains some raw XML data to be added to the database: in
+ this case, as single file, <literal>genera.xml</literal>,
+ which contain information about all the known dinosaur genera as of
+ August 2002.
+ </para>
+ <para>
+ Now we need to create the Zebra database, which we do with the
+ Zebra indexer, <literal>zebraidx</literal>, which is
+ driven by the <literal>zebra.cfg</literal> configuration file.
+ For our purposes, we don't need any
+ special behaviour - we can use the defaults - so we start with a
+ minimal file that just tells <literal>zebraidx</literal> where to
+ find the default indexing rules, and how to parse the records:
+ <screen>
+ profilePath: .:../../tab:../../../yaz/tab
+ recordType: grs.sgml
+ </screen>
+ </para>
+ <para>
+ That's all you need for a minimal Zebra configuration. Now you can
+ roll the XML records into the database and build the indexes:
+ <screen>
+ zebraidx update records
+ </screen>
+ </para>
+ <para>
+ Now start the server. Like the indexer, its behaviour is
+ controlled by the
+ <literal>zebra.cfg</literal> file; and like the indexer, it works
+ just fine with this minimal configuration.
+ <screen>
+ zebrasrv
+ </screen>
+ By default, the server listens on IP port number 9999, although
+ this can easily be changed - see
+ <xref linkend="zebrasrv"/>.
+ </para>
+ <para>
+ Now you can use the Z39.50 client program of your choice to execute
+ XPath-based boolean queries and fetch the XML records that satisfy
+ them:
+ <screen>
+ $ yaz-client tcp:@:9999
+ Connecting...Ok.
+ Z> find @attr 1=/GENUS/MEANING @and lizard earthquakes
+ Number of hits: 1
+ Z> format xml
+ Z> show 1
+ <GENUS name="Sauroposeidon" type="with">
+ <MEANING>lizard Poseidon <LOW>(Greek god of, among other things, earthquakes)</LOW></MEANING>
+ <SPECIES name="proteles">
+ <AUTHOR type="vide" name="Franklin" year="2000"></AUTHOR>
+ <AUTHOR name="Wedel, Cifelli, Sanders"></AUTHOR>
+ </SPECIES>
+ <PLACE name="Oklahoma"></PLACE>
+ <TIME value="Albian"></TIME>
+ <LENGTH value="30" q="1"></LENGTH>
+ <REMAINS content="rib, cervical vertebrae"></REMAINS>
+ <ESSAY>
+ <P> This new <NOMEN name="Brachiosaurus"></NOMEN>-like <LINK content="dinosaur"></LINK>
+ was perhaps the tallest. With its head raised, it stood 60 feet (nearly
+ 20 m) tall. </P>
+ </ESSAY>
+
+ <idzebra xmlns="http://www.indexdata.dk/zebra/">
+ <size>593</size>
+ <localnumber>891</localnumber>
+ <filename>records/genera.xml</filename>
+ </idzebra>
+ </GENUS>
+ </screen>