View | Details | Raw Unified | Return to bug 12836
Collapse All | Expand All

(-)a/etc/zebradb/explain-authorities.xml (-404 / +197 lines)
Lines 1-621 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!-- $Id: explain.xml,v 1.14 2006/09/27 13:35:09 marc Exp $ -->
4
5
<!-- this file configures the SRU/SRW explain response -->
2
<!-- this file configures the SRU/SRW explain response -->
6
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
3
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
7
<!-- validate this using zeerex-2.0.xsd -->
4
<!-- validate this using zeerex-2.0.xsd -->
8
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
5
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
9
6
<!-- Generated by misc/maintenance/generate_explain.pl on 2017-03-02 07:06:34 -->
10
<explain xmlns="http://explain.z3950.org/dtd/2.0/">
7
<explain xmlns="http://explain.z3950.org/dtd/2.0/">
11
8
  <serverInfo protocol="SRW/SRU/Z39.50" version="2.0" transport="http">
12
  <!-- try stylesheet url: http://./?stylesheet=docpath/sru2.xsl -->
9
    <!-- If host is set to @ you need to hand edit it, or you can edit the
13
  <serverInfo protocol="SRW/SRU/Z39.50">
10
         <listen> element for "publicserver" in koha-conf.xml:
14
11
         <listen id="publicserver" >tcp:<host>:<port></listen>
15
    <host>__ZEBRA_SRU_HOST__</host>
12
         and then regenerate the Explain doc. -->
16
13
    <host>library.example.org</host>
17
    <port>9999</port>
14
    <!-- The sample and default configs provided with Koha assume that only
18
    <!-- <database numRecs="1314" lastUpdate="2006-03-15 09-05-33">
15
             bibliographic records will be exposed through SRU: There is an
19
         Default</database> -->
16
             available <listen id="publicserver"/> element set up for serving
17
             bibliographic records, but no corresponding element for a public
18
             authorities server. Since we can't guess at the id of a public
19
             authorities server, the port element below is filled with a
20
             placeholder which should be replaced manually if a public authorities
21
             server is set up. -->
22
    <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
20
    <database>authorities</database>
23
    <database>authorities</database>
21
        <!--<authentication>
22
      <user>kohauser</user>
23
      <group>kohagroup</group>
24
      <password>zebrastripes</password>
25
    </authentication>-->
26
  </serverInfo>
24
  </serverInfo>
27
28
  <databaseInfo>
25
  <databaseInfo>
29
26
    <title lang="en" primary="true">Koha Authorities SRU/SRW/Z39.50 server</title>
30
    <title lang="en" primary="true">Koha 3 Authority SRU/SRW/Z39.50 server</title>
27
    <description lang="en" primary="true">Koha Authorities Server</description>
31
28
    <author>My library</author>
32
    <description lang="en" primary="true">
29
    <contact>library@example.org</contact>
33
      Koha 3 Authority Server
30
    <implementation identifier="zebra" version="2.0">
34
    </description>
35
36
    <author>Joshua Ferraro, LibLime, http://liblime.com,
37
            Marc Cromme, Mike Taylor, Index Data Aps, 
38
            http://www.indexdata.dk</author>
39
40
    <contact>Joshua Ferraro, jmf(at)liblime(dot)com</contact>
41
42
    <!--<langUsage codes="en fr">
43
        The records are in English and French.
44
        </langUsage>  -->
45
    <!-- <extend>Partially crawled web data</extend> -->
46
   
47
    <history>
48
      Created for Koha 3
49
      http://koha-community.org
50
    </history>
51
52
    <implementation  identifier="zebra" version="1.4">
53
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
31
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
54
    </implementation>
32
    </implementation>
55
    
33
    <links>
56
    <links> 
34
      <link type="www">http://library.example.org/</link>
57
      <!--<link type="www">http://foo.indexdata.dk:80</link>-->
35
      <link type="z39.50">http://library.example.org:9999</link>
58
      <link type="z39.50">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_AUTHORITIES_PORT__</link>
36
      <link type="srw">http://library.example.org:9999</link>
59
      <link type="srw">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_AUTHORITIES_PORT__</link>
37
      <link type="sru">http://library.example.org:9999</link>
60
      <link type="sru">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_AUTHORITIES_PORT__</link>
38
      <link type="oai">http://library.example.org/cgi-bin/koha/oai.pl</link>
61
      <!--<link type="oai"></link>
62
      <link type="rss"></link>
63
      <link type="icon"></link> -->
64
    </links>
39
    </links>
65
    
66
  </databaseInfo>
40
  </databaseInfo>
67
68
  <!--
69
  <metaInfo>
41
  <metaInfo>
70
    <dateModified>2002-03-29 19:00:00</dateModified>
42
    <dateModified>2017-03-02 07:06:34</dateModified>
71
    <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
72
                   id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
73
    <dateAggregated>2002-03-30 06:30:00</dateAggregated>
74
  </metaInfo>
43
  </metaInfo>
75
  -->
76
77
78
  <indexInfo>
44
  <indexInfo>
79
    <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
45
    <set identifier="info:srw/cql-context-set/1/cql-v1.1" name="cql"/>
80
      <title>CQL Standard Set</title>
46
    <set identifier="info:srw/cql-context-set/2/rec-1.0" name="rec"/>
81
    </set>
47
    <set identifier="info:srw/cql-context-set/1/dc-v1.1" name="dc"/>
82
    <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
48
    <set identifier="http://zing.z3950.org/cql/bath/2.0/" name="bath"/>
83
      <title>Record Standard Set</title>
84
    </set>
85
    <set name="alvis" identifier="http://indexdata.dk/zebra/xslt/1">
86
      <title>Alvis Set</title>
87
    </set>
88
    <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
89
      <title>Dublin Core Set</title>
90
    </set>
91
    <set name="bib1" identifier="1.2.840.10003.3.1">
92
      <title>BIB-1 Z39.50 Standard Set</title>
93
    </set>
94
95
96
    <!-- CQL standard index -->
97
    <index search="true" scan="true" sort="false">
49
    <index search="true" scan="true" sort="false">
98
      <title lang="en">CQL Server Choice</title>
99
      <map><name set="cql">serverChoice</name></map>
100
      <map>
50
      <map>
101
        <attr type="1" set="bib1">text</attr>
51
        <name set="cql">serverChoice</name>
102
      </map>
52
      </map>
103
    </index>
53
      <map primary="true">
104
    <index search="true" scan="true" sort="false">
54
        <attr type="1">1016</attr>
105
      <title lang="en">CQL All</title>
106
      <map><name set="cql">all</name></map>
107
      <map>
108
        <attr type="1" set="bib1">text</attr>
109
      </map>
55
      </map>
110
    </index>
56
    </index>
111
112
    <!-- Record ID index -->
113
    <index search="true" scan="true" sort="false">
57
    <index search="true" scan="true" sort="false">
114
      <title lang="en">Record ID</title>
115
      <map><name set="rec">id</name></map>
116
      <map>
58
      <map>
117
        <attr type="1" set="bib1">rec:id</attr>
59
        <name set="rec">id</name>
118
        <attr type="4" set="bib1">3</attr>
119
      </map>
60
      </map>
120
    </index>
61
      <map primary="true">
121
62
        <attr type="1">12</attr>
122
    <!-- Alvis indexes -->
123
    <index search="true" scan="true" sort="false">
124
      <title lang="en">Alvis Text Relevance Ranked</title>
125
      <map><name set="alvis">text</name></map>
126
      <map>
127
        <attr type="1" set="bib1">text</attr>
128
        <attr type="2" set="bib1">102</attr>
129
      </map>
63
      </map>
130
    </index>
64
    </index>
131
    <index search="true" scan="true" sort="false">
65
    <index search="true" scan="true" sort="false">
132
      <title lang="en">Alvis Anchor Text</title>
133
      <map><name set="alvis">anchortext</name></map>
134
      <map>
66
      <map>
135
        <attr type="1" set="bib1">anchortext</attr>
67
        <name set="dc">identifier</name>
136
        <attr type="2" set="bib1">102</attr>
137
      </map>
68
      </map>
138
    </index>
69
      <map primary="true">
139
    <index search="true" scan="true" sort="false">
70
        <attr type="1">1007</attr>
140
      <title lang="en">Alvis Date Modified</title>
141
      <map><name set="alvis">date-modified</name></map>
142
      <map>
143
        <attr type="1" set="bib1">ac:date-modified</attr>
144
        <attr type="4" set="bib1">5</attr>
145
      </map>
71
      </map>
146
    </index>
72
    </index>
147
    <index search="true" scan="true" sort="false">
73
    <index search="true" scan="true" sort="false">
148
      <title lang="en">Alvis Date Checked</title>
149
      <map><name set="alvis">date-checked</name></map>
150
      <map>
74
      <map>
151
        <attr type="1" set="bib1">ac:date-checked</attr>
75
        <name set="dc">title</name>
152
        <attr type="4" set="bib1">5</attr>
153
      </map>
76
      </map>
154
    </index>
77
      <map primary="true">
155
    <index search="true" scan="true" sort="false">
78
        <attr type="1">4</attr>
156
      <title lang="en">Alvis Identifier Url</title>
157
      <map><name set="alvis">identifier-url</name></map>
158
      <map>
159
        <attr type="1" set="bib1">ac:identifier-url</attr>
160
        <attr type="4" set="bib1">3</attr>
161
      </map>
79
      </map>
162
    </index>
80
    </index>
163
    <!--<index search="true" scan="true" sort="false">
164
      <title lang="en">Alvis Identifier Server</title>
165
      <map><name set="alvis">identifier-server</name></map>
166
      <map>
167
        <attr type="1" set="bib1">ac:identifier-server</attr>
168
        <attr type="4" set="bib1">3</attr>
169
      </map>
170
    </index> -->
171
    <index search="true" scan="true" sort="false">
81
    <index search="true" scan="true" sort="false">
172
      <title lang="en">Alvis Topic Class</title>
173
      <map><name set="alvis">topic-class</name></map>
174
      <map>
82
      <map>
175
        <attr type="1" set="bib1">an:topic-class</attr>
83
        <name set="dc">subject</name>
176
      </map>
84
      </map>
177
    </index>
85
      <map primary="true">
178
    <index search="true" scan="true" sort="false">
86
        <attr type="1">21</attr>
179
      <title lang="en">Alvis Language</title>
180
      <map><name set="alvis">language</name></map>
181
      <map>
182
        <attr type="1" set="bib1">an:language</attr>
183
      </map>
87
      </map>
184
    </index>
88
    </index>
185
    <index search="true" scan="true" sort="false">
89
    <index search="true" scan="true" sort="false">
186
      <title lang="en">Alvis NLP Entity Date</title>
187
      <map><name set="alvis">entity-date</name></map>
188
      <map>
90
      <map>
189
        <attr type="1" set="bib1">la:entity-date</attr>
91
        <name set="dc">creator</name>
190
        <attr type="4" set="bib1">3</attr>
92
      </map>
93
      <map primary="true">
94
        <attr type="1">1003</attr>
191
      </map>
95
      </map>
192
    </index>
96
    </index>
193
    <index search="true" scan="true" sort="false">
97
    <index search="true" scan="true" sort="false">
194
      <title lang="en">Alvis NLP Entity Disease</title>
195
      <map><name set="alvis">entity-disease</name></map>
196
      <map>
98
      <map>
197
        <attr type="1" set="bib1">la:entity-disease</attr>
99
        <name set="dc">author</name>
198
        <attr type="4" set="bib1">3</attr>
100
      </map>
101
      <map primary="true">
102
        <attr type="1">1003</attr>
199
      </map>
103
      </map>
200
    </index>
104
    </index>
201
    <index search="true" scan="true" sort="false">
105
    <index search="true" scan="true" sort="false">
202
      <title lang="en">Alvis NLP Entity Gene</title>
203
      <map><name set="alvis">entity-gene</name></map>
204
      <map>
106
      <map>
205
        <attr type="1" set="bib1">la:entity-gene</attr>
107
        <name set="dc">itemtype</name>
206
        <attr type="4" set="bib1">3</attr>
108
      </map>
109
      <map primary="true">
110
        <attr type="1">1031</attr>
207
      </map>
111
      </map>
208
    </index>
112
    </index>
209
    <index search="true" scan="true" sort="false">
113
    <index search="true" scan="true" sort="false">
210
      <title lang="en">Alvis NLP Entity Location</title>
