z3950_client filter: force_apdu facility
[metaproxy-moved-to-github.git] / xml / schema / metaproxy.rnc
1 # Metaproxy XML config file schemas
2
3 #   Copyright (c) 2005-2008 Index Data.
4
5 #   See the LICENSE file for details
6
7
8 # The RelaxNG Compact Syntax file 'metaproxy.rnc' is the master copy.
9
10 # The RelaxNG XML Syntax and XML Schema are generated using 'trang':
11 # trang metaproxy.rnc metaproxy.rng 
12 # trang metaproxy.rnc metaproxy.xsd 
13
14 # Config file validation is done using 'xmllint':
15 # xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml 
16 # xmllint -/-schema metaproxy.xsd config-bytarget.xml
17
18 # For information on RelaxNG see http://relaxng.org 
19 # see also http://books.xmlschemata.org/relaxng/
20
21
22 namespace mp = "http://indexdata.com/metaproxy"
23
24 start |= metaproxy
25
26 include "retrievalinfo.rnc"
27
28 any = (text | element * { attribute * { text }*, any })*
29
30 metaproxy =
31   element mp:metaproxy {
32     attribute version { "1.0" },
33     element mp:dlpath { xsd:string }?,
34     element mp:start {
35             attribute route { xsd:NCName }
36     },
37     element mp:filters { filter+ }?,
38     element mp:routes { route+ }
39   }
40
41 route =
42   element mp:route {
43     attribute id { xsd:NCName },
44     filter+
45   }
46
47 filter =
48   element mp:filter {
49     filter_refid
50     | filter_auth_simple
51     | filter_backend_test
52     | filter_bounce
53     | filter_cgi
54     | filter_cql_rpn
55     | filter_frontend_net
56     | filter_http_file
57     | filter_limit
58     | filter_load_balance
59     | filter_log
60     | filter_multi
61     | filter_query_rewrite
62     | filter_record_transform
63     | filter_session_shared
64     | filter_sru_z3950
65     | filter_virt_db
66     | filter_z3950_client
67 #    | filter_zeerex_explain
68   }
69
70 filter_refid = attribute refid { xsd:NCName }
71
72 filter_auth_simple =
73   attribute type { "auth_simple" },
74   attribute id { xsd:NCName }?,
75   attribute name { xsd:NCName }?,
76   element mp:userRegister { xsd:string }?,
77   element mp:targetRegister { xsd:string }?,
78   element mp:discardUnauthorisedTargets { empty }?
79
80 filter_backend_test =
81   attribute type { "backend_test" },
82   attribute id { xsd:NCName }?,
83   attribute name { xsd:NCName }?
84
85 filter_bounce =
86   attribute type { "bounce" },
87   attribute id { xsd:NCName }?,
88   attribute name { xsd:NCName }?
89
90 filter_cql_rpn =
91   attribute type { "cql_rpn" },
92   attribute id { xsd:NCName }?,
93   attribute name { xsd:NCName }?,
94   element mp:conversion {
95     attribute  file { xsd:string }
96   }
97
98 filter_frontend_net =
99   attribute type { "frontend_net" },
100   attribute id { xsd:NCName }?,
101   attribute name { xsd:NCName }?,
102   element mp:threads { xsd:integer }?,
103   element mp:port { xsd:string }+,
104   element mp:timeout { xsd:integer }?,
105   element mp:connect-max { xsd:integer }?
106
107 filter_http_file =
108   attribute type { "http_file" },
109   attribute id { xsd:NCName }?,
110   attribute name { xsd:NCName }?,
111   element mp:mimetypes { xsd:string },
112   element mp:area {
113     element mp:documentroot { xsd:string },
114     element mp:prefix { xsd:string }
115   }
116
117 filter_load_balance =
118   attribute type { "load_balance" },
119   attribute id { xsd:NCName }?,
120   attribute name { xsd:NCName }?
121
122 filter_log =
123   attribute type { "log" },
124   attribute id { xsd:NCName }?,
125   attribute name { xsd:NCName }?,
126   element mp:message { xsd:string }?,
127   element mp:time-format { xsd:string }?,
128   element mp:filename { xsd:string }?,
129   element mp:category {
130     attribute user-access { xsd:boolean }?,
131     attribute access { xsd:boolean }?,
132     attribute init-options { xsd:boolean }?,
133     attribute request-session { xsd:boolean }?,
134     attribute response-session { xsd:boolean }?,
135     attribute session { xsd:boolean }?,
136     attribute apdu { xsd:boolean }?,
137     attribute request-apdu { xsd:boolean }?,
138     attribute response-apdu { xsd:boolean }?
139   }?
140
141 filter_multi =
142   attribute type { "multi" },
143   attribute id { xsd:NCName }?,
144   attribute name { xsd:NCName }?,
145   element mp:target {
146     attribute route { xsd:string },
147     xsd:string
148   }*,
149   element mp:hideunavailable { empty }?,
150   element mp:mergetype { xsd:string }?
151
152 filter_query_rewrite =
153   attribute type { "query_rewrite" },
154   attribute id { xsd:NCName }?,
155   attribute name { xsd:NCName }?,
156   element mp:xslt { 
157         attribute stylesheet { xsd:string }
158   }
159
160 filter_record_transform =
161   attribute type { "record_transform" },
162   attribute id { xsd:NCName }?,
163   attribute name { xsd:NCName }?,
164   retrievalinfo 
165
166 filter_session_shared =
167   attribute type { "session_shared" },
168   attribute id { xsd:NCName }?,
169   attribute name { xsd:NCName }?,
170   element mp:resultset {
171     attribute max { xsd:integer },
172     attribute ttl { xsd:integer },
173     attribute optimizesearch { xsd:boolean }
174   }?,
175   element mp:session {
176     attribute ttl { xsd:integer }
177   }?
178
179 filter_sru_z3950 =
180   attribute type { "sru_z3950" },
181   attribute id { xsd:NCName }?,
182   attribute name { xsd:NCName }?,
183   element mp:database {  
184      attribute name { xsd:NCName },
185      any        
186   }*
187
188 filter_virt_db =
189   attribute type { "virt_db" },
190   attribute id { xsd:NCName }?,
191   attribute name { xsd:NCName }?,
192   element mp:pass-vhosts { xsd:boolean }?,
193   element mp:virtual {
194     attribute route { xsd:NCName }?,
195     element mp:database { xsd:string },
196     element mp:target { xsd:string }+
197   }+
198
199 filter_z3950_client =
200   attribute type { "z3950_client" },
201   attribute id { xsd:NCName }?,
202   attribute name { xsd:NCName }?,
203   element mp:timeout { xsd:integer }?,
204   element mp:default_target { xsd:string }?,
205   element mp:force_target { xsd:string }?,
206   element mp:force_close { xsd:boolean }?
207
208 filter_limit =
209   attribute type { "limit" },
210   element mp:limit {
211     attribute bandwidth { xsd:integer }?,
212     attribute pdu { xsd:integer }?,
213     attribute search { xsd:integer }?,
214     attribute retrieve { xsd:integer }?
215   }?
216
217 filter_cgi =
218   attribute type { "cgi" },
219   element mp:map {
220     attribute path { xsd:string },
221     attribute exec { xsd:string }
222   }*
223
224 #filter_zeerex_explain =
225 #  attribute type { "zeerex_explain" },
226 #  attribute id { xsd:NCName }?,
227 #  attribute name { xsd:NCName }?,
228 #  element mp:database {  
229 #     attribute name { xsd:NCName },
230 #     any        
231 #  }+
232
233