1 Example DOM XML filter configuration using XSLT stylesheets
4 Get some more data to play with:
8 (stop the script when you get tired waiting ..)
12 Checking manually the retrieval stylesheets:
14 cat data/debug-record.xml
15 xsltproc conf/oai2dc.xsl data/debug-record.xml
16 xsltproc conf/oai2zebra.xsl data/debug-record.xml
19 Checking manually the indexing stylesheet:
21 xsltproc conf/oai2index.xsl data/debug-record.xml
25 zebraidx -c conf/zebra.cfg init
26 zebraidx -c conf/zebra.cfg update data
27 zebraidx -c conf/zebra.cfg commit
29 (in case you have not installed zebra yet, use the following command:
30 ../../index/zebraidx -c conf/zebra.cfg this and that .. )
33 Starting the SRU/SRW/Z39.50 server in PQF mode only:
35 zebrasrv -c conf/zebra.cfg
37 Or, alternatively, starting the SRU/SRW/Z39.50 server including
38 PQF and CQL query configuration:
40 zebrasrv -f yazserver.xml
46 yaz-client localhost:9999
54 Z39.50 presents using presentation stylesheets:
63 Z39.50 buildin Zebra presents (in this configuration only if
64 started without yaz-frontendserver):
66 Z> elements zebra::meta
69 Z> elements zebra::meta::sysno
76 Z> elements zebra::index
79 Z> elements zebra::snippet
82 Z> elements zebra::facet::any:w
85 Z> elements zebra::facet::any:w,dc_title:w
90 Z39.50 searches targeted at specific indexes
93 Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
96 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20
99 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
102 Z> find @attr 1=dc_title communication
105 Z> find @attr 1=dc_identifier @attr 4=3
106 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
111 Notice that all indexes defined by 'type="0"' in the
112 indexing style sheet must be searched using the '@attr 4=3'
113 structure attribute instruction.
115 Notice also that searching and scan on indexes
116 'dc_contributor', 'dc_language', 'dc_rights', and 'dc_source'
117 fails, simply because none of the records in this example set
118 have these fields set, and consequently, these indexes are
127 yaz-client localhost:9999
130 Z> scan @attr 1=oai_identifier @attr 4=3 oai
131 Z> scan @attr 1=oai_datestamp @attr 4=3 1
132 Z> scan @attr 1=oai_setspec @attr 4=3 2000
134 Z> scan @attr 1=dc_title communication
135 Z> scan @attr 1=dc_identifier @attr 4=3 a
140 Z39.50 search using server-side CQL conversion:
148 Z> find creator = the
149 Z> find dc.creator = the
152 Z> find description < the
153 Z> find title le some
154 Z> find title ge some
157 Z> find identifier eq
158 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
159 Z> find relation eq something
162 etc, etc. Notice that all indexes defined by 'type="0"' in the
163 indexing style sheet must be searched using the 'eq'
171 Z39.50 scan using server side CQL conversion:
173 Unfortunately, this will _never_ work as it is not supported by the
175 If you want to use scan using server side CQL conversion, you need to
176 make an SRW connection using yaz-client, or a
177 SRU connection using REST Web Services - any browser will do.
180 SRU Explain ZeeRex response:
182 http://localhost:9999/
183 http://localhost:9999/?version=1.1&operation=explain
186 SRU Search Retrieve records:
188 http://localhost:9999/?version=1.1&operation=searchRetrieve
191 http://localhost:9999/?version=1.1&operation=searchRetrieve
192 &query=date=1978-01-01
193 &startRecord=1&maximumRecords=1&recordSchema=dc
195 http://localhost:9999/?version=1.1&operation=searchRetrieve
198 http://localhost:9999/?version=1.1&operation=searchRetrieve
199 &query=description=the
204 http://localhost:9999/?version=1.1&operation=searchRetrieve
210 http://localhost:9999/?version=1.1&operation=scan&scanClause=title=a
211 http://localhost:9999/?version=1.1&operation=scan
212 &scanClause=identifier%20eq%20a
214 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
218 SRW explain with CQL index points:
220 Z> open http://localhost:9999
223 Notice: when opening a connection using the 'http.//' prefix, yaz-client
224 uses SRW SOAP connections, and 'form xml' and 'querytype cql' are
228 SRW search using implicit server side CQL:
230 Z> open http://localhost:9999
231 Z> find identifier eq
232 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
233 Z> find description < the
236 In SRW connection mode, the follwing fails due to problem in yaz-client:
241 SRW scan using implicit server side CQL:
243 yaz-client http://localhost:9999
244 Z> scan title = communication
245 Z> scan identifier eq a
247 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
252 SRW search using X-PQF query
254 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=dc
256 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::data
258 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::meta
260 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::index::dc_description
262 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
264 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_description:w