211
      <map><name set="alvis">entity-location</name></map>
212
      <map>
114
      <map>
213
        <attr type="1" set="bib1">la:entity-location</attr>
115
        <name set="dc">barcode</name>
214
        <attr type="4" set="bib1">3</attr>
215
      </map>
116
      </map>
216
    </index>
117
      <map primary="true">
217
    <!--<index search="true" scan="true" sort="false">
118
        <attr type="1">1028</attr>
218
      <title lang="en">Alvis NLP Entity Mail</title>
219
      <map><name set="alvis">entity-mail</name></map>
220
      <map>
221
        <attr type="1" set="bib1">la:entity-mail</attr>
222
        <attr type="4" set="bib1">3</attr>
223
      </map>
119
      </map>
224
    </index>-->
120
    </index>
225
    <index search="true" scan="true" sort="false">
121
    <index search="true" scan="true" sort="false">
226
      <title lang="en">Alvis NLP Entity Person</title>
227
      <map><name set="alvis">entity-person</name></map>
228
      <map>
122
      <map>
229
        <attr type="1" set="bib1">la:entity-person</attr>
123
        <name set="dc">branch</name>
230
        <attr type="4" set="bib1">3</attr>
231
      </map>
124
      </map>
232
    </index>
125
      <map primary="true">
233
    <!-- <index search="true" scan="true" sort="false">
126
        <attr type="1">1033</attr>
234
      <title lang="en">Alvis NLP Entity Protein</title>
235
      <map><name set="alvis">entity-protein</name></map>
236
      <map>
237
        <attr type="1" set="bib1">la:entity-protein</attr>
238
        <attr type="4" set="bib1">3</attr>
239
      </map>
127
      </map>
240
    </index> -->
128
    </index>
241
    <index search="true" scan="true" sort="false">
129
    <index search="true" scan="true" sort="false">
242
      <title lang="en">Alvis NLP Entity Species</title>
243
      <map><name set="alvis">entity-species</name></map>
244
      <map>
130
      <map>
245
        <attr type="1" set="bib1">la:entity-species</attr>
131
        <name set="dc">isbn</name>
246
        <attr type="4" set="bib1">3</attr>
132
      </map>
133
      <map primary="true">
134
        <attr type="1">7</attr>
247
      </map>
135
      </map>
248
    </index>
136
    </index>
249
    <index search="true" scan="true" sort="false">
137
    <index search="true" scan="true" sort="false">
250
      <title lang="en">Alvis NLP Entity URL</title>
251
      <map><name set="alvis">entity-url</name></map>
252
      <map>
138
      <map>
253
        <attr type="1" set="bib1">la:entity-url</attr>
139
        <name set="dc">issn</name>
254
        <attr type="4" set="bib1">3</attr>
140
      </map>
141
      <map primary="true">
142
        <attr type="1">8</attr>
255
      </map>
143
      </map>
256
    </index>
144
    </index>
257
    <index search="true" scan="true" sort="false">
145
    <index search="true" scan="true" sort="false">
258
      <title lang="en">Alvis NLP Entity Organism</title>
259
      <map><name set="alvis">entity-organism</name></map>
260
      <map>
146
      <map>
261
        <attr type="1" set="bib1">la:entity-organism</attr>
147
        <name set="dc">any</name>
262
        <attr type="4" set="bib1">3</attr>
148
      </map>
149
      <map primary="true">
150
        <attr type="1">1016</attr>
263
      </map>
151
      </map>
264
    </index>
152
    </index>
265
    <index search="true" scan="true" sort="false">
153
    <index search="true" scan="true" sort="false">
266
      <title lang="en">Alvis NLP Entity Symptom</title>
267
      <map><name set="alvis">entity-symptom</name></map>
268
      <map>
154
      <map>
269
        <attr type="1" set="bib1">la:entity-symptom</attr>
155
        <name set="dc">note</name>
270
        <attr type="4" set="bib1">3</attr>
156
      </map>
157
      <map primary="true">
158
        <attr type="1">63</attr>
271
      </map>
159
      </map>
272
    </index>
160
    </index>
273
    <index search="true" scan="true" sort="false">
161
    <index search="true" scan="true" sort="false">
274
      <title lang="en">Alvis NLP Entity Chemical</title>
275
      <map><name set="alvis">entity-chemical</name></map>
276
      <map>
162
      <map>
277
        <attr type="1" set="bib1">la:entity-chemical</attr>
163
        <name set="dc">pname</name>
278
        <attr type="4" set="bib1">3</attr>
164
      </map>
165
      <map primary="true">
166
        <attr type="1">1</attr>
279
      </map>
167
      </map>
280
    </index>
168
    </index>
281
    <index search="true" scan="true" sort="false">
169
    <index search="true" scan="true" sort="false">
282
      <title lang="en">Alvis NLP Entity Drug</title>
283
      <map><name set="alvis">entity-drug</name></map>
284
      <map>
170
      <map>
285
        <attr type="1" set="bib1">la:entity-drug</attr>
171
        <name set="dc">editor</name>
286
        <attr type="4" set="bib1">3</attr>
172
      </map>
173
      <map primary="true">
174
        <attr type="1">1020</attr>
287
      </map>
175
      </map>
288
    </index>
176
    </index>
289
    <index search="true" scan="true" sort="false">
177
    <index search="true" scan="true" sort="false">
290
      <title lang="en">Alvis NLP Lemma Canonical </title>
291
      <map><name set="alvis">lemma-canonical</name></map>
292
      <map>
178
      <map>
293
        <attr type="1" set="bib1">la:lemma-canonical</attr>
179
        <name set="dc">publisher</name>
294
        <attr type="4" set="bib1">3</attr>
180
      </map>
181
      <map primary="true">
182
        <attr type="1">1018</attr>
295
      </map>
183
      </map>
296
    </index>
184
    </index>
297
    <index search="true" scan="true" sort="false">
185
    <index search="true" scan="true" sort="false">
298
      <title lang="en">Alvis NLP Syntactic Noun</title>
299
      <map><name set="alvis">syntactic-noun</name></map>
300
      <map>
186
      <map>
301
        <attr type="1" set="bib1">la:syntactic-noun</attr>
187
        <name set="dc">description</name>
302
        <attr type="4" set="bib1">3</attr>
188
      </map>
189
      <map primary="true">
190
        <attr type="1">62</attr>
303
      </map>
191
      </map>
304
    </index>
192
    </index>
305
    <index search="true" scan="true" sort="false">
193
    <index search="true" scan="true" sort="false">
306
      <title lang="en">Alvis NLP Syntactic Verb</title>
307
      <map><name set="alvis">syntactic-verb</name></map>
308
      <map>
194
      <map>
309
        <attr type="1" set="bib1">la:syntactic-verb</attr>
195
        <name set="dc">date</name>
310
        <attr type="4" set="bib1">3</attr>
196
      </map>
197
      <map primary="true">
198
        <attr type="1">30</attr>
311
      </map>
199
      </map>
312
    </index>
200
    </index>
313
    <index search="true" scan="true" sort="false">
201
    <index search="true" scan="true" sort="false">
314
      <title lang="en">Alvis NLP Syntactic Adjective</title>
315
      <map><name set="alvis">syntactic-adjective</name></map>
316
      <map>
202
      <map>
317
        <attr type="1" set="bib1">la:syntactic-adjective</attr>
203
        <name set="dc">resourceType</name>
318
        <attr type="4" set="bib1">3</attr>
204
      </map>
205
      <map primary="true">
206
        <attr type="1">1031</attr>
319
      </map>
207
      </map>
320
    </index>
208
    </index>
321
    <index search="true" scan="true" sort="false">
209
    <index search="true" scan="true" sort="false">
322
      <title lang="en">Alvis NLP Word Form</title>
323
      <map><name set="alvis">word-form</name></map>
324
      <map>
210
      <map>
325
        <attr type="1" set="bib1">la:word-form</attr>
211
        <name set="dc">format</name>
326
        <attr type="4" set="bib1">3</attr>
212
      </map>
213
      <map primary="true">
214
        <attr type="1">1034</attr>
327
      </map>
215
      </map>
328
    </index>
216
    </index>
329
    <!-- <index search="true" scan="true" sort="false">
217
    <index search="true" scan="true" sort="false">
330
      <title lang="en">Alvis NLP Term Form</title>
331
      <map><name set="alvis">term-form</name></map>
332
      <map>
218
      <map>
333
        <attr type="1" set="bib1">la:term-form</attr>
219
        <name set="dc">resourceIdentifier</name>
334
        <attr type="4" set="bib1">3</attr>
335
      </map>
220
      </map>
336
    </index> -->
221
      <map primary="true">
337
    <!-- <index search="true" scan="true" sort="false">
222
        <attr type="1">12</attr>
338
      <title lang="en">Alvis Wpcats</title>
339
      <map><name set="alvis">wpcats</name></map>
340
      <map>
341
        <attr type="1" set="bib1">wpcats</attr>
342
      </map>
223
      </map>
343
    </index> -->
224
    </index>
344
345
    <!-- Dublin Core Indexes -->
346
    <index search="true" scan="true" sort="false">
225
    <index search="true" scan="true" sort="false">
347
      <title lang="en">DC Title</title>
348
      <map><name set="dc">title</name></map>
349
      <map>
226
      <map>
350
        <attr type="1" set="bib1">dc:title</attr>
227
        <name set="dc">language</name>
228
      </map>
229
      <map primary="true">
230
        <attr type="1">54</attr>
351
      </map>
231
      </map>
352
    </index>
232
    </index>
353
    <index search="true" scan="true" sort="false">
233
    <index search="true" scan="true" sort="false">
354
      <title lang="en">DC Creator</title>
355
      <map><name set="dc">creator</name></map>
356
      <map>
234
      <map>
357
        <attr type="1" set="bib1">dc:creator</attr>
235
        <name set="dc">Place-publication</name>
236
      </map>
237
      <map primary="true">
238
        <attr type="1">59</attr>
358
      </map>
239
      </map>
359
    </index>
240
    </index>
360
    <index search="true" scan="true" sort="false">
241
    <index search="true" scan="true" sort="false">
361
      <title lang="en">DC Subject</title>
362
      <map><name set="dc">subject</name></map>
363
      <map>
242
      <map>
364
        <attr type="1" set="bib1">dc:subject</attr>
243
        <name set="bath">keyTitle</name>
244
      </map>
245
      <map primary="true">
246
        <attr type="1">33</attr>
365
      </map>
247
      </map>
366
    </index>
248
    </index>
367
    <index search="true" scan="true" sort="false">
249
    <index search="true" scan="true" sort="false">
368
      <title lang="en">DC Description</title>
369
      <map><name set="dc">description</name></map>
370
      <map>
250
      <map>
371
        <attr type="1" set="bib1">dc:description</attr>
251
        <name set="bath">possessingInstitution</name>
252
      </map>
253
      <map primary="true">
254
        <attr type="1">1044</attr>
372
      </map>
255
      </map>
373
    </index>
256
    </index>
374
    <index search="true" scan="true" sort="false">
257
    <index search="true" scan="true" sort="false">
375
      <title lang="en">DC Publisher</title>
376
      <map><name set="dc">publisher</name></map>
377
      <map>
258
      <map>
378
        <attr type="1" set="bib1">dc:publisher</attr>
259
        <name set="bath">name</name>
260
      </map>
261
      <map primary="true">
262
        <attr type="1">1002</attr>
379
      </map>
263
      </map>
380
    </index>
264
    </index>
381
    <index search="true" scan="true" sort="false">
265
    <index search="true" scan="true" sort="false">
382
      <title lang="en">DC Contributor</title>
383
      <map><name set="dc">contributor</name></map>
384
      <map>
266
      <map>
385
        <attr type="1" set="bib1">dc:contributor</attr>
267
        <name set="bath">personalName</name>
268
      </map>
269
      <map primary="true">
270
        <attr type="1">1</attr>
386
      </map>
271
      </map>
387
    </index>
272
    </index>
388
    <index search="true" scan="true" sort="false">
273
    <index search="true" scan="true" sort="false">
389
      <title lang="en">DC Date</title>
390
      <map><name set="dc">date</name></map>
391
      <map>
274
      <map>
392
        <attr type="1" set="bib1">dc:date</attr>
275
        <name set="bath">corporateName</name>
276
      </map>
277
      <map primary="true">
278
        <attr type="1">2</attr>
393
      </map>
