1 Example DOM XML filter configuration using XSLT stylesheets
3 Get some more data to play with:
6 (stop the script when you get tired waiting ..)
9 Checking manually the retrieval stylesheets:
10 cat data/debug-record.xml
11 xsltproc conf/oai2dc.xsl data/debug-record.xml
12 xsltproc conf/oai2zebra.xsl data/debug-record.xml
14 Checking manually the indexing stylesheet:
15 xsltproc conf/oai2index.xsl data/debug-record.xml
18 zebraidx -c conf/zebra.cfg init
19 zebraidx -c conf/zebra.cfg update data
20 zebraidx -c conf/zebra.cfg commit
22 (in case you have not installed zebra yet, use the following command:
23 ../../index/zebraidx -c conf/zebra.cfg this and that .. )
25 Starting the SRU/SRW/Z39.50 server in PQF mode only:
26 zebrasrv -c conf/zebra.cfg
28 Or, alternatively, starting the SRU/SRW/Z39.50 server including
29 PQF and CQL query configuration:
30 zebrasrv -f yazserver.xml
33 yaz-client localhost:9999
40 Z39.50 presents using presentation stylesheets:
47 Z39.50 buildin Zebra presents (in this configuration only if
48 started without yaz-frontendserver):
50 Z> elements zebra::meta
53 Z> elements zebra::meta::sysno
60 Z> elements zebra::index
63 Z> elements zebra::snippet
66 Z> elements zebra::facet::any:w
69 Z> elements zebra::facet::any:w,dc_title:w
72 Z39.50 searches targeted at specific indexes
74 Z> find @attr 1=title communication
77 Z> find @attr 1=author alain
81 Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
84 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20
87 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
90 Z> find @attr 1=identifier @attr 4=3
91 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
96 Notice that all indexes defined by 'type="0"' in the
97 indexing style sheet must be searched using the '@attr 4=3'
98 structure attribute instruction.
100 Notice also that searching and scan on indexes
101 'contributor', 'language', 'rights', and 'source'
102 fails, simply because none of the records in this example set
103 have these fields set, and consequently, these indexes are
106 Z39.50 searches using Bib-1
108 - only if bib1.att is referred to from zebra.cfg
110 Z> find @attr 1=4 communication
113 Z> find @attr 1=1003 alain
116 Z> find @attr 1=21 all
119 Z> find @attr 1=1018 data
124 yaz-client localhost:9999
127 Z> scan @attr 1=oai_identifier @attr 4=3 oai
128 Z> scan @attr 1=oai_datestamp @attr 4=3 1
129 Z> scan @attr 1=oai_setspec @attr 4=3 2000
131 Z> scan @attr 1=dc_title communication
132 Z> scan @attr 1=dc_identifier @attr 4=3 a
137 Z39.50 search using server-side CQL conversion:
145 Z> find creator = the
146 Z> find dc.creator = the
149 Z> find description < the
150 Z> find title le some
151 Z> find title ge some
154 Z> find identifier eq
155 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
156 Z> find relation eq something
159 etc, etc. Notice that all indexes defined by 'type="0"' in the
160 indexing style sheet must be searched using the 'eq'
168 Z39.50 scan using server side CQL conversion:
170 Unfortunately, this will _never_ work as it is not supported by the
172 If you want to use scan using server side CQL conversion, you need to
173 make an SRW connection using yaz-client, or a
174 SRU connection using REST Web Services - any browser will do.
177 SRU Explain ZeeRex response:
179 http://localhost:9999/
180 http://localhost:9999/?version=1.1&operation=explain
183 SRU Search Retrieve records:
185 http://localhost:9999/?version=1.1&operation=searchRetrieve
188 http://localhost:9999/?version=1.1&operation=searchRetrieve
189 &query=date=1978-01-01
190 &startRecord=1&maximumRecords=1&recordSchema=dc
192 http://localhost:9999/?version=1.1&operation=searchRetrieve
195 http://localhost:9999/?version=1.1&operation=searchRetrieve
196 &query=description=the
201 http://localhost:9999/?version=1.1&operation=searchRetrieve
207 http://localhost:9999/?version=1.1&operation=scan&scanClause=title=a
208 http://localhost:9999/?version=1.1&operation=scan
209 &scanClause=identifier%20eq%20a
211 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
215 SRW explain with CQL index points:
217 Z> open http://localhost:9999
220 Notice: when opening a connection using the 'http.//' prefix, yaz-client
221 uses SRW SOAP connections, and 'form xml' and 'querytype cql' are
225 SRW search using implicit server side CQL:
227 Z> open http://localhost:9999
228 Z> find identifier eq
229 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
230 Z> find description < the
233 In SRW connection mode, the follwing fails due to problem in yaz-client:
238 SRW scan using implicit server side CQL:
240 yaz-client http://localhost:9999
241 Z> scan title = communication
242 Z> scan identifier eq a
244 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
249 SRW search using X-PQF query
251 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=dc
253 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::data
255 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::meta
257 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::index::dc_description
259 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
261 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_description:w