added example zeerex with additional record converting, CQL converting, and other...
[metaproxy-moved-to-github.git] / etc / zeerex-explain.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- $Id: zeerex-explain.xml,v 1.1 2006-09-07 09:52:23 marc Exp $ -->
4
5 <!-- this file configures the SRU/SRW explain response -->
6 <!-- see: http://explain.z3950.org/dtd/commentary.html -->
7 <!-- validate this using zeerex-2.0.xsd -->
8 <!-- http://explain.z3950.org/dtd/zeerex-2.0.xsd -->
9 <!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
10 <!-- Other info:  Z39.92 -->
11
12 <explain xmlns="http://explain.z3950.org/dtd/2.0/"
13          xmlns:izx="http://indexdata.com/zeerex/1.0">
14
15   <!-- try stylesheet url: http://./?stylesheet=docpath/sru2.xsl -->
16   <serverInfo protocol="SRW/SRU/Z39.50">
17
18     <host>foo.indexdata.dk</host>
19     <port>80</port>
20     <!-- <database numRecs="1314" lastUpdate="2006-03-15 09-05-33">
21          Default</database> -->
22     <database>Default</database>
23         <!--<authentication>
24       <user>azaroth</user>
25       <group>agroup</group>
26       <password>squirrelfish</password>
27     </authentication>-->
28   </serverInfo>
29
30   <databaseInfo>
31
32     <title lang="en" primary="true">Metaproxy SRU/SRW/Z39.50 server</title>
33
34     <description lang="en" primary="true">
35       Test ZeeRex Explain for SRU  and CQL-to-PQF query Metaproxy filter
36     </description>
37
38     <author>Marc Cromme, Index Data Aps, 
39             http://www.indexdata.dk</author>
40
41     <contact>Marc Cromme, marc(at)indexdata(dot)com</contact>
42
43     <!--<langUsage codes="en fr">
44         The records are in English and French.
45         </langUsage>  -->
46     <!-- <extend>Partially crawled web data</extend> -->
47    
48     <history>
49       Implemented for Talis
50     </history>
51
52     <implementation  identifier="Metaproxy" version="0.??">
53       <title>Index Data Metaproxy http://www.indexdata.dk</title>
54     </implementation>
55     
56     <links> 
57       <link type="z39.50">http://foo.indexdata.dk:80</link>
58       <link type="srw">http://foo.indexdata.dk:80</link>
59       <link type="sru">http://foo.indexdata.dk:80</link>
60     </links>
61     
62   </databaseInfo>
63
64   <!--
65   <metaInfo>
66     <dateModified>2002-03-29 19:00:00</dateModified>
67     <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
68                    id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
69     <dateAggregated>2002-03-30 06:30:00</dateAggregated>
70   </metaInfo>
71   -->
72
73
74   <indexInfo>
75     <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
76       <title>CQL Standard Set</title>
77     </set>
78     <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
79       <title>Record Standard Set</title>
80     </set>
81     <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
82       <title>Dublin Core Set</title>
83     </set>
84     <set name="bib1" identifier="1.2.840.10003.3.1">
85       <title>BIB-1 Z39.50 Standard Set</title>
86     </set>
87
88
89     <!-- CQL standard index -->
90     <index search="true" scan="true" sort="false">
91       <title lang="en">CQL Server Choice</title>
92       <map><name set="cql">serverChoice</name></map>
93       <map>
94         <attr type="1" set="bib1">text</attr>
95       </map>
96     </index>
97     <index search="true" scan="true" sort="false">
98       <title lang="en">CQL All</title>
99       <map><name set="cql">all</name></map>
100       <map>
101         <attr type="1" set="bib1">text</attr>
102       </map>
103     </index>
104
105     <!-- Record ID index -->
106     <index search="true" scan="true" sort="false">
107       <title lang="en">Record ID</title>
108       <map><name set="rec">id</name></map>
109       <map>
110         <attr type="1" set="bib1">rec:id</attr>
111         <attr type="4" set="bib1">3</attr>
112       </map>
113     </index>    
114
115     <!-- Dublin Core Indexes -->
116     <index search="true" scan="true" sort="false">
117       <izx:cost value="0"/>
118       <title lang="en">DC Title</title>
119       <map><name set="dc">title</name></map>
120       <map>
121         <attr type="1" set="bib1">dc:title</attr>
122       </map>
123     </index>
124     <index search="true" scan="true" sort="false">
125       <title lang="en">DC Creator</title>
126       <map><name set="dc">creator</name></map>
127       <map>
128         <attr type="1" set="bib1">dc:creator</attr>
129       </map>
130     </index>
131     <index search="true" scan="true" sort="false">
132       <title lang="en">DC Subject</title>
133       <map><name set="dc">subject</name></map>
134       <map>
135         <attr type="1" set="bib1">dc:subject</attr>
136       </map>
137     </index>
138     <index search="true" scan="true" sort="false">
139       <title lang="en">DC Description</title>
140       <map><name set="dc">description</name></map>
141       <map>
142         <attr type="1" set="bib1">dc:description</attr>
143         <!-- <attr type="2" set="bib1">102</attr> -->
144       </map>
145     </index>
146     <index search="true" scan="true" sort="false">
147       <title lang="en">DC Publisher</title>
148       <map><name set="dc">publisher</name></map>
149       <map>
150         <attr type="1" set="bib1">dc:publisher</attr>
151       </map>
152     </index>
153     <index search="true" scan="true" sort="false">
154       <title lang="en">DC Contributor</title>
155       <map><name set="dc">contributor</name></map>
156       <map>
157         <attr type="1" set="bib1">dc:contributor</attr>
158       </map>
159     </index>
160     <index search="true" scan="true" sort="false">
161       <title lang="en">DC Date</title>
162       <map><name set="dc">date</name></map>
163       <map>
164         <attr type="1" set="bib1">dc:date</attr>
165       </map>
166     </index>
167     <index search="true" scan="true" sort="false">
168       <title lang="en">DC Type</title>
169       <map><name set="dc">type</name></map>
170       <map>
171         <attr type="1" set="bib1">dc:type</attr>
172       </map>
173     </index>
174     <index search="true" scan="true" sort="false">
175       <title lang="en">DC Format</title>
176       <map><name set="dc">format</name></map>
177       <map>
178         <attr type="1" set="bib1"></attr>
179       </map>
180     </index>
181     <index search="true" scan="true" sort="false">
182       <title lang="en">DC Identifier</title>
183       <map><name set="dc">identifier</name></map>
184       <map>
185         <attr type="1" set="bib1">dc:identifier</attr>
186       </map>
187     </index>
188     <index search="true" scan="true" sort="false">
189       <title lang="en">DC Source</title>
190       <map><name set="dc">source</name></map>
191       <map>
192         <attr type="1" set="bib1">dc:source</attr>
193       </map>
194     </index>
195     <index search="true" scan="true" sort="false">
196       <title lang="en">DC Language</title>
197       <map><name set="dc">language</name></map>
198       <map>
199         <attr type="1" set="bib1">dc:language</attr>
200       </map>
201     </index>
202     <index search="true" scan="true" sort="false">
203       <title lang="en">DC Relation</title>
204       <map><name set="dc">relation</name></map>
205       <map>
206         <attr type="1" set="bib1">dc:relation</attr>
207       </map>
208     </index>
209     <index search="true" scan="true" sort="false">
210       <title lang="en">DC Coverage</title>
211       <map><name set="dc">coverage</name></map>
212       <map>
213         <attr type="1" set="bib1">dc:coverage</attr>
214       </map>
215     </index>
216     <index search="true" scan="true" sort="false">
217       <title lang="en">DC Rights</title>
218       <map><name set="dc">rights</name></map>
219       <map>
220         <attr type="1" set="bib1">dc:rights</attr>
221       </map>
222     </index>
223
224   </indexInfo>
225
226   <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
227        <schemaInfo>, sic ..
228   <recordInfo>
229     <recordSyntax identifier="1.2.840.10003.5.109.10">
230       <elementSet name="F">
231         <title lang="en" primary="true">Full XML Record</title>
232       </elementSet>
233       <elementSet name="B">
234         <title lang="en" primary="true">Brief XML Record</title>
235       </elementSet>
236     </recordSyntax>
237   </recordInfo>
238   -->
239
240   <retrievalInfo xmlns="http://indexdata.com/yaz/2.28">
241     <retrieval syntax="grs-1"/>
242     <retrieval syntax="usmarc">
243        <elementset name="F"/>
244        <elementset name="B"/>
245     </retrieval>
246
247     <retrieval syntax="xml">
248       <elementset name="marcxml"
249                   identifier="info:srw/schema/1/marcxml-v1.1"
250                   localtion="">
251         <backend syntax="usmarc" name="F"/>
252         <convert>
253           <marc inputformat="marc" outputformat="marcxml"
254                 inputcharset="marc-8"/>
255         </convert>
256       </elementset>
257  
258       <elementset name="danmarc">
259         <backend syntax="usmarc" name="F"/>
260         <convert>
261           <marc inputformat="marc" outputformat="marcxchange"
262                 inputcharset="marc-8"/>
263         </convert>
264       </elementset>
265
266       <elementset name="dc"
267                   identifier="info:srw/schema/1/dc-v1.1"
268                   location="http://www.loc.gov/standards/sru/dc-schema.xsd">
269         <backend syntax="usmarc" name="F"/>
270         <convert>
271           <marc inputformat="marc" outputformat="marcxml"
272                 inputcharset="marc-8"/>
273           <xslt stylesheet="../etc/MARC21slim2DC.xsl"/>
274         </convert>
275       </elementset>
276     </retrieval>
277   </retrievalInfo>
278
279   <schemaInfo>
280
281     <izx:recordSyntax identifier="1.2.840.10003.5.10">
282       <title lang="en" primary="true">MARC21</title>
283       <elementSet name="B">
284         <title lang="en" primary="true">Brief Record</title>
285       </elementSet>
286       <elementSet name="F">
287         <title lang="en" primary="true">Full Record</title>
288       </elementSet>
289     </izx:recordSyntax>
290
291     <schema identifier="info:srw/schema/2/rec-1.0"
292             location="http://srw.cheshire3.org/schemas/rec/1.0/rec.xsd" 
293             name="rec"
294             retrieve="true">
295       <title lang="en">Record Metadata</title>
296       
297     </schema>
298     <schema identifier="info:srw/schema/1/dc-v1.1"
299             location="http://www.loc.gov/standards/sru/dc-schema.xsd" 
300             name="dc"
301             retrieve="true">
302       <title lang="en">Dublin Core</title>
303     </schema>
304     <schema identifier="info:srw/schema/1/mods-v3.0"
305             location="http://www.loc.gov/standards/mods/v3/mods-3-0.xsd"
306             name="mods"
307             retrieve="true">
308       <title lang="en">Mods</title>
309     </schema>
310     <schema identifier="info:srw/schema/1/marcxml-v1.1"
311             location="http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
312             name="marcxml"
313             retrieve="true">
314       <title lang="en">MarcXML</title>
315     </schema>
316   </schemaInfo>
317
318  
319   <configInfo>
320
321     <!-- searchRetrieve settings -->
322
323     <!-- default context set -->
324     <default type="contextSet">cql</default>
325
326     <default type="index">all</default>
327
328     <!-- default relation -->
329     <default type="relation">=</default>
330
331     <supports type="relation" 
332               izx:type="2" izx:set="bib1" izx:value="1">&lt;</supports>
333     <supports type="relation" 
334               izx:type="2" izx:set="bib1" izx:value="2">&lt;=</supports>
335     <supports type="relation"
336               izx:type="2" izx:set="bib1" izx:value="3">=</supports> 
337     <supports type="relation"
338               izx:type="2" izx:set="bib1" izx:value="4">&gt;=</supports>
339     <supports type="relation"
340               izx:type="2" izx:set="bib1" izx:value="5">&gt;</supports>
341
342
343     <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
344     <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
345     <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
346
347     <supports type="relationModifier"
348               izx:type="2" izx:set="bib1" izx:value="102">relevant</supports>
349
350     <!-- <supports type="relationModifier"
351               izx:type="2" izx:set="bib1" izx:value="100">phonetic</supports> -->
352     <!-- <supports type="relationModifier"
353               izx:type="2" izx:set="bib1" izx:value="101">stem</supports> -->
354
355
356     <!-- support proximity (Empty) -->
357     <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
358
359
360     <!-- proximity modifier supported by the server or index 
361          (relation, distance, unit, ordering) -->
362     <!-- <supports type="proximityModifier"></supports> -->
363
364     <!-- boolean modifier supported by the server or index -->
365     <!-- <supports type="booleanModifier"></supports> -->
366
367     <!-- masking character supported (* or ?) -->
368     <supports type="maskingCharacter">*</supports>
369     <supports type="maskingCharacter">?</supports>
370
371     <!-- anchoring supported? (^ character) -->
372     <!-- MARC: how do I express that I only support left anchoring in 
373          the beginning of the field ( bib1 3=1 ), but no right anchoring ?? -->
374     <!-- MIKE: You can't.  The ZeeRex documentation should be changed
375          to allow this, as <supports type="anchoring">left</supports> -->
376     <!-- <supports type="anchoring"></supports> -->
377
378     <!-- empty terms supported (Empty) -->
379     <!-- MARC: what's the use case of this ?? -->
380     <!-- MIKE: lots of uses!  For example, scanning from the very
381          start of the index with 'scan @attr 1=text ""'.  Or searching
382          for bibliographic records with no title, etc. -->
383     <!-- MARC: I see, and we can if we always use '""' 
384          (the empty string), as in 'scan @attr 1=text ""' -->
385     <supports type="emptyTerm"></supports>
386
387
388     <!-- sorting settings -->
389
390     <!-- default schema used in sorting, in short name form -->
391     <!-- <default type="sortSchema"></default> -->
392     <!-- MIKE: deprecated -->
393
394     <!-- server support sort -->
395     <!-- MARC: why stating this redundant info here?? it's already in the 
396          <index sort="true" attribute -->
397     <!-- MIKE: that's not quite the same thing.  This is saying
398          whether the server can do sorting at all.  Since
399          sort="true|false" attributes can be omitted entirely from
400          indexes, you can't deduce from a set of <index> elements
401          without sorting specified that the server doesn't support
402          sorting -->
403     <!-- MARC: which ought to be the same thing than saying that sorting is 
404          _not_ possible. In short,  one simple <index sort="true" attribute
405          should be enough to tell that sorting _is_ possible. Or we have the 
406          same discussion about overruling general sorting capabilities in 
407          specific indexes ?? Quite confusing ... -->
408     <!-- MIKE: no, within an <index>, saying sort="true" means that
409          you can sort on it, sort="false" means that you can't, and
410          not saying anything means you're not saying anything.  Three
411          different cases.   That's as it should be, since Explain
412          records might be auto-generated by systems that can't do the
413          necessary probes.  So a ZeeRex record might not have "sort"
414          attributes on any of its <index>es, but still say that
415          sorting is supported.  The client (or user) has to experiment
416          to find out what indexes support it.  Check the mailing list
417          archives if you want a rationale, I forget the details. -->
418     <!-- <supports type="sort"></supports> -->
419
420     <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
421     <!-- <supports type="sortModifier"></supports> -->
422     <!-- MIKE: this is for the new CQL "sortby" sorting, which Zebra
423          doesn't yet do at all, so you're right to omit this for now. -->
424
425     <!-- presentation settings --> 
426
427     <!-- default number of records that a server will return at once  -->
428     <default type="numberOfRecords">0</default>
429
430     <!-- default schema used for retrieved records -->
431     <default type="retrieveSchema">index</default>
432     <!-- MIKE: That's not what I get by default.  A URL such as
433 http://localhost:1314/Default?version=1.1&operation=searchRetrieve&query=1&maximumRecords=10
434          gives me a weird sort of hybrid record with <metadata>
435          sections and <z:index> elements.  Unfortunately, the SRU
436          response doesn't see to explicitly state what schema is
437          used. -->
438      <!-- MARC: Right, the default seems to be the 'index' schema. I have to 
439           talk to Adam to get a better way to choose the default schema -->
440
441     <!-- default stylesheet URL, or if stylesheets are supported -->
442     <!-- MARC: here I want to express: no default, but you kan use this 
443          and only this one - should I use 'setting' ?? -->
444     <!-- MIKE: There is no way to say this at present, but what you
445          suggest is sensible.  Please suggest it to the list -->
446     <setting type="stylesheet">docpath/sru.xsl</setting>
447
448     <!-- default record packing returned (string or xml) -->
449     <default type="recordPacking">xml</default>
450
451     <!-- maximum number of records that a server will return at once -->
452     <!-- <setting type="maximumRecords">1000</setting> -->
453
454     <!-- support result sets (Empty) -->
455     <!-- MARC: this one is for result sets in Z39.50, right ?? -->
456     <!-- MIKE: No, this also applies for SRU -->
457     <!-- MARC: Rrrrriiiight! That's why the section about this is called
458          <schemaInfo>, and the word resultSet never appears in a SRU Explain.
459          Very intuitive! -->
460     <!-- MIKE: I don't understand what point you're making.  SRU, like
461          Z39.50, has specifications for how to do result sets.  But I
462          don't know whether Zebra supports them or not -->
463     <!-- MARC: open question, then, I'll better comment out -->
464     <!-- <supports type="resultSets"></supports>  --> 
465
466     <!-- XPath retrieval supported -->
467     <!-- <supports type="recordXPath"></supports> -->
468
469
470     <!-- scan settings -->
471
472     <!-- scan operation supported -->
473     <supports type="scan"></supports>
474
475     <!-- default number of terms to be returned in scan -->
476     <default type="numberOfTerms">20</default>
477
478
479
480     <!-- other server settings -->
481
482     <!-- older version of the protocol supported  -->
483     <!-- MARC: why only older versions of the protocol ?? It seems 
484          natural just to list what you understand, including the one the
485          client sucesfully used --> 
486     <!-- MIKE: it may seem natural, but it ain't what it means! -->
487     <!-- MARC: but makes sense, and makes determining the list of protocol 
488          versions easier in a thin client -->
489     <!-- MIKE: if you want to change the meaning of this, then propose
490          it on-list.  I doubt you'll get much support.  Thin clients
491          won't use this anyway, they will just speak one version and
492          hope for the best -->
493     <!-- <supports type="version">1.1</supports> -->
494
495     <!-- number of seconds that a result set will be maintained for -->
496     <setting type="resultSetTTL">0</setting>
497
498     <!-- A type of extraRequestData available in the
499          searchRetrieveRequest. The extra*Data fields are represented as two
500          space separated words, the first the identifier for the extension and
501          the second the individual element name from the extension. If there is
502          only one word, then it is the extension id and all elements from
503          within are supported. -->
504     <!-- <supports type="extraSearchData"></supports> -->
505     <!-- MIKE: we could explain x-pquery here -->
506     <!-- MARC: I talked to Adam about this. We should make a new 'x-type'
507          with possible values PQF, CQL, CCL , .. such that 'query' still is
508          obligatory, and carries the query string, be it PQF, CCL, or CQL. -->
509     <!-- MIKE: Yes, that would be _much_ better -->
510
511     <!-- A type of extraRequestData available in the explainRequest -->
512     <!-- <supports type="extraExplainData"></supports> -->
513
514     <!-- A type of extraRequestData available in the scanRequest -->
515     <!-- <supports type="extraScanData"></supports> -->
516     <!-- MIKE: we could explain x-pscan here -->
517     <!-- MARC: re-use of 'x-type' here .. drop 'x-pscan' -->
518
519     <!-- The URI identifier of a supported profile -->
520     <!-- MARC: what's this ?? -->
521     <!-- <supports type="profile"></supports> -->
522     <!-- MIKE: this is a very good thing, which we should use when the
523          time is right.  A "profile" is a complete set of
524          specifications for using Z39.50 and/or SRU within a
525          particular application domain.  We should write a (brief)
526          "Alvis Profile for SRU", assign it an opaque identifier URI,
527          and point to it here.  (Not today, though!) -->
528     <!-- MARC: so this is some HTML prosa text ?? -->
529     <!-- MIKE: see for example
530         http://zthes2.z3950.org/srw/zthes-srw-1.0.html
531         -->
532   </configInfo>
533    
534 </explain>