279
      </map>
394
    </index>
280
    </index>
395
    <index search="true" scan="true" sort="false">
281
    <index search="true" scan="true" sort="false">
396
      <title lang="en">DC Type</title>
397
      <map><name set="dc">type</name></map>
398
      <map>
282
      <map>
399
        <attr type="1" set="bib1">dc:type</attr>
283
        <name set="bath">conferenceName</name>
284
      </map>
285
      <map primary="true">
286
        <attr type="1">3</attr>
400
      </map>
287
      </map>
401
    </index>
288
    </index>
402
    <index search="true" scan="true" sort="false">
289
    <index search="true" scan="true" sort="false">
403
      <title lang="en">DC Format</title>
404
      <map><name set="dc">format</name></map>
405
      <map>
290
      <map>
406
        <attr type="1" set="bib1"></attr>
291
        <name set="bath">uniformTitle</name>
292
      </map>
293
      <map primary="true">
294
        <attr type="1">6</attr>
407
      </map>
295
      </map>
408
    </index>
296
    </index>
409
    <index search="true" scan="true" sort="false">
297
    <index search="true" scan="true" sort="false">
410
      <title lang="en">DC Identifier</title>
411
      <map><name set="dc">identifier</name></map>
412
      <map>
298
      <map>
413
        <attr type="1" set="bib1">dc:identifier</attr>
299
        <name set="bath">isbn</name>
300
      </map>
301
      <map primary="true">
302
        <attr type="1">7</attr>
414
      </map>
303
      </map>
415
    </index>
304
    </index>
416
    <index search="true" scan="true" sort="false">
305
    <index search="true" scan="true" sort="false">
417
      <title lang="en">DC Source</title>
418
      <map><name set="dc">source</name></map>
419
      <map>
306
      <map>
420
        <attr type="1" set="bib1">dc:source</attr>
307
        <name set="bath">issn</name>
308
      </map>
309
      <map primary="true">
310
        <attr type="1">8</attr>
421
      </map>
311
      </map>
422
    </index>
312
    </index>
423
    <index search="true" scan="true" sort="false">
313
    <index search="true" scan="true" sort="false">
424
      <title lang="en">DC Language</title>
425
      <map><name set="dc">language</name></map>
426
      <map>
314
      <map>
427
        <attr type="1" set="bib1">dc:language</attr>
315
        <name set="bath">geographicName</name>
316
      </map>
317
      <map primary="true">
318
        <attr type="1">58</attr>
428
      </map>
319
      </map>
429
    </index>
320
    </index>
430
    <index search="true" scan="true" sort="false">
321
    <index search="true" scan="true" sort="false">
431
      <title lang="en">DC Relation</title>
432
      <map><name set="dc">relation</name></map>
433
      <map>
322
      <map>
434
        <attr type="1" set="bib1">dc:relation</attr>
323
        <name set="bath">notes</name>
324
      </map>
325
      <map primary="true">
326
        <attr type="1">63</attr>
435
      </map>
327
      </map>
436
    </index>
328
    </index>
437
    <index search="true" scan="true" sort="false">
329
    <index search="true" scan="true" sort="false">
438
      <title lang="en">DC Coverage</title>
439
      <map><name set="dc">coverage</name></map>
440
      <map>
330
      <map>
441
        <attr type="1" set="bib1">dc:coverage</attr>
331
        <name set="bath">topicalSubject</name>
332
      </map>
333
      <map primary="true">
334
        <attr type="1">1079</attr>
442
      </map>
335
      </map>
443
    </index>
336
    </index>
444
    <index search="true" scan="true" sort="false">
337
    <index search="true" scan="true" sort="false">
445
      <title lang="en">DC Rights</title>
446
      <map><name set="dc">rights</name></map>
447
      <map>
338
      <map>
448
        <attr type="1" set="bib1">dc:rights</attr>
339
        <name set="bath">genreForm</name>
340
      </map>
341
      <map primary="true">
342
        <attr type="1">1075</attr>
449
      </map>
343
      </map>
450
    </index>
344
    </index>
451
452
  </indexInfo>
345
  </indexInfo>
453
454
  <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
455
       <schemaInfo>, sic ..
456
  <recordInfo>
457
    <recordSyntax identifier="1.2.840.10003.5.109.10">
458
      <elementSet name="F">
459
        <title lang="en" primary="true">Full XML Record</title>
460
      </elementSet>
461
    </recordSyntax>
462
  </recordInfo>
463
  -->
464
465
  <schemaInfo>
466
467
    <schema identifier="http://www.loc.gov/zing/srw/dcschema/v1.0/"
468
            location="http://www.loc.gov/zing/srw/dc.xsd" 
469
            name="dc"
470
            retrieve="true">
471
      <title lang="en">Dublin Core</title>
472
    </schema>
473
474
    <schema identifier="http://indexdata.dk/dc-short"
475
            location="" 
476
            name="dc-short"
477
            retrieve="true">
478
      <title lang="en">Dublin Core Short Form</title>
479
    </schema>
480
481
    <!--<schema identifier="http://indexdata.dk/snippet"
482
            location="" 
483
            name="snippet"
484
            retrieve="true">
485
      <title lang="en">Snippet - Not Implemented</title>
486
    </schema> -->
487
488
    <!--<schema identifier="http://indexdata.dk/help"
489
            location="" 
490
            name="help"
491
            retrieve="true">
492
      <title lang="en">Help - Not Implemented</title>
493
    </schema> -->
494
495
    <schema identifier="http://indexdata.dk/pretty"
496
            location="" 
497
            name="pretty"
498
            retrieve="true">
499
      <title lang="en">Pretty</title>
500
    </schema>
501
502
    <schema identifier="http://indexdata.dk/D9.1"
503
            location="" 
504
            name="D9.1"
505
            retrieve="true">
506
      <title lang="en">Alvis D9.1 Schema</title>
507
    </schema>
508
509
    <schema identifier="http://alvis.info/enriched/"
510
            location="http://project.alvis.info/alvis_docs/alvis-document.xsd" 
511
            name="alvis"
512
            retrieve="true">
513
      <title lang="en">Alvis Enriched</title>
514
    </schema>
515
516
    <schema identifier="http://indexdata.dk/zebra/xslt/1"
517
            location="" 
518
            name="index"
519
            retrieve="true">
520
      <title lang="en">Zebra Indexing</title>
521
    </schema>
522
523
  </schemaInfo>
524
 
525
  <configInfo>
346
  <configInfo>
526
527
    <!-- searchRetrieve settings -->
347
    <!-- searchRetrieve settings -->
528
529
    <!-- default context set -->
348
    <!-- default context set -->
530
    <default type="contextSet">cql</default>
349
    <default type="contextSet">cql</default>
531
532
    <default type="index">all</default>
350
    <default type="index">all</default>
533
534
    <!-- default relation -->
351
    <!-- default relation -->
535
    <default type="relation">=</default>
352
    <default type="relation">=</default>
536
537
    <!-- relation supported by the server or index -->
353
    <!-- relation supported by the server or index -->
538
    <supports type="relation">&lt;</supports> <!-- 2=1 OK -->
354
    <supports type="relation">&lt;</supports>
539
    <supports type="relation">&lt;=</supports> <!-- 2=2 OK -->
355
    <supports type="relation">le</supports>
540
    <supports type="relation">=</supports> <!-- 2=3 OK -->
356
    <supports type="relation">eq</supports>
541
    <supports type="relation">&gt;=</supports> <!-- 2=4 OK -->
357
    <supports type="relation">exact</supports>
542
    <supports type="relation">&gt;</supports> <!-- 2=5 OK -->
358
    <supports type="relation">ge</supports>
543
    <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
359
    <supports type="relation">&gt;</supports>
544
    <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
360
    <supports type="relation">&lt;&gt;</supports>
545
    <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
361
    <supports type="relation">all</supports>
546
362
    <supports type="relation">any</supports>
363
    <supports type="relation">scr</supports>
547
    <!-- relation modifier supported by the server or index -->
364
    <!-- relation modifier supported by the server or index -->
548
    <!-- <supports type="relationModifier">relevant</supports> --><!-- 2=102 OK, makes no difference .. sic -->
365
    <supports type="relationModifier">relevant</supports>
549
    <!-- <supports type="relationModifier">phonetic</supports> --> <!-- 2=100 DEAD -->
366
    <supports type="relationModifier">fuzzy</supports>
550
    <!-- <supports type="relationModifier">stem</supports> --> <!-- 2=101 DEAD !! -->
367
    <supports type="relationModifier">stem</supports>
551
368
    <supports type="relationModifier">phonetic</supports>
552
    <!-- support proximity (Empty) -->
369
    <!-- support proximity (Empty) -->
553
    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
370
    <!-- <supports type="proximity"></supports> -->
554
371
    <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
555
    <!-- proximity modifier supported by the server or index 
372
    <!-- proximity modifier supported by the server or index
556
         (relation, distance, unit, ordering) -->
373
         (relation, distance, unit, ordering) -->
557
    <!-- <supports type="proximityModifier"></supports> -->
374
    <!-- <supports type="proximityModifier"></supports> -->
558
559
    <!-- boolean modifier supported by the server or index -->
375
    <!-- boolean modifier supported by the server or index -->
560
    <!-- <supports type="booleanModifier"></supports> -->
376
    <!-- <supports type="booleanModifier"></supports> -->
561
562
    <!-- masking character supported (* or ?) -->
377
    <!-- masking character supported (* or ?) -->
563
    <supports type="maskingCharacter">*</supports>
378
    <supports type="maskingCharacter">*</supports>
564
    <supports type="maskingCharacter">?</supports>
379
    <supports type="maskingCharacter">?</supports>
565
566
    <!-- anchoring supported? (^ character) -->
380
    <!-- anchoring supported? (^ character) -->
567
    <!-- empty terms supported (Empty) -->
381
    <!-- empty terms supported (Empty) -->
568
    <supports type="emptyTerm"></supports>
382
    <supports type="emptyTerm"/>
569
570
    <!-- sorting settings -->
383
    <!-- sorting settings -->
571
572
    <!-- default schema used in sorting, in short name form -->
384
    <!-- default schema used in sorting, in short name form -->
573
    <!-- <default type="sortSchema"></default> -->
385
    <!-- <default type="sortSchema"></default> -->
574
    <!-- MIKE: deprecated -->
386
    <!-- MIKE: deprecated -->
575
576
    <!-- server support sort -->
387
    <!-- server support sort -->
577
578
    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
388
    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
579
    <!-- <supports type="sortModifier"></supports> -->
389
    <!-- <supports type="sortModifier"></supports> -->
580
390
    <!-- presentation settings -->
581
    <!-- presentation settings --> 
582
583
    <!-- default number of records that a server will return at once  -->
391
    <!-- default number of records that a server will return at once  -->
584
    <default type="numberOfRecords">0</default>
392
    <default type="numberOfRecords">0</default>
585
586
    <!-- default schema used for retrieved records -->
393
    <!-- default schema used for retrieved records -->
587
    <default type="retrieveSchema">index</default>
394
    <default type="retrieveSchema">index</default>
588
    <!-- default stylesheet URL, or if stylesheets are supported -->
395
    <!-- default stylesheet URL, or if stylesheets are supported -->
589
    <setting type="stylesheet">docpath/sru.xsl</setting>
396
    <setting type="stylesheet">docpath/sru.xsl</setting>
590
591
    <!-- default record packing returned (string or xml) -->
397
    <!-- default record packing returned (string or xml) -->
592
    <default type="recordPacking">xml</default>
398
    <default type="recordPacking">xml</default>
593
594
    <!-- maximum number of records that a server will return at once -->
399
    <!-- maximum number of records that a server will return at once -->
595
    <!-- <setting type="maximumRecords">1000</setting> -->
400
    <!-- <setting type="maximumRecords">1000</setting> -->
596
597
    <!-- support result sets (Empty) -->
401
    <!-- support result sets (Empty) -->
598
    <!-- <supports type="resultSets"></supports>  --> 
402
    <!-- <supports type="resultSets"></supports>  -->
599
600
    <!-- XPath retrieval supported -->
403
    <!-- XPath retrieval supported -->
601
    <!-- <supports type="recordXPath"></supports> -->
404
    <!-- <supports type="recordXPath"></supports> -->
602
603
    <!-- scan settings -->
405
    <!-- scan settings -->
604
605
    <!-- scan operation supported -->
406
    <!-- scan operation supported -->
