session_shared: resultset optimizesearch flag.
[metaproxy-moved-to-github.git] / xml / schema / metaproxy.rng
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Metaproxy XML config file schemas
4   
5     Copyright (c) 2005-2008 Index Data.
6   
7     See the LICENSE file for details
8   
9   
10   The RelaxNG Compact Syntax file 'metaproxy.rnc' is the master copy.
11   
12   The RelaxNG XML Syntax and XML Schema are generated using 'trang':
13   trang metaproxy.rnc metaproxy.rng 
14   trang metaproxy.rnc metaproxy.xsd 
15   
16   Config file validation is done using 'xmllint':
17   xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml 
18   xmllint -/-schema metaproxy.xsd config-bytarget.xml
19   
20   For information on RelaxNG see http://relaxng.org 
21   see also http://books.xmlschemata.org/relaxng/
22 -->
23 <grammar xmlns:mp="http://indexdata.com/metaproxy" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
24   <start combine="choice">
25     <ref name="metaproxy"/>
26   </start>
27   <include href="retrievalinfo.rng"/>
28   <define name="any">
29     <zeroOrMore>
30       <choice>
31         <text/>
32         <element>
33           <anyName/>
34           <zeroOrMore>
35             <attribute>
36               <anyName/>
37             </attribute>
38           </zeroOrMore>
39           <ref name="any"/>
40         </element>
41       </choice>
42     </zeroOrMore>
43   </define>
44   <define name="metaproxy">
45     <element name="mp:metaproxy">
46       <attribute name="version">
47         <value>1.0</value>
48       </attribute>
49       <optional>
50         <element name="mp:dlpath">
51           <data type="string"/>
52         </element>
53       </optional>
54       <element name="mp:start">
55         <attribute name="route">
56           <data type="NCName"/>
57         </attribute>
58       </element>
59       <optional>
60         <element name="mp:filters">
61           <oneOrMore>
62             <ref name="filter"/>
63           </oneOrMore>
64         </element>
65       </optional>
66       <element name="mp:routes">
67         <oneOrMore>
68           <ref name="route"/>
69         </oneOrMore>
70       </element>
71     </element>
72   </define>
73   <define name="route">
74     <element name="mp:route">
75       <attribute name="id">
76         <data type="NCName"/>
77       </attribute>
78       <oneOrMore>
79         <ref name="filter"/>
80       </oneOrMore>
81     </element>
82   </define>
83   <define name="filter">
84     <element name="mp:filter">
85       <choice>
86         <ref name="filter_refid"/>
87         <ref name="filter_auth_simple"/>
88         <ref name="filter_backend_test"/>
89         <ref name="filter_bounce"/>
90         <ref name="filter_cgi"/>
91         <ref name="filter_cql_rpn"/>
92         <ref name="filter_frontend_net"/>
93         <ref name="filter_http_file"/>
94         <ref name="filter_limit"/>
95         <ref name="filter_load_balance"/>
96         <ref name="filter_log"/>
97         <ref name="filter_multi"/>
98         <ref name="filter_query_rewrite"/>
99         <ref name="filter_record_transform"/>
100         <ref name="filter_session_shared"/>
101         <ref name="filter_sru_z3950"/>
102         <ref name="filter_virt_db"/>
103         <ref name="filter_z3950_client"/>
104       </choice>
105       <!--    | filter_zeerex_explain -->
106     </element>
107   </define>
108   <define name="filter_refid">
109     <attribute name="refid">
110       <data type="NCName"/>
111     </attribute>
112   </define>
113   <define name="filter_auth_simple">
114     <attribute name="type">
115       <value>auth_simple</value>
116     </attribute>
117     <optional>
118       <attribute name="id">
119         <data type="NCName"/>
120       </attribute>
121     </optional>
122     <optional>
123       <attribute name="name">
124         <data type="NCName"/>
125       </attribute>
126     </optional>
127     <optional>
128       <element name="mp:userRegister">
129         <data type="string"/>
130       </element>
131     </optional>
132     <optional>
133       <element name="mp:targetRegister">
134         <data type="string"/>
135       </element>
136     </optional>
137     <optional>
138       <element name="mp:discardUnauthorisedTargets">
139         <empty/>
140       </element>
141     </optional>
142   </define>
143   <define name="filter_backend_test">
144     <attribute name="type">
145       <value>backend_test</value>
146     </attribute>
147     <optional>
148       <attribute name="id">
149         <data type="NCName"/>
150       </attribute>
151     </optional>
152     <optional>
153       <attribute name="name">
154         <data type="NCName"/>
155       </attribute>
156     </optional>
157   </define>
158   <define name="filter_bounce">
159     <attribute name="type">
160       <value>bounce</value>
161     </attribute>
162     <optional>
163       <attribute name="id">
164         <data type="NCName"/>
165       </attribute>
166     </optional>
167     <optional>
168       <attribute name="name">
169         <data type="NCName"/>
170       </attribute>
171     </optional>
172   </define>
173   <define name="filter_cql_rpn">
174     <attribute name="type">
175       <value>cql_rpn</value>
176     </attribute>
177     <optional>
178       <attribute name="id">
179         <data type="NCName"/>
180       </attribute>
181     </optional>
182     <optional>
183       <attribute name="name">
184         <data type="NCName"/>
185       </attribute>
186     </optional>
187     <element name="mp:conversion">
188       <attribute name="file">
189         <data type="string"/>
190       </attribute>
191     </element>
192   </define>
193   <define name="filter_frontend_net">
194     <attribute name="type">
195       <value>frontend_net</value>
196     </attribute>
197     <optional>
198       <attribute name="id">
199         <data type="NCName"/>
200       </attribute>
201     </optional>
202     <optional>
203       <attribute name="name">
204         <data type="NCName"/>
205       </attribute>
206     </optional>
207     <optional>
208       <element name="mp:threads">
209         <data type="integer"/>
210       </element>
211     </optional>
212     <oneOrMore>
213       <element name="mp:port">
214         <data type="string"/>
215       </element>
216     </oneOrMore>
217     <optional>
218       <element name="mp:timeout">
219         <data type="integer"/>
220       </element>
221     </optional>
222     <optional>
223       <element name="mp:connect-max">
224         <data type="integer"/>
225       </element>
226     </optional>
227   </define>
228   <define name="filter_http_file">
229     <attribute name="type">
230       <value>http_file</value>
231     </attribute>
232     <optional>
233       <attribute name="id">
234         <data type="NCName"/>
235       </attribute>
236     </optional>
237     <optional>
238       <attribute name="name">
239         <data type="NCName"/>
240       </attribute>
241     </optional>
242     <element name="mp:mimetypes">
243       <data type="string"/>
244     </element>
245     <element name="mp:area">
246       <element name="mp:documentroot">
247         <data type="string"/>
248       </element>
249       <element name="mp:prefix">
250         <data type="string"/>
251       </element>
252     </element>
253   </define>
254   <define name="filter_load_balance">
255     <attribute name="type">
256       <value>load_balance</value>
257     </attribute>
258     <optional>
259       <attribute name="id">
260         <data type="NCName"/>
261       </attribute>
262     </optional>
263     <optional>
264       <attribute name="name">
265         <data type="NCName"/>
266       </attribute>
267     </optional>
268   </define>
269   <define name="filter_log">
270     <attribute name="type">
271       <value>log</value>
272     </attribute>
273     <optional>
274       <attribute name="id">
275         <data type="NCName"/>
276       </attribute>
277     </optional>
278     <optional>
279       <attribute name="name">
280         <data type="NCName"/>
281       </attribute>
282     </optional>
283     <optional>
284       <element name="mp:message">
285         <data type="string"/>
286       </element>
287     </optional>
288     <optional>
289       <element name="mp:time-format">
290         <data type="string"/>
291       </element>
292     </optional>
293     <optional>
294       <element name="mp:filename">
295         <data type="string"/>
296       </element>
297     </optional>
298     <optional>
299       <element name="mp:category">
300         <optional>
301           <attribute name="user-access">
302             <data type="boolean"/>
303           </attribute>
304         </optional>
305         <optional>
306           <attribute name="access">
307             <data type="boolean"/>
308           </attribute>
309         </optional>
310         <optional>
311           <attribute name="init-options">
312             <data type="boolean"/>
313           </attribute>
314         </optional>
315         <optional>
316           <attribute name="request-session">
317             <data type="boolean"/>
318           </attribute>
319         </optional>
320         <optional>
321           <attribute name="response-session">
322             <data type="boolean"/>
323           </attribute>
324         </optional>
325         <optional>
326           <attribute name="apdu">
327             <data type="boolean"/>
328           </attribute>
329         </optional>
330         <optional>
331           <attribute name="request-apdu">
332             <data type="boolean"/>
333           </attribute>
334         </optional>
335         <optional>
336           <attribute name="response-apdu">
337             <data type="boolean"/>
338           </attribute>
339         </optional>
340       </element>
341     </optional>
342   </define>
343   <define name="filter_multi">
344     <attribute name="type">
345       <value>multi</value>
346     </attribute>
347     <optional>
348       <attribute name="id">
349         <data type="NCName"/>
350       </attribute>
351     </optional>
352     <optional>
353       <attribute name="name">
354         <data type="NCName"/>
355       </attribute>
356     </optional>
357     <zeroOrMore>
358       <element name="mp:target">
359         <attribute name="route">
360           <data type="string"/>
361         </attribute>
362         <data type="string"/>
363       </element>
364     </zeroOrMore>
365     <optional>
366       <element name="mp:hideunavailable">
367         <empty/>
368       </element>
369     </optional>
370     <optional>
371       <element name="mp:mergetype">
372         <data type="string"/>
373       </element>
374     </optional>
375   </define>
376   <define name="filter_query_rewrite">
377     <attribute name="type">
378       <value>query_rewrite</value>
379     </attribute>
380     <optional>
381       <attribute name="id">
382         <data type="NCName"/>
383       </attribute>
384     </optional>
385     <optional>
386       <attribute name="name">
387         <data type="NCName"/>
388       </attribute>
389     </optional>
390     <element name="mp:xslt">
391       <attribute name="stylesheet">
392         <data type="string"/>
393       </attribute>
394     </element>
395   </define>
396   <define name="filter_record_transform">
397     <attribute name="type">
398       <value>record_transform</value>
399     </attribute>
400     <optional>
401       <attribute name="id">
402         <data type="NCName"/>
403       </attribute>
404     </optional>
405     <optional>
406       <attribute name="name">
407         <data type="NCName"/>
408       </attribute>
409     </optional>
410     <ref name="retrievalinfo"/>
411   </define>
412   <define name="filter_session_shared">
413     <attribute name="type">
414       <value>session_shared</value>
415     </attribute>
416     <optional>
417       <attribute name="id">
418         <data type="NCName"/>
419       </attribute>
420     </optional>
421     <optional>
422       <attribute name="name">
423         <data type="NCName"/>
424       </attribute>
425     </optional>
426     <optional>
427       <element name="mp:resultset">
428         <attribute name="max">
429           <data type="integer"/>
430         </attribute>
431         <attribute name="ttl">
432           <data type="integer"/>
433         </attribute>
434         <attribute name="optimizesearch">
435           <data type="boolean"/>
436         </attribute>
437       </element>
438     </optional>
439     <optional>
440       <element name="mp:session">
441         <attribute name="ttl">
442           <data type="integer"/>
443         </attribute>
444       </element>
445     </optional>
446   </define>
447   <define name="filter_sru_z3950">
448     <attribute name="type">
449       <value>sru_z3950</value>
450     </attribute>
451     <optional>
452       <attribute name="id">
453         <data type="NCName"/>
454       </attribute>
455     </optional>
456     <optional>
457       <attribute name="name">
458         <data type="NCName"/>
459       </attribute>
460     </optional>
461     <zeroOrMore>
462       <element name="mp:database">
463         <attribute name="name">
464           <data type="NCName"/>
465         </attribute>
466         <ref name="any"/>
467       </element>
468     </zeroOrMore>
469   </define>
470   <define name="filter_virt_db">
471     <attribute name="type">
472       <value>virt_db</value>
473     </attribute>
474     <optional>
475       <attribute name="id">
476         <data type="NCName"/>
477       </attribute>
478     </optional>
479     <optional>
480       <attribute name="name">
481         <data type="NCName"/>
482       </attribute>
483     </optional>
484     <optional>
485       <element name="mp:pass-vhosts">
486         <data type="boolean"/>
487       </element>
488     </optional>
489     <oneOrMore>
490       <element name="mp:virtual">
491         <optional>
492           <attribute name="route">
493             <data type="NCName"/>
494           </attribute>
495         </optional>
496         <element name="mp:database">
497           <data type="string"/>
498         </element>
499         <oneOrMore>
500           <element name="mp:target">
501             <data type="string"/>
502           </element>
503         </oneOrMore>
504       </element>
505     </oneOrMore>
506   </define>
507   <define name="filter_z3950_client">
508     <attribute name="type">
509       <value>z3950_client</value>
510     </attribute>
511     <optional>
512       <attribute name="id">
513         <data type="NCName"/>
514       </attribute>
515     </optional>
516     <optional>
517       <attribute name="name">
518         <data type="NCName"/>
519       </attribute>
520     </optional>
521     <optional>
522       <element name="mp:timeout">
523         <data type="integer"/>
524       </element>
525     </optional>
526     <optional>
527       <element name="mp:default_target">
528         <data type="string"/>
529       </element>
530     </optional>
531     <optional>
532       <element name="mp:force_target">
533         <data type="string"/>
534       </element>
535     </optional>
536   </define>
537   <define name="filter_limit">
538     <attribute name="type">
539       <value>limit</value>
540     </attribute>
541     <optional>
542       <element name="mp:limit">
543         <optional>
544           <attribute name="bandwidth">
545             <data type="integer"/>
546           </attribute>
547         </optional>
548         <optional>
549           <attribute name="pdu">
550             <data type="integer"/>
551           </attribute>
552         </optional>
553         <optional>
554           <attribute name="search">
555             <data type="integer"/>
556           </attribute>
557         </optional>
558         <optional>
559           <attribute name="retrieve">
560             <data type="integer"/>
561           </attribute>
562         </optional>
563       </element>
564     </optional>
565   </define>
566   <define name="filter_cgi">
567     <attribute name="type">
568       <value>cgi</value>
569     </attribute>
570     <zeroOrMore>
571       <element name="mp:map">
572         <attribute name="path">
573           <data type="string"/>
574         </attribute>
575         <attribute name="exec">
576           <data type="string"/>
577         </attribute>
578       </element>
579     </zeroOrMore>
580   </define>
581 </grammar>
582 <!--
583   filter_zeerex_explain =
584    attribute type { "zeerex_explain" },
585    attribute id { xsd:NCName }?,
586    attribute name { xsd:NCName }?,
587    element mp:database {  
588       attribute name { xsd:NCName },
589       any        
590    }+
591 -->