added recordinfo, as internal record conversion format for Metaproxy and Yaz frontends
[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.2 2006-09-07 11:48:08 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 
241       xmlns="http://indexdata.com/yaz"
242       version="1.0">
243     <retrieval 
244         syntax="grs-1"
245         identifier="1.2.840.10003.5.105"
246         location="http://www.loc.gov/z3950/agency/asn1.html#RecordSyntax-generic"/>
247     <retrieval 
248         syntax="marc21" 
249         identifier="1.2.840.10003.5.10"
250         location="http://www.loc.gov/marc/">
251       <title lang="en">Marc21</title>
252       <elementset name="F">
253         <title lang="en" primary="true">Full Marc21 Record</title>
254         <backend syntax="usmarc" name="F"/>
255       </elementset>
256       <elementset name="B">
257         <title lang="en" primary="true">Brief Marc21 Record</title>
258         <backend syntax="usmarc" name="B"/>
259       </elementset>
260     </retrieval>
261
262     <retrieval 
263         syntax="xml" 
264         identifier="1.2.840.10003.5.109.10"
265         location="http://www.w3.org/XML/">
266         <!-- location="http://www.w3.org/TR/2006/REC-xml-20060816/"  -->
267       <title lang="en">XML</title>
268       <elementset
269           identifier="info:srw/schema/1/marcxml-v1.1"
270           location="http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
271           name="marcxml">
272         <title lang="en">MarcXML</title>
273         <backend syntax="usmarc" name="F"/>
274         <convert>
275           <marc inputformat="marc" outputformat="marcxml"
276                 inputcharset="marc-8"/>
277         </convert>
278       </elementset>
279       
280       <elementset 
281           name="marcxchange">
282         <title lang="en">Marc XChange</title>
283         <backend syntax="usmarc" name="F"/>
284         <convert>
285           <marc inputformat="marc" outputformat="marcxchange"
286                 inputcharset="marc-8"/>
287         </convert>
288       </elementset>
289       
290       <elementset 
291           identifier="info:srw/schema/1/dc-v1.1"
292           location="http://www.loc.gov/standards/sru/dc-schema.xsd"
293           name="dc">
294         <title lang="en">Dublin Core</title>
295         <backend syntax="usmarc" name="F"/>
296         <convert>
297           <marc inputformat="marc" outputformat="marcxml"
298                 inputcharset="marc-8"/>
299           <xslt stylesheet="../etc/MARC21slim2DC.xsl"/>
300         </convert>
301       </elementset>
302     </retrieval>
303   </retrievalInfo>
304
305 <!--
306   <schemaInfo>
307     <schema identifier="info:srw/schema/2/rec-1.0"
308             location="http://srw.cheshire3.org/schemas/rec/1.0/rec.xsd" 
309             name="rec"
310             retrieve="true">
311       <title lang="en">Record Metadata</title>
312       
313     </schema>
314     <schema identifier="info:srw/schema/1/dc-v1.1"
315             location="http://www.loc.gov/standards/sru/dc-schema.xsd" 
316             name="dc"
317             retrieve="true">
318       <title lang="en">Dublin Core</title>
319     </schema>
320     <schema identifier="info:srw/schema/1/mods-v3.0"
321             location="http://www.loc.gov/standards/mods/v3/mods-3-0.xsd"
322             name="mods"
323             retrieve="true">
324       <title lang="en">Mods</title>
325     </schema>
326     <schema identifier="info:srw/schema/1/marcxml-v1.1"
327             location="http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
328             name="marcxml"
329             retrieve="true">
330       <title lang="en">MarcXML</title>
331     </schema>
332   </schemaInfo>
333 -->
334  
335   <configInfo>
336
337     <!-- searchRetrieve settings -->
338
339     <!-- default context set -->
340     <default type="contextSet">cql</default>
341
342     <default type="index">all</default>
343
344     <!-- default relation -->
345     <default type="relation">=</default>
346
347     <supports type="relation" 
348               izx:type="2" izx:set="bib1" izx:value="1">&lt;</supports>
349     <supports type="relation" 
350               izx:type="2" izx:set="bib1" izx:value="2">&lt;=</supports>
351     <supports type="relation"
352               izx:type="2" izx:set="bib1" izx:value="3">=</supports> 
353     <supports type="relation"
354               izx:type="2" izx:set="bib1" izx:value="4">&gt;=</supports>
355     <supports type="relation"
356               izx:type="2" izx:set="bib1" izx:value="5">&gt;</supports>
357
358
359     <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
360     <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
361     <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
362
363     <supports type="relationModifier"
364               izx:type="2" izx:set="bib1" izx:value="102">relevant</supports>
365
366     <!-- <supports type="relationModifier"
367               izx:type="2" izx:set="bib1" izx:value="100">phonetic</supports> -->
368     <!-- <supports type="relationModifier"
369               izx:type="2" izx:set="bib1" izx:value="101">stem</supports> -->
370
371
372     <!-- support proximity (Empty) -->
373     <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
374
375
376     <!-- proximity modifier supported by the server or index 
377          (relation, distance, unit, ordering) -->
378     <!-- <supports type="proximityModifier"></supports> -->
379
380     <!-- boolean modifier supported by the server or index -->
381     <!-- <supports type="booleanModifier"></supports> -->
382
383     <!-- masking character supported (* or ?) -->
384     <supports type="maskingCharacter">*</supports>
385     <supports type="maskingCharacter">?</supports>
386
387     <!-- anchoring supported? (^ character) -->
388     <!-- MARC: how do I express that I only support left anchoring in 
389          the beginning of the field ( bib1 3=1 ), but no right anchoring ?? -->
390     <!-- MIKE: You can't.  The ZeeRex documentation should be changed
391          to allow this, as <supports type="anchoring">left</supports> -->
392     <!-- <supports type="anchoring"></supports> -->
393
394     <!-- empty terms supported (Empty) -->
395     <!-- MARC: what's the use case of this ?? -->
396     <!-- MIKE: lots of uses!  For example, scanning from the very
397          start of the index with 'scan @attr 1=text ""'.  Or searching
398          for bibliographic records with no title, etc. -->
399     <!-- MARC: I see, and we can if we always use '""' 
400          (the empty string), as in 'scan @attr 1=text ""' -->
401     <supports type="emptyTerm"></supports>
402
403
404     <!-- sorting settings -->
405
406     <!-- default schema used in sorting, in short name form -->
407     <!-- <default type="sortSchema"></default> -->
408     <!-- MIKE: deprecated -->
409
410     <!-- server support sort -->
411     <!-- MARC: why stating this redundant info here?? it's already in the 
412          <index sort="true" attribute -->
413     <!-- MIKE: that's not quite the same thing.  This is saying
414          whether the server can do sorting at all.  Since
415          sort="true|false" attributes can be omitted entirely from
416          indexes, you can't deduce from a set of <index> elements
417          without sorting specified that the server doesn't support
418          sorting -->
419     <!-- MARC: which ought to be the same thing than saying that sorting is 
420          _not_ possible. In short,  one simple <index sort="true" attribute
421          should be enough to tell that sorting _is_ possible. Or we have the 
422          same discussion about overruling general sorting capabilities in 
423          specific indexes ?? Quite confusing ... -->
424     <!-- MIKE: no, within an <index>, saying sort="true" means that
425          you can sort on it, sort="false" means that you can't, and
426          not saying anything means you're not saying anything.  Three
427          different cases.   That's as it should be, since Explain
428          records might be auto-generated by systems that can't do the
429          necessary probes.  So a ZeeRex record might not have "sort"
430          attributes on any of its <index>es, but still say that
431          sorting is supported.  The client (or user) has to experiment
432          to find out what indexes support it.  Check the mailing list
433          archives if you want a rationale, I forget the details. -->
434     <!-- <supports type="sort"></supports> -->
435
436     <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
437     <!-- <supports type="sortModifier"></supports> -->
438     <!-- MIKE: this is for the new CQL "sortby" sorting, which Zebra
439          doesn't yet do at all, so you're right to omit this for now. -->
440
441     <!-- presentation settings --> 
442
443     <!-- default number of records that a server will return at once  -->
444     <default type="numberOfRecords">0</default>
445
446     <!-- default schema used for retrieved records -->
447     <default type="retrieveSchema">index</default>
448     <!-- MIKE: That's not what I get by default.  A URL such as
449 http://localhost:1314/Default?version=1.1&operation=searchRetrieve&query=1&maximumRecords=10
450          gives me a weird sort of hybrid record with <metadata>
451          sections and <z:index> elements.  Unfortunately, the SRU
452          response doesn't see to explicitly state what schema is
453          used. -->
454      <!-- MARC: Right, the default seems to be the 'index' schema. I have to 
455           talk to Adam to get a better way to choose the default schema -->
456
457     <!-- default stylesheet URL, or if stylesheets are supported -->
458     <!-- MARC: here I want to express: no default, but you kan use this 
459          and only this one - should I use 'setting' ?? -->
460     <!-- MIKE: There is no way to say this at present, but what you
461          suggest is sensible.  Please suggest it to the list -->
462     <setting type="stylesheet">docpath/sru.xsl</setting>
463
464     <!-- default record packing returned (string or xml) -->
465     <default type="recordPacking">xml</default>
466
467     <!-- maximum number of records that a server will return at once -->
468     <!-- <setting type="maximumRecords">1000</setting> -->
469
470     <!-- support result sets (Empty) -->
471     <!-- MARC: this one is for result sets in Z39.50, right ?? -->
472     <!-- MIKE: No, this also applies for SRU -->
473     <!-- MARC: Rrrrriiiight! That's why the section about this is called
474          <schemaInfo>, and the word resultSet never appears in a SRU Explain.
475          Very intuitive! -->
476     <!-- MIKE: I don't understand what point you're making.  SRU, like
477          Z39.50, has specifications for how to do result sets.  But I
478          don't know whether Zebra supports them or not -->
479     <!-- MARC: open question, then, I'll better comment out -->
480     <!-- <supports type="resultSets"></supports>  --> 
481
482     <!-- XPath retrieval supported -->
483     <!-- <supports type="recordXPath"></supports> -->
484
485
486     <!-- scan settings -->
487
488     <!-- scan operation supported -->
489     <supports type="scan"></supports>
490
491     <!-- default number of terms to be returned in scan -->
492     <default type="numberOfTerms">20</default>
493
494
495
496     <!-- other server settings -->
497
498     <!-- older version of the protocol supported  -->
499     <!-- MARC: why only older versions of the protocol ?? It seems 
500          natural just to list what you understand, including the one the
501          client sucesfully used --> 
502     <!-- MIKE: it may seem natural, but it ain't what it means! -->
503     <!-- MARC: but makes sense, and makes determining the list of protocol 
504          versions easier in a thin client -->
505     <!-- MIKE: if you want to change the meaning of this, then propose
506          it on-list.  I doubt you'll get much support.  Thin clients
507          won't use this anyway, they will just speak one version and
508          hope for the best -->
509     <!-- <supports type="version">1.1</supports> -->
510
511     <!-- number of seconds that a result set will be maintained for -->
512     <setting type="resultSetTTL">0</setting>
513
514     <!-- A type of extraRequestData available in the
515          searchRetrieveRequest. The extra*Data fields are represented as two
516          space separated words, the first the identifier for the extension and
517          the second the individual element name from the extension. If there is
518          only one word, then it is the extension id and all elements from
519          within are supported. -->
520     <!-- <supports type="extraSearchData"></supports> -->
521     <!-- MIKE: we could explain x-pquery here -->
522     <!-- MARC: I talked to Adam about this. We should make a new 'x-type'
523          with possible values PQF, CQL, CCL , .. such that 'query' still is
524          obligatory, and carries the query string, be it PQF, CCL, or CQL. -->
525     <!-- MIKE: Yes, that would be _much_ better -->
526
527     <!-- A type of extraRequestData available in the explainRequest -->
528     <!-- <supports type="extraExplainData"></supports> -->
529
530     <!-- A type of extraRequestData available in the scanRequest -->
531     <!-- <supports type="extraScanData"></supports> -->
532     <!-- MIKE: we could explain x-pscan here -->
533     <!-- MARC: re-use of 'x-type' here .. drop 'x-pscan' -->
534
535     <!-- The URI identifier of a supported profile -->
536     <!-- MARC: what's this ?? -->
537     <!-- <supports type="profile"></supports> -->
538     <!-- MIKE: this is a very good thing, which we should use when the
539          time is right.  A "profile" is a complete set of
540          specifications for using Z39.50 and/or SRU within a
541          particular application domain.  We should write a (brief)
542          "Alvis Profile for SRU", assign it an opaque identifier URI,
543          and point to it here.  (Not today, though!) -->
544     <!-- MARC: so this is some HTML prosa text ?? -->
545     <!-- MIKE: see for example
546         http://zthes2.z3950.org/srw/zthes-srw-1.0.html
547         -->
548   </configInfo>
549    
550 </explain>