606
    <supports type="scan"></supports>
407
    <supports type="scan"/>
607
608
    <!-- default number of terms to be returned in scan -->
408
    <!-- default number of terms to be returned in scan -->
609
    <default type="numberOfTerms">20</default>
409
    <default type="numberOfTerms">20</default>
610
611
    <!-- other server settings -->
410
    <!-- other server settings -->
612
613
    <!-- older version of the protocol supported  -->
411
    <!-- older version of the protocol supported  -->
614
    <!-- <supports type="version">1.1</supports> -->
412
    <!-- <supports type="version">1.1</supports> -->
615
616
    <!-- number of seconds that a result set will be maintained for -->
413
    <!-- number of seconds that a result set will be maintained for -->
617
    <setting type="resultSetTTL">0</setting>
414
    <setting type="resultSetTTL">0</setting>
618
619
    <!-- A type of extraRequestData available in the
415
    <!-- A type of extraRequestData available in the
620
         searchRetrieveRequest. The extra*Data fields are represented as two
416
         searchRetrieveRequest. The extra*Data fields are represented as two
621
         space separated words, the first the identifier for the extension and
417
         space separated words, the first the identifier for the extension and
Lines 623-636 Link Here
623
         only one word, then it is the extension id and all elements from
419
         only one word, then it is the extension id and all elements from
624
         within are supported. -->
420
         within are supported. -->
625
    <!-- <supports type="extraSearchData"></supports> -->
421
    <!-- <supports type="extraSearchData"></supports> -->
626
627
    <!-- A type of extraRequestData available in the explainRequest -->
422
    <!-- A type of extraRequestData available in the explainRequest -->
628
    <!-- <supports type="extraExplainData"></supports> -->
423
    <!-- <supports type="extraExplainData"></supports> -->
629
630
    <!-- A type of extraRequestData available in the scanRequest -->
424
    <!-- A type of extraRequestData available in the scanRequest -->
631
    <!-- <supports type="extraScanData"></supports> -->
425
    <!-- <supports type="extraScanData"></supports> -->
632
    <!-- The URI identifier of a supported profile -->
426
    <!-- The URI identifier of a supported profile -->
633
    <!-- <supports type="profile"></supports> -->
427
    <!-- <supports type="profile"></supports> -->
634
  </configInfo>
428
  </configInfo>
635
   
636
</explain>
429
</explain>
(-)a/etc/zebradb/explain-biblios.xml (-403 / +188 lines)
Lines 1-621 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!-- $Id: explain.xml,v 1.14 2006/09/27 13:35:09 marc Exp $ -->
4
5
<!-- this file configures the SRU/SRW explain response -->
2
<!-- this file configures the SRU/SRW explain response -->
6
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
3
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
7
<!-- validate this using zeerex-2.0.xsd -->
4
<!-- validate this using zeerex-2.0.xsd -->
8
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
5
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
9
6
<!-- Generated by misc/maintenance/generate_explain.pl on 2017-03-02 07:06:17 -->
10
<explain xmlns="http://explain.z3950.org/dtd/2.0/">
7
<explain xmlns="http://explain.z3950.org/dtd/2.0/">
11
8
  <serverInfo protocol="SRW/SRU/Z39.50" version="2.0" transport="http">
12
  <!-- try stylesheet url: http://./?stylesheet=docpath/sru2.xsl -->
9
    <!-- If host is set to @ you need to hand edit it, or you can edit the
13
  <serverInfo protocol="SRW/SRU/Z39.50">
10
         <listen> element for "publicserver" in koha-conf.xml:
14
11
         <listen id="publicserver" >tcp:<host>:<port></listen>
15
    <host>__ZEBRA_SRU_HOST__</host>
12
         and then regenerate the Explain doc. -->
16
13
    <host>library.example.org</host>
17
    <port>9999</port>
14
    <port>9999</port>
18
    <!-- <database numRecs="1314" lastUpdate="2006-03-15 09-05-33">
19
         Default</database> -->
20
    <database>biblios</database>
15
    <database>biblios</database>
21
        <!--<authentication>
22
      <user>kohauser</user>
23
      <group>kohagroup</group>
24
      <password>zebrastripes</password>
25
    </authentication>-->
26
  </serverInfo>
16
  </serverInfo>
27
28
  <databaseInfo>
17
  <databaseInfo>
29
18
    <title lang="en" primary="true">Koha Bibliographic SRU/SRW/Z39.50 server</title>
30
    <title lang="en" primary="true">Koha 3 Bibliographic SRU/SRW/Z39.50 server</title>
19
    <description lang="en" primary="true">Koha Bibliographic Server</description>
31
20
    <author>My library</author>
32
    <description lang="en" primary="true">
21
    <contact>library@example.org</contact>
33
      Koha 3 Bibliographic Server
22
    <implementation identifier="zebra" version="2.0">
34
    </description>
35
36
    <author>Joshua Ferraro, LibLime, http://liblime.com,
37
            Marc Cromme, Mike Taylor, Index Data Aps, 
38
            http://www.indexdata.dk</author>
39
40
    <contact>Joshua Ferraro, jmf(at)liblime(dot)com</contact>
41
42
    <!--<langUsage codes="en fr">
43
        The records are in English and French.
44
        </langUsage>  -->
45
    <!-- <extend>Partially crawled web data</extend> -->
46
   
47
    <history>
48
      Created for Koha 3
49
      http://koha-community.org
50
    </history>
51
52
    <implementation  identifier="zebra" version="1.4">
53
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
23
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
54
    </implementation>
24
    </implementation>
55
    
25
    <links>
56
    <links> 
26
      <link type="www">http://library.example.org/</link>
57
      <!--<link type="www">http://foo.indexdata.dk:80</link>-->
27
      <link type="z39.50">http://library.example.org:9999</link>
58
      <link type="z39.50">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_BIBLIOS_PORT__</link>
28
      <link type="srw">http://library.example.org:9999</link>
59
      <link type="srw">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_BIBLIOS_PORT__</link>
29
      <link type="sru">http://library.example.org:9999</link>
60
      <link type="sru">http://__ZEBRA_SRU_HOST__:__ZEBRA_SRU_BIBLIOS_PORT__</link>
30
      <link type="oai">http://library.example.org/cgi-bin/koha/oai.pl</link>
61
      <!--<link type="oai"></link>
62
      <link type="rss"></link>
63
      <link type="icon"></link> -->
64
    </links>
31
    </links>
65
    
66
  </databaseInfo>
32
  </databaseInfo>
67
68
  <!--
69
  <metaInfo>
33
  <metaInfo>
70
    <dateModified>2002-03-29 19:00:00</dateModified>
34
    <dateModified>2017-03-02 07:06:17</dateModified>
71
    <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
72
                   id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
73
    <dateAggregated>2002-03-30 06:30:00</dateAggregated>
74
  </metaInfo>
35
  </metaInfo>
75
  -->
76
77
78
  <indexInfo>
36
  <indexInfo>
79
    <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
37
    <set identifier="info:srw/cql-context-set/1/cql-v1.1" name="cql"/>
80
      <title>CQL Standard Set</title>
38
    <set identifier="info:srw/cql-context-set/2/rec-1.0" name="rec"/>
81
    </set>
39
    <set identifier="info:srw/cql-context-set/1/dc-v1.1" name="dc"/>
82
    <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
40
    <set identifier="http://zing.z3950.org/cql/bath/2.0/" name="bath"/>
83
      <title>Record Standard Set</title>
84
    </set>
85
    <set name="alvis" identifier="http://indexdata.dk/zebra/xslt/1">
86
      <title>Alvis Set</title>
87
    </set>
88
    <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
89
      <title>Dublin Core Set</title>
90
    </set>
91
    <set name="bib1" identifier="1.2.840.10003.3.1">
92
      <title>BIB-1 Z39.50 Standard Set</title>
93
    </set>
94
95
96
    <!-- CQL standard index -->
97
    <index search="true" scan="true" sort="false">
41
    <index search="true" scan="true" sort="false">
98
      <title lang="en">CQL Server Choice</title>
99
      <map><name set="cql">serverChoice</name></map>
100
      <map>
42
      <map>
101
        <attr type="1" set="bib1">text</attr>
43
        <name set="cql">serverChoice</name>
102
      </map>
44
      </map>
103
    </index>
45
      <map primary="true">
104
    <index search="true" scan="true" sort="false">
46
        <attr type="1">1016</attr>
105
      <title lang="en">CQL All</title>
106
      <map><name set="cql">all</name></map>
107
      <map>
108
        <attr type="1" set="bib1">text</attr>
109
      </map>
47
      </map>
110
    </index>
48
    </index>
111
112
    <!-- Record ID index -->
113
    <index search="true" scan="true" sort="false">
49
    <index search="true" scan="true" sort="false">
114
      <title lang="en">Record ID</title>
115
      <map><name set="rec">id</name></map>
116
      <map>
50
      <map>
117
        <attr type="1" set="bib1">rec:id</attr>
51
        <name set="rec">id</name>
118
        <attr type="4" set="bib1">3</attr>
119
      </map>
52
      </map>
120
    </index>
53
      <map primary="true">
121
54
        <attr type="1">12</attr>
122
    <!-- Alvis indexes -->
123
    <index search="true" scan="true" sort="false">
124
      <title lang="en">Alvis Text Relevance Ranked</title>
125
      <map><name set="alvis">text</name></map>
126
      <map>
127
        <attr type="1" set="bib1">text</attr>
128
        <attr type="2" set="bib1">102</attr>
129
      </map>
55
      </map>
130
    </index>
56
    </index>
131
    <index search="true" scan="true" sort="false">
57
    <index search="true" scan="true" sort="false">
132
      <title lang="en">Alvis Anchor Text</title>
133
      <map><name set="alvis">anchortext</name></map>
134
      <map>
58
      <map>
135
        <attr type="1" set="bib1">anchortext</attr>
59
        <name set="dc">identifier</name>
136
        <attr type="2" set="bib1">102</attr>
137
      </map>
60
      </map>
138
    </index>
61
      <map primary="true">
139
    <index search="true" scan="true" sort="false">
62
        <attr type="1">1007</attr>
140
      <title lang="en">Alvis Date Modified</title>
141
      <map><name set="alvis">date-modified</name></map>
142
      <map>
143
        <attr type="1" set="bib1">ac:date-modified</attr>
144
        <attr type="4" set="bib1">5</attr>
145
      </map>
63
      </map>
146
    </index>
64
    </index>
147
    <index search="true" scan="true" sort="false">
65
    <index search="true" scan="true" sort="false">
148
      <title lang="en">Alvis Date Checked</title>
149
      <map><name set="alvis">date-checked</name></map>
150
      <map>
66
      <map>
151
        <attr type="1" set="bib1">ac:date-checked</attr>
67
        <name set="dc">title</name>
152
        <attr type="4" set="bib1">5</attr>
153
      </map>
68
      </map>
154
    </index>
69
      <map primary="true">
155
    <index search="true" scan="true" sort="false">
70
        <attr type="1">4</attr>
156
      <title lang="en">Alvis Identifier Url</title>
157
      <map><name set="alvis">identifier-url</name></map>
158
      <map>
159
        <attr type="1" set="bib1">ac:identifier-url</attr>
160
        <attr type="4" set="bib1">3</attr>
161
      </map>
71
      </map>
162
    </index>
72
    </index>
163
    <!--<index search="true" scan="true" sort="false">
164
      <title lang="en">Alvis Identifier Server</title>
165
      <map><name set="alvis">identifier-server</name></map>
166
      <map>
167
        <attr type="1" set="bib1">ac:identifier-server</attr>
168
        <attr type="4" set="bib1">3</attr>
169
      </map>
170
    </index> -->
171
    <index search="true" scan="true" sort="false">
73
    <index search="true" scan="true" sort="false">
172
      <title lang="en">Alvis Topic Class</title>
173
      <map><name set="alvis">topic-class</name></map>
174
      <map>
74
      <map>
175
        <attr type="1" set="bib1">an:topic-class</attr>
75
        <name set="dc">subject</name>
176
      </map>
76
      </map>
177
    </index>
77
      <map primary="true">
178
    <index search="true" scan="true" sort="false">
78
        <attr type="1">21</attr>
179
      <title lang="en">Alvis Language</title>
180
      <map><name set="alvis">language</name></map>
181
      <map>
182
        <attr type="1" set="bib1">an:language</attr>
