1 Example DOM XML filter configuration using XSLT stylesheets
4 Checking manually the retrieval stylesheets:
6 cat data/debug-record.xml
7 xsltproc conf/oai2dc.xsl data/debug-record.xml
8 xsltproc conf/oai2zebra.xsl data/debug-record.xml
11 Checking manually the indexing stylesheet:
13 xsltproc conf/oai2index.xsl data/debug-record.xml
17 zebraidx -c conf/zebra.cfg init
18 zebraidx -c conf/zebra.cfg update data/oai-caltech.xml
19 zebraidx -c conf/zebra.cfg commit
21 (in case you have not installed zebra yet, use the following command:
22 ../../index/zebraidx -c conf/zebra.cfg this and that .. )
25 Starting the SRU/SRW/Z39.50 server in PQF mode only:
27 zebrasrv -c conf/zebra.cfg
29 Or, alternatively, starting the SRU/SRW/Z39.50 server including
30 PQF and CQL query configuration:
32 zebrasrv -f yazserver.xml
38 yaz-client localhost:9999
46 Z39.50 presents using presentation stylesheets:
55 Z39.50 buildin Zebra presents (in this configuration only if
56 started without yaz-frontendserver):
58 Z> elements zebra::meta
61 Z> elements zebra::meta::sysno
68 Z> elements zebra::index
71 Z> elements zebra::snippet
74 Z> elements zebra::facet::any:w
77 Z> elements zebra::facet::any:w,dc_title:w
82 Z39.50 searches targeted at specific indexes
85 Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
88 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20
91 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
94 Z> find @attr 1=dc_title communication
97 Z> find @attr 1=dc_identifier @attr 4=3
98 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
103 Notice that all indexes defined by 'type="0"' in the
104 indexing style sheet must be searched using the '@attr 4=3'
105 structure attribute instruction.
107 Notice also that searching and scan on indexes
108 'dc_contributor', 'dc_language', 'dc_rights', and 'dc_source'
109 fails, simply because none of the records in this example set
110 have these fields set, and consequently, these indexes are
119 yaz-client localhost:9999
122 Z> scan @attr 1=oai_identifier @attr 4=3 oai
123 Z> scan @attr 1=oai_datestamp @attr 4=3 1
124 Z> scan @attr 1=oai_setspec @attr 4=3 2000
126 Z> scan @attr 1=dc_title communication
127 Z> scan @attr 1=dc_identifier @attr 4=3 a
132 Z39.50 search using server-side CQL conversion:
140 Z> find creator = the
141 Z> find dc.creator = the
144 Z> find description < the
145 Z> find title le some
146 Z> find title ge some
149 Z> find identifier eq
150 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
151 Z> find relation eq something
154 etc, etc. Notice that all indexes defined by 'type="0"' in the
155 indexing style sheet must be searched using the 'eq'
163 Z39.50 scan using server side CQL conversion:
165 Unfortunately, this will _never_ work as it is not supported by the
167 If you want to use scan using server side CQL conversion, you need to
168 make an SRW connection using yaz-client, or a
169 SRU connection using REST Web Services - any browser will do.
172 SRU Explain ZeeRex response:
174 http://localhost:9999/
175 http://localhost:9999/?version=1.1&operation=explain
178 SRU Search Retrieve records:
180 http://localhost:9999/?version=1.1&operation=searchRetrieve
183 http://localhost:9999/?version=1.1&operation=searchRetrieve
184 &query=date=1978-01-01
185 &startRecord=1&maximumRecords=1&recordSchema=dc
187 http://localhost:9999/?version=1.1&operation=searchRetrieve
190 http://localhost:9999/?version=1.1&operation=searchRetrieve
191 &query=description=the
196 http://localhost:9999/?version=1.1&operation=searchRetrieve
202 http://localhost:9999/?version=1.1&operation=scan&scanClause=title=a
203 http://localhost:9999/?version=1.1&operation=scan
204 &scanClause=identifier%20eq%20a
206 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
210 SRW explain with CQL index points:
212 Z> open http://localhost:9999
215 Notice: when opening a connection using the 'http.//' prefix, yaz-client
216 uses SRW SOAP connections, and 'form xml' and 'querytype cql' are
220 SRW search using implicit server side CQL:
222 Z> open http://localhost:9999
223 Z> find identifier eq
224 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
225 Z> find description < the
228 In SRW connection mode, the follwing fails due to problem in yaz-client:
233 SRW scan using implicit server side CQL:
235 yaz-client http://localhost:9999
236 Z> scan title = communication
237 Z> scan identifier eq a
239 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes