z3950_client filter: force_apdu facility
[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="session">
327             <data type="boolean"/>
328           </attribute>
329         </optional>
330         <optional>
331           <attribute name="apdu">
332             <data type="boolean"/>
333           </attribute>
334         </optional>
335         <optional>
336           <attribute name="request-apdu">
337             <data type="boolean"/>
338           </attribute>
339         </optional>
340         <optional>
341           <attribute name="response-apdu">
342             <data type="boolean"/>
343           </attribute>
344         </optional>
345       </element>
346     </optional>
347   </define>
348   <define name="filter_multi">
349     <attribute name="type">
350       <value>multi</value>
351     </attribute>
352     <optional>
353       <attribute name="id">
354         <data type="NCName"/>
355       </attribute>
356     </optional>
357     <optional>
358       <attribute name="name">
359         <data type="NCName"/>
360       </attribute>
361     </optional>
362     <zeroOrMore>
363       <element name="mp:target">
364         <attribute name="route">
365           <data type="string"/>
366         </attribute>
367         <data type="string"/>
368       </element>
369     </zeroOrMore>
370     <optional>
371       <element name="mp:hideunavailable">
372         <empty/>
373       </element>
374     </optional>
375     <optional>
376       <element name="mp:mergetype">
377         <data type="string"/>
378       </element>
379     </optional>
380   </define>
381   <define name="filter_query_rewrite">
382     <attribute name="type">
383       <value>query_rewrite</value>
384     </attribute>
385     <optional>
386       <attribute name="id">
387         <data type="NCName"/>
388       </attribute>
389     </optional>
390     <optional>
391       <attribute name="name">
392         <data type="NCName"/>
393       </attribute>
394     </optional>
395     <element name="mp:xslt">
396       <attribute name="stylesheet">
397         <data type="string"/>
398       </attribute>
399     </element>
400   </define>
401   <define name="filter_record_transform">
402     <attribute name="type">
403       <value>record_transform</value>
404     </attribute>
405     <optional>
406       <attribute name="id">
407         <data type="NCName"/>
408       </attribute>
409     </optional>
410     <optional>
411       <attribute name="name">
412         <data type="NCName"/>
413       </attribute>
414     </optional>
415     <ref name="retrievalinfo"/>
416   </define>
417   <define name="filter_session_shared">
418     <attribute name="type">
419       <value>session_shared</value>
420     </attribute>
421     <optional>
422       <attribute name="id">
423         <data type="NCName"/>
424       </attribute>
425     </optional>
426     <optional>
427       <attribute name="name">
428         <data type="NCName"/>
429       </attribute>
430     </optional>
431     <optional>
432       <element name="mp:resultset">
433         <attribute name="max">
434           <data type="integer"/>
435         </attribute>
436         <attribute name="ttl">
437           <data type="integer"/>
438         </attribute>
439         <attribute name="optimizesearch">
440           <data type="boolean"/>
441         </attribute>
442       </element>
443     </optional>
444     <optional>
445       <element name="mp:session">
446         <attribute name="ttl">
447           <data type="integer"/>
448         </attribute>
449       </element>
450     </optional>
451   </define>
452   <define name="filter_sru_z3950">
453     <attribute name="type">
454       <value>sru_z3950</value>
455     </attribute>
456     <optional>
457       <attribute name="id">
458         <data type="NCName"/>
459       </attribute>
460     </optional>
461     <optional>
462       <attribute name="name">
463         <data type="NCName"/>
464       </attribute>
465     </optional>
466     <zeroOrMore>
467       <element name="mp:database">
468         <attribute name="name">
469           <data type="NCName"/>
470         </attribute>
471         <ref name="any"/>
472       </element>
473     </zeroOrMore>
474   </define>
475   <define name="filter_virt_db">
476     <attribute name="type">
477       <value>virt_db</value>
478     </attribute>
479     <optional>
480       <attribute name="id">
481         <data type="NCName"/>
482       </attribute>
483     </optional>
484     <optional>
485       <attribute name="name">
486         <data type="NCName"/>
487       </attribute>
488     </optional>
489     <optional>
490       <element name="mp:pass-vhosts">
491         <data type="boolean"/>
492       </element>
493     </optional>
494     <oneOrMore>
495       <element name="mp:virtual">
496         <optional>
497           <attribute name="route">
498             <data type="NCName"/>
499           </attribute>
500         </optional>
501         <element name="mp:database">
502           <data type="string"/>
503         </element>
504         <oneOrMore>
505           <element name="mp:target">
506             <data type="string"/>
507           </element>
508         </oneOrMore>
509       </element>
510     </oneOrMore>
511   </define>
512   <define name="filter_z3950_client">
513     <attribute name="type">
514       <value>z3950_client</value>
515     </attribute>
516     <optional>
517       <attribute name="id">
518         <data type="NCName"/>
519       </attribute>
520     </optional>
521     <optional>
522       <attribute name="name">
523         <data type="NCName"/>
524       </attribute>
525     </optional>
526     <optional>
527       <element name="mp:timeout">
528         <data type="integer"/>
529       </element>
530     </optional>
531     <optional>
532       <element name="mp:default_target">
533         <data type="string"/>
534       </element>
535     </optional>
536     <optional>
537       <element name="mp:force_target">
538         <data type="string"/>
539       </element>
540     </optional>
541     <optional>
542       <element name="mp:force_close">
543         <data type="boolean"/>
544       </element>
545     </optional>
546   </define>
547   <define name="filter_limit">
548     <attribute name="type">
549       <value>limit</value>
550     </attribute>
551     <optional>
552       <element name="mp:limit">
553         <optional>
554           <attribute name="bandwidth">
555             <data type="integer"/>
556           </attribute>
557         </optional>
558         <optional>
559           <attribute name="pdu">
560             <data type="integer"/>
561           </attribute>
562         </optional>
563         <optional>
564           <attribute name="search">
565             <data type="integer"/>
566           </attribute>
567         </optional>
568         <optional>
569           <attribute name="retrieve">
570             <data type="integer"/>
571           </attribute>
572         </optional>
573       </element>
574     </optional>
575   </define>
576   <define name="filter_cgi">
577     <attribute name="type">
578       <value>cgi</value>
579     </attribute>
580     <zeroOrMore>
581       <element name="mp:map">
582         <attribute name="path">
583           <data type="string"/>
584         </attribute>
585         <attribute name="exec">
586           <data type="string"/>
587         </attribute>
588       </element>
589     </zeroOrMore>
590   </define>
591 </grammar>
592 <!--
593   filter_zeerex_explain =
594    attribute type { "zeerex_explain" },
595    attribute id { xsd:NCName }?,
596    attribute name { xsd:NCName }?,
597    element mp:database {  
598       attribute name { xsd:NCName },
599       any        
600    }+
601 -->