183
      </map>
79
      </map>
184
    </index>
80
    </index>
185
    <index search="true" scan="true" sort="false">
81
    <index search="true" scan="true" sort="false">
186
      <title lang="en">Alvis NLP Entity Date</title>
187
      <map><name set="alvis">entity-date</name></map>
188
      <map>
82
      <map>
189
        <attr type="1" set="bib1">la:entity-date</attr>
83
        <name set="dc">creator</name>
190
        <attr type="4" set="bib1">3</attr>
84
      </map>
85
      <map primary="true">
86
        <attr type="1">1003</attr>
191
      </map>
87
      </map>
192
    </index>
88
    </index>
193
    <index search="true" scan="true" sort="false">
89
    <index search="true" scan="true" sort="false">
194
      <title lang="en">Alvis NLP Entity Disease</title>
195
      <map><name set="alvis">entity-disease</name></map>
196
      <map>
90
      <map>
197
        <attr type="1" set="bib1">la:entity-disease</attr>
91
        <name set="dc">author</name>
198
        <attr type="4" set="bib1">3</attr>
92
      </map>
93
      <map primary="true">
94
        <attr type="1">1003</attr>
199
      </map>
95
      </map>
200
    </index>
96
    </index>
201
    <index search="true" scan="true" sort="false">
97
    <index search="true" scan="true" sort="false">
202
      <title lang="en">Alvis NLP Entity Gene</title>
203
      <map><name set="alvis">entity-gene</name></map>
204
      <map>
98
      <map>
205
        <attr type="1" set="bib1">la:entity-gene</attr>
99
        <name set="dc">itemtype</name>
206
        <attr type="4" set="bib1">3</attr>
100
      </map>
101
      <map primary="true">
102
        <attr type="1">1031</attr>
207
      </map>
103
      </map>
208
    </index>
104
    </index>
209
    <index search="true" scan="true" sort="false">
105
    <index search="true" scan="true" sort="false">
210
      <title lang="en">Alvis NLP Entity Location</title>
211
      <map><name set="alvis">entity-location</name></map>
212
      <map>
106
      <map>
213
        <attr type="1" set="bib1">la:entity-location</attr>
107
        <name set="dc">barcode</name>
214
        <attr type="4" set="bib1">3</attr>
215
      </map>
108
      </map>
216
    </index>
109
      <map primary="true">
217
    <!--<index search="true" scan="true" sort="false">
110
        <attr type="1">1028</attr>
218
      <title lang="en">Alvis NLP Entity Mail</title>
219
      <map><name set="alvis">entity-mail</name></map>
220
      <map>
221
        <attr type="1" set="bib1">la:entity-mail</attr>
222
        <attr type="4" set="bib1">3</attr>
223
      </map>
111
      </map>
224
    </index>-->
112
    </index>
225
    <index search="true" scan="true" sort="false">
113
    <index search="true" scan="true" sort="false">
226
      <title lang="en">Alvis NLP Entity Person</title>
227
      <map><name set="alvis">entity-person</name></map>
228
      <map>
114
      <map>
229
        <attr type="1" set="bib1">la:entity-person</attr>
115
        <name set="dc">branch</name>
230
        <attr type="4" set="bib1">3</attr>
231
      </map>
116
      </map>
232
    </index>
117
      <map primary="true">
233
    <!-- <index search="true" scan="true" sort="false">
118
        <attr type="1">1033</attr>
234
      <title lang="en">Alvis NLP Entity Protein</title>
235
      <map><name set="alvis">entity-protein</name></map>
236
      <map>
237
        <attr type="1" set="bib1">la:entity-protein</attr>
238
        <attr type="4" set="bib1">3</attr>
239
      </map>
119
      </map>
240
    </index> -->
120
    </index>
241
    <index search="true" scan="true" sort="false">
121
    <index search="true" scan="true" sort="false">
242
      <title lang="en">Alvis NLP Entity Species</title>
243
      <map><name set="alvis">entity-species</name></map>
244
      <map>
122
      <map>
245
        <attr type="1" set="bib1">la:entity-species</attr>
123
        <name set="dc">isbn</name>
246
        <attr type="4" set="bib1">3</attr>
124
      </map>
125
      <map primary="true">
126
        <attr type="1">7</attr>
247
      </map>
127
      </map>
248
    </index>
128
    </index>
249
    <index search="true" scan="true" sort="false">
129
    <index search="true" scan="true" sort="false">
250
      <title lang="en">Alvis NLP Entity URL</title>
251
      <map><name set="alvis">entity-url</name></map>
252
      <map>
130
      <map>
253
        <attr type="1" set="bib1">la:entity-url</attr>
131
        <name set="dc">issn</name>
254
        <attr type="4" set="bib1">3</attr>
132
      </map>
133
      <map primary="true">
134
        <attr type="1">8</attr>
255
      </map>
135
      </map>
256
    </index>
136
    </index>
257
    <index search="true" scan="true" sort="false">
137
    <index search="true" scan="true" sort="false">
258
      <title lang="en">Alvis NLP Entity Organism</title>
259
      <map><name set="alvis">entity-organism</name></map>
260
      <map>
138
      <map>
261
        <attr type="1" set="bib1">la:entity-organism</attr>
139
        <name set="dc">any</name>
262
        <attr type="4" set="bib1">3</attr>
140
      </map>
141
      <map primary="true">
142
        <attr type="1">1016</attr>
263
      </map>
143
      </map>
264
    </index>
144
    </index>
265
    <index search="true" scan="true" sort="false">
145
    <index search="true" scan="true" sort="false">
266
      <title lang="en">Alvis NLP Entity Symptom</title>
267
      <map><name set="alvis">entity-symptom</name></map>
268
      <map>
146
      <map>
269
        <attr type="1" set="bib1">la:entity-symptom</attr>
147
        <name set="dc">note</name>
270
        <attr type="4" set="bib1">3</attr>
148
      </map>
149
      <map primary="true">
150
        <attr type="1">63</attr>
271
      </map>
151
      </map>
272
    </index>
152
    </index>
273
    <index search="true" scan="true" sort="false">
153
    <index search="true" scan="true" sort="false">
274
      <title lang="en">Alvis NLP Entity Chemical</title>
275
      <map><name set="alvis">entity-chemical</name></map>
276
      <map>
154
      <map>
277
        <attr type="1" set="bib1">la:entity-chemical</attr>
155
        <name set="dc">pname</name>
278
        <attr type="4" set="bib1">3</attr>
156
      </map>
157
      <map primary="true">
158
        <attr type="1">1</attr>
279
      </map>
159
      </map>
280
    </index>
160
    </index>
281
    <index search="true" scan="true" sort="false">
161
    <index search="true" scan="true" sort="false">
282
      <title lang="en">Alvis NLP Entity Drug</title>
283
      <map><name set="alvis">entity-drug</name></map>
284
      <map>
162
      <map>
285
        <attr type="1" set="bib1">la:entity-drug</attr>
163
        <name set="dc">editor</name>
286
        <attr type="4" set="bib1">3</attr>
164
      </map>
165
      <map primary="true">
166
        <attr type="1">1020</attr>
287
      </map>
167
      </map>
288
    </index>
168
    </index>
289
    <index search="true" scan="true" sort="false">
169
    <index search="true" scan="true" sort="false">
290
      <title lang="en">Alvis NLP Lemma Canonical </title>
291
      <map><name set="alvis">lemma-canonical</name></map>
292
      <map>
170
      <map>
293
        <attr type="1" set="bib1">la:lemma-canonical</attr>
171
        <name set="dc">publisher</name>
294
        <attr type="4" set="bib1">3</attr>
172
      </map>
173
      <map primary="true">
174
        <attr type="1">1018</attr>
295
      </map>
175
      </map>
296
    </index>
176
    </index>
297
    <index search="true" scan="true" sort="false">
177
    <index search="true" scan="true" sort="false">
298
      <title lang="en">Alvis NLP Syntactic Noun</title>
299
      <map><name set="alvis">syntactic-noun</name></map>
300
      <map>
178
      <map>
301
        <attr type="1" set="bib1">la:syntactic-noun</attr>
179
        <name set="dc">description</name>
302
        <attr type="4" set="bib1">3</attr>
180
      </map>
181
      <map primary="true">
182
        <attr type="1">62</attr>
303
      </map>
183
      </map>
304
    </index>
184
    </index>
305
    <index search="true" scan="true" sort="false">
185
    <index search="true" scan="true" sort="false">
306
      <title lang="en">Alvis NLP Syntactic Verb</title>
307
      <map><name set="alvis">syntactic-verb</name></map>
308
      <map>
186
      <map>
309
        <attr type="1" set="bib1">la:syntactic-verb</attr>
187
        <name set="dc">date</name>
310
        <attr type="4" set="bib1">3</attr>
188
      </map>
189
      <map primary="true">
190
        <attr type="1">30</attr>
311
      </map>
191
      </map>
312
    </index>
192
    </index>
313
    <index search="true" scan="true" sort="false">
193
    <index search="true" scan="true" sort="false">
314
      <title lang="en">Alvis NLP Syntactic Adjective</title>
315
      <map><name set="alvis">syntactic-adjective</name></map>
316
      <map>
194
      <map>
317
        <attr type="1" set="bib1">la:syntactic-adjective</attr>
195
        <name set="dc">resourceType</name>
318
        <attr type="4" set="bib1">3</attr>
196
      </map>
197
      <map primary="true">
198
        <attr type="1">1031</attr>
319
      </map>
199
      </map>
320
    </index>
200
    </index>
321
    <index search="true" scan="true" sort="false">
201
    <index search="true" scan="true" sort="false">
322
      <title lang="en">Alvis NLP Word Form</title>
323
      <map><name set="alvis">word-form</name></map>
324
      <map>
202
      <map>
325
        <attr type="1" set="bib1">la:word-form</attr>
203
        <name set="dc">format</name>
326
        <attr type="4" set="bib1">3</attr>
204
      </map>
205
      <map primary="true">
206
        <attr type="1">1034</attr>
327
      </map>
207
      </map>
328
    </index>
208
    </index>
329
    <!-- <index search="true" scan="true" sort="false">
209
    <index search="true" scan="true" sort="false">
330
      <title lang="en">Alvis NLP Term Form</title>
331
      <map><name set="alvis">term-form</name></map>
332
      <map>
210
      <map>
333
        <attr type="1" set="bib1">la:term-form</attr>
211
        <name set="dc">resourceIdentifier</name>
334
        <attr type="4" set="bib1">3</attr>
335
      </map>
212
      </map>
336
    </index> -->
213
      <map primary="true">
337
    <!-- <index search="true" scan="true" sort="false">
214
        <attr type="1">12</attr>
338
      <title lang="en">Alvis Wpcats</title>
339
      <map><name set="alvis">wpcats</name></map>
340
      <map>
341
        <attr type="1" set="bib1">wpcats</attr>
342
      </map>
215
      </map>
343
    </index> -->
216
    </index>
344
345
    <!-- Dublin Core Indexes -->
346
    <index search="true" scan="true" sort="false">
217
    <index search="true" scan="true" sort="false">
347
      <title lang="en">DC Title</title>
348
      <map><name set="dc">title</name></map>
349
      <map>
218
      <map>
350
        <attr type="1" set="bib1">dc:title</attr>
219
        <name set="dc">language</name>
220
      </map>
221
      <map primary="true">
222
        <attr type="1">54</attr>
351
      </map>
223
      </map>
352
    </index>
224
    </index>
353
    <index search="true" scan="true" sort="false">
225
    <index search="true" scan="true" sort="false">
354
      <title lang="en">DC Creator</title>
355
      <map><name set="dc">creator</name></map>
356
      <map>
226
      <map>
357
        <attr type="1" set="bib1">dc:creator</attr>
227
        <name set="dc">Place-publication</name>
228
      </map>
229
      <map primary="true">
230
        <attr type="1">59</attr>
358
      </map>
231
      </map>
359
    </index>
232
    </index>
360
    <index search="true" scan="true" sort="false">
233
    <index search="true" scan="true" sort="false">
361
      <title lang="en">DC Subject</title>
362
      <map><name set="dc">subject</name></map>
363
      <map>
234
      <map>
364
        <attr type="1" set="bib1">dc:subject</attr>
235
        <name set="bath">keyTitle</name>
236
      </map>
237
      <map primary="true">
238
        <attr type="1">33</attr>
365
      </map>
239
      </map>
