X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fexamples.xml;h=aefb286934d1da873a7d955d1f71b118883da494;hb=dfc79a96b0ad352eb2b974c9d70c5e9fb8c6b79e;hp=53f839da4673da6c05f084e3e9870b5168a13d66;hpb=528edc9943ba3311a40b4ab875c0bc9aca5caa87;p=idzebra-moved-to-github.git diff --git a/doc/examples.xml b/doc/examples.xml index 53f839d..aefb286 100644 --- a/doc/examples.xml +++ b/doc/examples.xml @@ -1,5 +1,5 @@ - + Example Configurations @@ -10,7 +10,7 @@ driven by a master configuration file, which may refer to other subsidiary configuration files. By default, they try to use zebra.cfg in the working directory as the - master file; but this can be changed using the -t + master file; but this can be changed using the -c option to specify an alternative master configuration file. @@ -76,7 +76,7 @@ minimal file that just tells zebraidx where to find the default indexing rules, and how to parse the records: - profilePath: .:../../tab:../../../yaz/tab + profilePath: .:../../tab recordType: grs.sgml @@ -106,7 +106,7 @@ $ yaz-client tcp:@:9999 Connecting...Ok. - Z> find @attr 1=/GENUS/MEANING @and lizard earthquakes + Z> find @attr 1=/GENUS/SPECIES/AUTHOR/@name Wedel Number of hits: 1 Z> format xml Z> show 1 @@ -125,12 +125,11 @@ 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> + <size>593</size> + <localnumber>891</localnumber> + <filename>records/genera.xml</filename> + </idzebra> </GENUS> @@ -139,62 +138,105 @@ + - Example 2: Supporting Z39.50 Searches + Example 2: Supporting Interoperable Searches - You may have noticed as zebraidx was building - the database that it issued a warning, which we ignored at the - time: - - $ zebraidx update records - 00:45:46-08/10: ../../index/zebraidx(5016) [warn] records/genera.xml:0 Couldn't open GENUS.abs [No such file or directory] - + The problem with the previous example is that you need to know the + structure of the documents in order to find them. For example, + when we wanted to know the genera for which Matt Wedel is an + author + (Sauroposeidon proteles), + we had to formulate a complex XPath + 1=/GENUS/SPECIES/AUTHOR/@name + which embodies the knowledge that author names are specified in the + name attribute of the + <AUTHOR> element, + which is inside the + <SPECIES> element, + which in turn is inside the top-level + <GENUS> element. - - - - + + + +