366
    </index>
240
    </index>
367
    <index search="true" scan="true" sort="false">
241
    <index search="true" scan="true" sort="false">
368
      <title lang="en">DC Description</title>
369
      <map><name set="dc">description</name></map>
370
      <map>
242
      <map>
371
        <attr type="1" set="bib1">dc:description</attr>
243
        <name set="bath">possessingInstitution</name>
244
      </map>
245
      <map primary="true">
246
        <attr type="1">1044</attr>
372
      </map>
247
      </map>
373
    </index>
248
    </index>
374
    <index search="true" scan="true" sort="false">
249
    <index search="true" scan="true" sort="false">
375
      <title lang="en">DC Publisher</title>
376
      <map><name set="dc">publisher</name></map>
377
      <map>
250
      <map>
378
        <attr type="1" set="bib1">dc:publisher</attr>
251
        <name set="bath">name</name>
252
      </map>
253
      <map primary="true">
254
        <attr type="1">1002</attr>
379
      </map>
255
      </map>
380
    </index>
256
    </index>
381
    <index search="true" scan="true" sort="false">
257
    <index search="true" scan="true" sort="false">
382
      <title lang="en">DC Contributor</title>
383
      <map><name set="dc">contributor</name></map>
384
      <map>
258
      <map>
385
        <attr type="1" set="bib1">dc:contributor</attr>
259
        <name set="bath">personalName</name>
260
      </map>
261
      <map primary="true">
262
        <attr type="1">1</attr>
386
      </map>
263
      </map>
387
    </index>
264
    </index>
388
    <index search="true" scan="true" sort="false">
265
    <index search="true" scan="true" sort="false">
389
      <title lang="en">DC Date</title>
390
      <map><name set="dc">date</name></map>
391
      <map>
266
      <map>
392
        <attr type="1" set="bib1">dc:date</attr>
267
        <name set="bath">corporateName</name>
268
      </map>
269
      <map primary="true">
270
        <attr type="1">2</attr>
393
      </map>
271
      </map>
394
    </index>
272
    </index>
395
    <index search="true" scan="true" sort="false">
273
    <index search="true" scan="true" sort="false">
396
      <title lang="en">DC Type</title>
397
      <map><name set="dc">type</name></map>
398
      <map>
274
      <map>
399
        <attr type="1" set="bib1">dc:type</attr>
275
        <name set="bath">conferenceName</name>
276
      </map>
277
      <map primary="true">
278
        <attr type="1">3</attr>
400
      </map>
279
      </map>
401
    </index>
280
    </index>
402
    <index search="true" scan="true" sort="false">
281
    <index search="true" scan="true" sort="false">
403
      <title lang="en">DC Format</title>
404
      <map><name set="dc">format</name></map>
405
      <map>
282
      <map>
406
        <attr type="1" set="bib1"></attr>
283
        <name set="bath">uniformTitle</name>
284
      </map>
285
      <map primary="true">
286
        <attr type="1">6</attr>
407
      </map>
287
      </map>
408
    </index>
288
    </index>
409
    <index search="true" scan="true" sort="false">
289
    <index search="true" scan="true" sort="false">
410
      <title lang="en">DC Identifier</title>
411
      <map><name set="dc">identifier</name></map>
412
      <map>
290
      <map>
413
        <attr type="1" set="bib1">dc:identifier</attr>
291
        <name set="bath">isbn</name>
292
      </map>
293
      <map primary="true">
294
        <attr type="1">7</attr>
414
      </map>
295
      </map>
415
    </index>
296
    </index>
416
    <index search="true" scan="true" sort="false">
297
    <index search="true" scan="true" sort="false">
417
      <title lang="en">DC Source</title>
418
      <map><name set="dc">source</name></map>
419
      <map>
298
      <map>
420
        <attr type="1" set="bib1">dc:source</attr>
299
        <name set="bath">issn</name>
300
      </map>
301
      <map primary="true">
302
        <attr type="1">8</attr>
421
      </map>
303
      </map>
422
    </index>
304
    </index>
423
    <index search="true" scan="true" sort="false">
305
    <index search="true" scan="true" sort="false">
424
      <title lang="en">DC Language</title>
425
      <map><name set="dc">language</name></map>
426
      <map>
306
      <map>
427
        <attr type="1" set="bib1">dc:language</attr>
307
        <name set="bath">geographicName</name>
308
      </map>
309
      <map primary="true">
310
        <attr type="1">58</attr>
428
      </map>
311
      </map>
429
    </index>
312
    </index>
430
    <index search="true" scan="true" sort="false">
313
    <index search="true" scan="true" sort="false">
431
      <title lang="en">DC Relation</title>
432
      <map><name set="dc">relation</name></map>
433
      <map>
314
      <map>
434
        <attr type="1" set="bib1">dc:relation</attr>
315
        <name set="bath">notes</name>
316
      </map>
317
      <map primary="true">
318
        <attr type="1">63</attr>
435
      </map>
319
      </map>
436
    </index>
320
    </index>
437
    <index search="true" scan="true" sort="false">
321
    <index search="true" scan="true" sort="false">
438
      <title lang="en">DC Coverage</title>
439
      <map><name set="dc">coverage</name></map>
440
      <map>
322
      <map>
441
        <attr type="1" set="bib1">dc:coverage</attr>
323
        <name set="bath">topicalSubject</name>
324
      </map>
325
      <map primary="true">
326
        <attr type="1">1079</attr>
442
      </map>
327
      </map>
443
    </index>
328
    </index>
444
    <index search="true" scan="true" sort="false">
329
    <index search="true" scan="true" sort="false">
445
      <title lang="en">DC Rights</title>
446
      <map><name set="dc">rights</name></map>
447
      <map>
330
      <map>
448
        <attr type="1" set="bib1">dc:rights</attr>
331
        <name set="bath">genreForm</name>
332
      </map>
333
      <map primary="true">
334
        <attr type="1">1075</attr>
449
      </map>
335
      </map>
450
    </index>
336
    </index>
451
452
  </indexInfo>
337
  </indexInfo>
453
454
  <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
455
       <schemaInfo>, sic ..
456
  <recordInfo>
457
    <recordSyntax identifier="1.2.840.10003.5.109.10">
458
      <elementSet name="F">
459
        <title lang="en" primary="true">Full XML Record</title>
460
      </elementSet>
461
    </recordSyntax>
462
  </recordInfo>
463
  -->
464
465
  <schemaInfo>
466
467
    <schema identifier="http://www.loc.gov/zing/srw/dcschema/v1.0/"
468
            location="http://www.loc.gov/zing/srw/dc.xsd" 
469
            name="dc"
470
            retrieve="true">
471
      <title lang="en">Dublin Core</title>
472
    </schema>
473
474
    <schema identifier="http://indexdata.dk/dc-short"
475
            location="" 
476
            name="dc-short"
477
            retrieve="true">
478
      <title lang="en">Dublin Core Short Form</title>
479
    </schema>
480
481
    <!--<schema identifier="http://indexdata.dk/snippet"
482
            location="" 
483
            name="snippet"
484
            retrieve="true">
485
      <title lang="en">Snippet - Not Implemented</title>
486
    </schema> -->
487
488
    <!--<schema identifier="http://indexdata.dk/help"
489
            location="" 
490
            name="help"
491
            retrieve="true">
492
      <title lang="en">Help - Not Implemented</title>
493
    </schema> -->
494
495
    <schema identifier="http://indexdata.dk/pretty"
496
            location="" 
497
            name="pretty"
498
            retrieve="true">
499
      <title lang="en">Pretty</title>
500
    </schema>
501
502
    <schema identifier="http://indexdata.dk/D9.1"
503
            location="" 
504
            name="D9.1"
505
            retrieve="true">
506
      <title lang="en">Alvis D9.1 Schema</title>
507
    </schema>
508
509
    <schema identifier="http://alvis.info/enriched/"
510
            location="http://project.alvis.info/alvis_docs/alvis-document.xsd" 
511
            name="alvis"
512
            retrieve="true">
513
      <title lang="en">Alvis Enriched</title>
514
    </schema>
515
516
    <schema identifier="http://indexdata.dk/zebra/xslt/1"
517
            location="" 
518
            name="index"
519
            retrieve="true">
520
      <title lang="en">Zebra Indexing</title>
521
    </schema>
522
523
  </schemaInfo>
524
 
525
  <configInfo>
338
  <configInfo>
526
527
    <!-- searchRetrieve settings -->
339
    <!-- searchRetrieve settings -->
528
529
    <!-- default context set -->
340
    <!-- default context set -->
530
    <default type="contextSet">cql</default>
341
    <default type="contextSet">cql</default>
531
532
    <default type="index">all</default>
342
    <default type="index">all</default>
533
534
    <!-- default relation -->
343
    <!-- default relation -->
535
    <default type="relation">=</default>
344
    <default type="relation">=</default>
536
537
    <!-- relation supported by the server or index -->
345
    <!-- relation supported by the server or index -->
538
    <supports type="relation">&lt;</supports> <!-- 2=1 OK -->
346
    <supports type="relation">&lt;</supports>
539
    <supports type="relation">&lt;=</supports> <!-- 2=2 OK -->
347
    <supports type="relation">le</supports>
540
    <supports type="relation">=</supports> <!-- 2=3 OK -->
348
    <supports type="relation">eq</supports>
541
    <supports type="relation">&gt;=</supports> <!-- 2=4 OK -->
349
    <supports type="relation">exact</supports>
542
    <supports type="relation">&gt;</supports> <!-- 2=5 OK -->
350
    <supports type="relation">ge</supports>
543
    <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
351
    <supports type="relation">&gt;</supports>
544
    <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
352
    <supports type="relation">&lt;&gt;</supports>
545
    <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
353
    <supports type="relation">all</supports>
546
354
    <supports type="relation">any</supports>
355
    <supports type="relation">scr</supports>
547
    <!-- relation modifier supported by the server or index -->
356
    <!-- relation modifier supported by the server or index -->
548
    <!-- <supports type="relationModifier">relevant</supports> --><!-- 2=102 OK, makes no difference .. sic -->
357
    <supports type="relationModifier">relevant</supports>
549
    <!-- <supports type="relationModifier">phonetic</supports> --> <!-- 2=100 DEAD -->
358
    <supports type="relationModifier">fuzzy</supports>
550
    <!-- <supports type="relationModifier">stem</supports> --> <!-- 2=101 DEAD !! -->
359
    <supports type="relationModifier">stem</supports>
551
360
    <supports type="relationModifier">phonetic</supports>
552
    <!-- support proximity (Empty) -->
361
    <!-- support proximity (Empty) -->
553
    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
362
    <!-- <supports type="proximity"></supports> -->
554
363
    <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
555
    <!-- proximity modifier supported by the server or index 
364
    <!-- proximity modifier supported by the server or index
556
         (relation, distance, unit, ordering) -->
365
         (relation, distance, unit, ordering) -->
557
    <!-- <supports type="proximityModifier"></supports> -->
366
    <!-- <supports type="proximityModifier"></supports> -->
558
559
    <!-- boolean modifier supported by the server or index -->
367
    <!-- boolean modifier supported by the server or index -->
560
    <!-- <supports type="booleanModifier"></supports> -->
368
    <!-- <supports type="booleanModifier"></supports> -->
561
562
    <!-- masking character supported (* or ?) -->
369
    <!-- masking character supported (* or ?) -->
563
    <supports type="maskingCharacter">*</supports>
370
    <supports type="maskingCharacter">*</supports>
564
    <supports type="maskingCharacter">?</supports>
371
    <supports type="maskingCharacter">?</supports>
565
566
    <!-- anchoring supported? (^ character) -->
372
    <!-- anchoring supported? (^ character) -->
567
    <!-- empty terms supported (Empty) -->
373
    <!-- empty terms supported (Empty) -->
568
    <supports type="emptyTerm"></supports>
374
    <supports type="emptyTerm"/>
569
570
    <!-- sorting settings -->
375
    <!-- sorting settings -->
571
572
    <!-- default schema used in sorting, in short name form -->
376
    <!-- default schema used in sorting, in short name form -->
573
    <!-- <default type="sortSchema"></default> -->
377
    <!-- <default type="sortSchema"></default> -->
574
    <!-- MIKE: deprecated -->
378
    <!-- MIKE: deprecated -->
575
576
    <!-- server support sort -->
379
    <!-- server support sort -->
577
578
    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
380
    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
579
    <!-- <supports type="sortModifier"></supports> -->
381
    <!-- <supports type="sortModifier"></supports> -->
580
382
    <!-- presentation settings -->
581
    <!-- presentation settings --> 
582
583
    <!-- default number of records that a server will return at once  -->
383
    <!-- default number of records that a server will return at once  -->
584
    <default type="numberOfRecords">0</default>
384
    <default type="numberOfRecords">0</default>
585
586
    <!-- default schema used for retrieved records -->
385
    <!-- default schema used for retrieved records -->
587
    <default type="retrieveSchema">index</default>
386
    <default type="retrieveSchema">index</default>
588
    <!-- default stylesheet URL, or if stylesheets are supported -->
387
    <!-- default stylesheet URL, or if stylesheets are supported -->
589
    <setting type="stylesheet">docpath/sru.xsl</setting>
388
    <setting type="stylesheet">docpath/sru.xsl</setting>
590
591
    <!-- default record packing returned (string or xml) -->
389
    <!-- default record packing returned (string or xml) -->
592
    <default type="recordPacking">xml</default>
390
    <default type="recordPacking">xml</default>
593
594
    <!-- maximum number of records that a server will return at once -->
391
    <!-- maximum number of records that a server will return at once -->
595
    <!-- <setting type="maximumRecords">1000</setting> -->
392
    <!-- <setting type="maximumRecords">1000</setting> -->
596
597
    <!-- support result sets (Empty) -->
393
    <!-- support result sets (Empty) -->
598
    <!-- <supports type="resultSets"></supports>  --> 
394
    <!-- <supports type="resultSets"></supports>  -->
599
600
    <!-- XPath retrieval supported -->
395
    <!-- XPath retrieval supported -->
601
    <!-- <supports type="recordXPath"></supports> -->
396
    <!-- <supports type="recordXPath"></supports> -->
602
603
    <!-- scan settings -->
397
    <!-- scan settings -->
604
605
    <!-- scan operation supported -->
398
    <!-- scan operation supported -->
606
    <supports type="scan"></supports>
399
    <supports type="scan"/>
607
608
    <!-- default number of terms to be returned in scan -->
400
    <!-- default number of terms to be returned in scan -->
609
    <default type="numberOfTerms">20</default>
401
    <default type="numberOfTerms">20</default>
610
611
    <!-- other server settings -->
402
    <!-- other server settings -->
612
613
    <!-- older version of the protocol supported  -->
403
    <!-- older version of the protocol supported  -->
614
    <!-- <supports type="version">1.1</supports> -->
404
    <!-- <supports type="version">1.1</supports> -->
615
616
    <!-- number of seconds that a result set will be maintained for -->
405
    <!-- number of seconds that a result set will be maintained for -->
617
    <setting type="resultSetTTL">0</setting>
406
    <setting type="resultSetTTL">0</setting>
618
619
    <!-- A type of extraRequestData available in the
407
    <!-- A type of extraRequestData available in the
620
         searchRetrieveRequest. The extra*Data fields are represented as two
408
         searchRetrieveRequest. The extra*Data fields are represented as two
621
         space separated words, the first the identifier for the extension and
409
         space separated words, the first the identifier for the extension and
Lines 623-636 Link Here
623
         only one word, then it is the extension id and all elements from
411
         only one word, then it is the extension id and all elements from
624
         within are supported. -->
412
         within are supported. -->
625
    <!-- <supports type="extraSearchData"></supports> -->
413
    <!-- <supports type="extraSearchData"></supports> -->
626
627
    <!-- A type of extraRequestData available in the explainRequest -->
414
    <!-- A type of extraRequestData available in the explainRequest -->
628
    <!-- <supports type="extraExplainData"></supports> -->
415
    <!-- <supports type="extraExplainData"></supports> -->
629
630
    <!-- A type of extraRequestData available in the scanRequest -->
416
    <!-- A type of extraRequestData available in the scanRequest -->
631
    <!-- <supports type="extraScanData"></supports> -->
417
    <!-- <supports type="extraScanData"></supports> -->
632
    <!-- The URI identifier of a supported profile -->
418
    <!-- The URI identifier of a supported profile -->
633
    <!-- <supports type="profile"></supports> -->
419
    <!-- <supports type="profile"></supports> -->
634
  </configInfo>
420
  </configInfo>
635
   
636
</explain>
421
</explain>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/services/explain.tt (+260 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
[%- USE Koha -%]
4
[%- USE date( format = '%Y-%m-%d %H:%M:%S' ) -%]
5
6
<!-- this file configures the SRU/SRW explain response -->
7
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
8
<!-- validate this using zeerex-2.0.xsd -->
9
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
10
<!-- Generated by misc/maintenance/generate_explain.pl on [% date.format %] -->
11
12
<explain xmlns="http://explain.z3950.org/dtd/2.0/">
13
14
  <serverInfo protocol="[% IF ( config.protocol ) %][% config.protocol %][% ELSE %]SRW/SRU/Z39.50[% END %]"
15
              version="2.0"
16
              transport="[% IF ( config.transport ) %][% config.transport %][% ELSE %]http[% END %]">
17
    <!-- If host is set to @ you need to hand edit it, or you can edit the
18
         <listen> element for "publicserver" in koha-conf.xml:
19
         <listen id="publicserver" >tcp:<host>:<port></listen>
20
         and then regenerate the Explain doc. -->
21
    <host>[% host %]</host>
22
    [% IF ( authorities ) %]
23
        <!-- The sample and default configs provided with Koha assume that only
24
             bibliographic records will be exposed through SRU: There is an
25
             available <listen id="publicserver"/> element set up for serving
26
             bibliographic records, but no corresponding element for a public
27
             authorities server. Since we can't guess at the id of a public
28
             authorities server, the port element below is filled with a
29
             placeholder which should be replaced manually if a public authorities
30
             server is set up. -->
31
        <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
32
        <database>authorities</database>
33
    [% ELSE %]
34
        <port>[% port %]</port>
35
        <database>biblios</database>
36
    [% END %]
37
  </serverInfo>
38
39
  <databaseInfo>
40
41
    [% IF ( config.title ) -%]
42
        [%- FOREACH title IN config.title -%]
43
            <title lang="[% title.lang %]"[% IF ( title.primary ) %] primary="true"[% END %]>[% title.text %]</title>
44
        [% END -%]
45
    [% ELSE -%]
46
        [% IF ( authorities ) %]
47
            <title lang="en" primary="true">Koha Authorities SRU/SRW/Z39.50 server</title>
48
        [% ELSE %]
49
            <title lang="en" primary="true">Koha Bibliographic SRU/SRW/Z39.50 server</title>
50
        [% END %]
51
    [% END -%]
52
53
    [%- IF ( config.description ) -%]
54
        [%- FOREACH description IN config.description -%]
55
            <description lang="[% description.lang %]"[% IF ( description.primary ) %] primary="true"[% END %]>[% description.text %]</description>
56
        [% END -%]
57
    [% ELSE -%]
58
        [% IF ( authorities ) %]
59
            <description lang="en" primary="true">Koha Authorities Server</description>
60
        [% ELSE %]
61
            <description lang="en" primary="true">Koha Bibliographic Server</description>
62
        [% END %]
63
    [% END -%]
64
65
    <author>
66
        [%- IF ( config.author ) -%]
67
            [%- config.author -%]
68
        [%- ELSIF ( Koha.Preference( 'LibraryName' ) != '' ) -%]
69
            [% Koha.Preference( 'LibraryName' ) -%]
70
        [%- ELSE -%]
71
            Koha
72
        [%- END -%]</author>
73
74
    <contact>
75
        [%- IF ( config.contact ) -%]
76
            [%- config.contact -%]
77
        [%- ELSIF ( Koha.Preference( 'KohaAdminEmailAddress' ) != '' ) -%]
78
            [%- Koha.Preference( 'KohaAdminEmailAddress' ) -%]
79
        [%- END -%]</contact>
80
81
    [% IF ( config.extent ) -%]
82
        [%- FOREACH extent IN config.extent -%]
83
            <extent lang="[% extent.lang %]"[% IF ( extent.primary ) %] primary="true"[% END %]>[% extent.text %]</extent>
84
        [% END -%]
85
    [% END -%]
86
87
    [% IF ( config.history ) -%]
88
        [%- FOREACH history IN config.history -%]
89
            <history lang="[% history.lang %]"[% IF ( history.primary ) %] primary="true"[% END %]>[% history.text %]</history>
90
        [% END -%]
91
    [% END -%]
92
93
    [% IF ( config.langUsage ) %]
94
        [% FOREACH lang IN config.langUsage %]
95
            <langUsage lang="[% lang.lang %]"[% IF ( lang.primary ) %] primary="true"[% END %][% IF ( lang.codes ) %] codes="[% lang.codes %]"[% END %]>[% lang.text %]</langUsage>
96
        [% END %]
97
    [% END %]
98
99
    [% IF ( config.restrictions ) -%]
100
        [%- FOREACH restriction IN config.restrictions -%]
101
            <restrictions lang="[% restriction.lang %]"[% IF ( restriction.primary ) %] primary="true"[% END %]>[% restriction.text %]</restrictions>
102
        [% END -%]
103
    [% END -%]
104
105
    [% IF ( config.subjects ) -%]
106
        <subjects>
107
            [% FOREACH sub IN config.subjects -%]
108
                <subject>[% sub %]</subject>
109
            [% END -%]
110
        </subjects>
111
    [% END %]
112
113
    <implementation identifier="zebra" version="2.0">
114
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
115
    </implementation>
116
117
    <links>
118
      [% IF ( Koha.Preference( 'OPACBaseURL' ) ) %]<link type="www">[% Koha.Preference( 'OPACBaseURL' ) %]/</link>[% END %]
119
      <link type="z39.50">[% IF ( config.transport ) %][% config.transport %][% ELSE %]http[% END %]://[% host %]:[% port %]</link>
120
      <link type="srw">[% IF ( config.transport ) %][% config.transport %][% ELSE %]http[% END %]://[% host %]:[% port %]</link>
121
      <link type="sru">[% IF ( config.transport ) %][% config.transport %][% ELSE %]http[% END %]://[% host %]:[% port %]</link>
122
      [% IF ( Koha.Preference( 'OAI-PMH' ) ) %]<link type="oai">[% Koha.Preference( 'OPACBaseURL' ) %]/cgi-bin/koha/oai.pl</link>[% END %]
123
      [% IF ( Koha.Preference( 'OpacFavicon' ) ) %]<link type="icon">[% Koha.Preference( 'OpacFavicon' ) %]</link>[% END %]
124
    </links>
125
126
  </databaseInfo>
127
128
  <metaInfo>
129
    <dateModified>[% date.format %]</dateModified>
130
  </metaInfo>
131
132
  <indexInfo>
133
134
    [% FOREACH set IN pqf.sets -%]
135
        <set identifier="[% set.identifier %]" name="[% set.name %]"/>
136
    [% END -%]
137
138
    [% FOREACH index IN pqf.indexes %]
139
        <index search="true" scan="true" sort="false">
140
            [%- IF config.indexnames.${index.id} -%]
141
                [%- FOREACH this IN config.indexnames.${index.id} %]
142
                    <title lang="[% this.lang %]">[% this.title %]</title>
143
                [%- END %]
144
            [%- END %]
145
            <map><name set="[% index.set %]">[% index.index %]</name></map>
146
            <map primary="true">
147
                <attr type="[% index.type %]">[% index.value %]</attr>
148
            </map>
149
        </index>
150
    [% END -%]
151
152
  </indexInfo>
153
154
  <configInfo>
155
156
    <!-- searchRetrieve settings -->
157
158
    <!-- default context set -->
159
    <default type="contextSet">cql</default>
160
161
    <default type="index">all</default>
162
163
    <!-- default relation -->
164
    <default type="relation">=</default>
165
166
    <!-- relation supported by the server or index -->
167
    [% FOREACH rel IN pqf.relations -%]
168
        <supports type="relation">[% rel.rel | html %]</supports>
169
    [% END %]
170
171
    <!-- relation modifier supported by the server or index -->
172
    [% FOREACH relmod IN pqf.relationmodifiers -%]
173
        <supports type="relationModifier">[% relmod.relmod | html %]</supports>
174
    [% END %]
175
176
    <!-- support proximity (Empty) -->
177
    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
178
179
    <!-- proximity modifier supported by the server or index
180
         (relation, distance, unit, ordering) -->
181
    <!-- <supports type="proximityModifier"></supports> -->
182
183
    <!-- boolean modifier supported by the server or index -->
184
    <!-- <supports type="booleanModifier"></supports> -->
185
186
    <!-- masking character supported (* or ?) -->
187
    <supports type="maskingCharacter">*</supports>
188
    <supports type="maskingCharacter">?</supports>
189
190
    <!-- anchoring supported? (^ character) -->
191
    <!-- empty terms supported (Empty) -->
192
    <supports type="emptyTerm"></supports>
193
194
    <!-- sorting settings -->
195
196
    <!-- default schema used in sorting, in short name form -->
197
    <!-- <default type="sortSchema"></default> -->
198
    <!-- MIKE: deprecated -->
199
200
    <!-- server support sort -->
201
202
    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
203
    <!-- <supports type="sortModifier"></supports> -->
204
205
    <!-- presentation settings -->
206
207
    <!-- default number of records that a server will return at once  -->
208
    <default type="numberOfRecords">0</default>
209
210
    <!-- default schema used for retrieved records -->
211
    <default type="retrieveSchema">index</default>
212
    <!-- default stylesheet URL, or if stylesheets are supported -->
213
    <setting type="stylesheet">docpath/sru.xsl</setting>
214
215
    <!-- default record packing returned (string or xml) -->
216
    <default type="recordPacking">xml</default>
217
218
    <!-- maximum number of records that a server will return at once -->
219
    <!-- <setting type="maximumRecords">1000</setting> -->
220
221
    <!-- support result sets (Empty) -->
222
    <!-- <supports type="resultSets"></supports>  -->
223
224
    <!-- XPath retrieval supported -->
225
    <!-- <supports type="recordXPath"></supports> -->
226
227
    <!-- scan settings -->
228
229
    <!-- scan operation supported -->
230
    <supports type="scan"></supports>
231
232
    <!-- default number of terms to be returned in scan -->
233
    <default type="numberOfTerms">20</default>
234
235
    <!-- other server settings -->
236
237
    <!-- older version of the protocol supported  -->
238
    <!-- <supports type="version">1.1</supports> -->
239
240
    <!-- number of seconds that a result set will be maintained for -->
241
    <setting type="resultSetTTL">0</setting>
242
243
    <!-- A type of extraRequestData available in the
244
         searchRetrieveRequest. The extra*Data fields are represented as two
245
         space separated words, the first the identifier for the extension and
246
         the second the individual element name from the extension. If there is
247
         only one word, then it is the extension id and all elements from
248
         within are supported. -->
249
    <!-- <supports type="extraSearchData"></supports> -->
250
251
    <!-- A type of extraRequestData available in the explainRequest -->
252
    <!-- <supports type="extraExplainData"></supports> -->
253
254
    <!-- A type of extraRequestData available in the scanRequest -->
255
    <!-- <supports type="extraScanData"></supports> -->
256
    <!-- The URI identifier of a supported profile -->
257
    <!-- <supports type="profile"></supports> -->
258
  </configInfo>
259
260
</explain>
(-)a/misc/maintenance/generate_explain.pl (-1 / +331 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2017 Magnus Enger Libriotech
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
=head1 NAME
21
22
generate_explain.pl
23
24
=head1 SYNOPSIS
25
26
sudo koha-shell -c "perl generate_explain.pl -v" mykoha
27
28
sudo PERL5LIB=/usr/share/koha/lib KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml perl generate_explain.pl -c /path/to/explain.yaml --overwrite -v
29
30
=head1 DESCRIPTION
31
32
Reads an optional config file, some of Koha's config files and generates an
33
Explain document that can be served by the Zebra SRU server.
34
35
By default, the generated Explain document will be written to STDOUT. Specify
36
the --overwrite command line option to actually overwrite the existing Explain
37
document.
38
39
=cut
40
41
use File::Slurp;
42
use YAML::Syck qw( LoadFile );
43
use CGI qw( utf8 ); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
44
use XML::Simple;
45
use Modern::Perl;
46
use Getopt::Long;
47
use Pod::Usage;
48
use Data::Dumper; # Debug
49
50
use C4::Context;
51
use C4::Templates;
52
53
=head1 OPTIONS
54
55
=over 8
56
57
=item B<-c | --configfile>
58
59
Path to a configfile that should be used to generate parts of the Explain
60
document.
61
62
=item B<-a | --authorities>
63
64
If this option is not specified, the script will assume we are dealing with
65
biblios.
66
67
=item B<-o | --overwrite>
68
69
Actually overwrite the existing explain document. If this is not specified, the
70
generated Explain document will be written to STDOUT and no files will be
71
overwritten.
72
73
=item B<-h | --help>
74
75
Print this usage statement.
76
77
=item B<-v | --verbose>
78
79
More verbose output.
80
81
=back
82
83
=cut
84
85
my ( $configfile, $authorities, $overwrite, $help, $verbose );
86
GetOptions(
87
    'c|configfile=s'  => \$configfile,
88
    'a|authorities'   => \$authorities,
89
    'o|overwrite'     => \$overwrite,
90
    'h|help'          => \$help,
91
    'v|verbose'       => \$verbose,
92
);
93
94
if ( $help ) {
95
    pod2usage( -verbose => 2 );
96
    exit;
97
}
98
99
=head1 CONFIG FILE
100
101
The config file should be in YAML format. Here is an example config that shows
102
all the available options. See http://zeerex.z3950.org/dtd/commentary.html for
103
further details about the options.
104
105
    ---
106
    # Protocol
107
    # Default: SRW/SRU/Z39.50
108
    protocol: "SRU"
109
110
    # Transport
111
    # Default: http
112
    transport: "https"
113
114
    # Title
115
    # Should have a two letter language code.
116
    # One title can be marked as primary
117
    title:
118
        - text: This is some title
119
          lang: en
120
          primary: true
121
        - text: Dette er en tittel
122
          lang: nb
123
124
    # Description
125
    # Should have a two letter language code.
126
    # One description can be marked as primary
127
    description:
128
        - text: This is some description
129
          lang: en
130
          primary: true
131
        - text: Dette er en beskrivelse
132
          lang: nb
133
134
    # Author
135
    # If author is not set in the config, the LibraryName syspref will be used. If
136
    # that is not set, the string "Koha" will be used.
137
    author: "The librarian"
138
139
    # Contact
140
    # If the contact is not set in the config, the KohaAdminEmailAddress syspref
141
    # will be used.
142
    contact: "librarian@example.org"
143
144
    # Extent
145
    extent:
146
        - text: "This is the extent of the database."
147
          lang: "en"
148
          primary: "true"
149
150
    # History
151
    history:
152
        - text: "This is the history of the database."
153
          lang: "en"
154
          primary: "true"
155
156
    # langUsage
157
    langUsage:
158
        - text: "Records are in English and Norwegian"
159
          codes: "en nb"
160
          lang: "en"
161
          primary: "true"
162
163
    # Restrictions
164
    restrictions:
165
        - text: "Free for all!"
166
          lang: "en"
167
          primary: "true"
168
169
    # Subjects
170
    subjects:
171
        - "Subject A"
172
        - "Subject B"
173
174
    # Index names
175
    # Indexes can be given more explanatory names, but this is optional.
176
    indexnames:
177
        dc_title:
178
          - title: "Title"
179
            lang: "en"
180
          - title: "Tittel"
181
            lang: "nb"
182
        dc_subject:
183
          - title: "Subject"
184
            lang: "en"
185
        rec_identifier:
186
          - title: "Record identifier"
187
            lang: "en"
188
189
=cut
190
191
# Load the config file, if one is specified
192
my $config;
193
if ( $configfile ) {
194
    if ( -e $configfile ) {
195
        say "Reading config from $configfile" if $verbose;
196
        $config = LoadFile( $configfile );
197
    } else {
198
        die "$configfile not found";
199
    }
200
}
201
202
# Get the path to he Koha config file from the KOHA_CONF environment variable
203
my $koha_conf = $ENV{ 'KOHA_CONF' };
204
say "Looking at $koha_conf" if $verbose;
205
206
# Read the Koha config file
207
my $conf = XMLin(
208
    $koha_conf,
209
    keyattr => ['id'],
210
    forcearray => ['listen', 'server', 'serverinfo'],
211
    suppressempty => ''
212
);
213
214
# Get the SRU host and port from the Koha config file
215
my $publicserver = $conf->{'listen'}->{'publicserver'}->{'content'};
216
my ( $tcp, $host, $port ) = split /:/, $publicserver;
217
say "SRU is listening on host $host and port $port" if $verbose;
218
219
# Find the path to pqf.properties file
220
my $pqf_properties_file = $conf->{'server'}->{'publicserver'}->{'cql2rpn'};
221
say "Looking at $pqf_properties_file" if $verbose;
222
223
# Read the pqf.properties file, and extract the information we need
224
my %pqf;
225
my @lines = read_file( $pqf_properties_file );
226
foreach my $line ( @lines ) {
227
228
    # Remove trailing whitespace
229
    chomp $line;
230
    # Skip commented lines - start of line, zero or more spaces, comment sign
231
    next if $line =~ m/^ {0,}#/;
232
    # Skip empty lines - start of line, zero or more spaces, end of line
233
    next if $line =~ m/^ {0,}$/;
234
235
    # Look for lines that start with "set."
236
    if ( $line =~ m/^set\.(.*?) {0,}= {0,}(.*)/ ) {
237
        push @{ $pqf{'sets'} }, {
238
            'name' => $1,
239
            'identifier' => $2,
240
        };
241
    }
242
243
    # Look for lines that start with "index."
244
    if ( $line =~ m/^index\.(.*?)\.(.*?) {0,}= (.*?)=(.*?) {0,}$/ ) {
245
        push @{ $pqf{'indexes'} }, {
246
            'set'   => $1,
247
            'index' => $2,
248
            'id'    => "$1_$2",
249
            'type'  => $3,
250
            'value' => $4,
251
        };
252
    }
253
254
    # Look for lines that start with "relation."
255
    if ( $line =~ m/^relation\.(.*?) {0,}=.*$/ ) {
256
        push @{ $pqf{'relations'} }, {
257
            'rel' => $1,
258
        };
259
    }
260
261
    # Look for lines that start with "relationModifier."
262
    if ( $line =~ m/^relationModifier\.(.*?) {0,}=.*$/ ) {
263
        push @{ $pqf{'relationmodifiers'} }, {
264
            'relmod' => $1,
265
        };
266
    }
267
268
}
269
270
# Set up the template
271
my $template = C4::Templates::gettemplate(
272
    'services/explain.tt',
273
    'intranet',
274
    new CGI
275
);
276
277
# Pass some values to the template
278
$template->param(
279
    'config'      => $config,
280
    'pqf'         => \%pqf,
281
    'host'        => $host,
282
    'port'        => $port,
283
    'authorities' => $authorities,
284
);
285
286
# Get the output from the template
287
my $output = $template->output;
288
if ( $overwrite ) {
289
    # Find the path to the Explain doc
290
    my $explain_doc;
291
    foreach my $inc ( @{ $conf->{'server'}->{'publicserver'}->{'xi:include'} } ) {
292
        my $href = $inc->{'href'};
293
        if ( $href =~ m/explain/ ) {
294
            $explain_doc = $href;
295
        }
296
    }
297
    say "Going to write to $explain_doc" if $verbose;
298
    # Make a backup of the existing file
299
    rename $explain_doc, "$explain_doc-old";
300
    # Do the actual write
301
    write_file( $explain_doc, $output );
302
} else {
303
    say $output;
304
}
305
306
=head1 TIPS AND TRICKS
307
308
=head2 Pretty printing XML
309
310
To have the output of this script look nice, run it through B<xmllint>:
311
312
  perl generate_explain.pl | xmllint --format -
313
314
=head1 AUTHOR
315
316
Magnus Enger, <magnus [at] libriotech.no>
317
318
=head1 LICENSE
319
320
    This program is free software: you can redistribute it and/or modify
321
    it under the terms of the GNU General Public License as published by
322
    the Free Software Foundation, either version 3 of the License, or
323
    (at your option) any later version.
324
    This program is distributed in the hope that it will be useful,
325
    but WITHOUT ANY WARRANTY; without even the implied warranty of
326
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
327
    GNU General Public License for more details.
328
    You should have received a copy of the GNU General Public License
329
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
330
331
=cut

Return to bug 12836