added first shot on load balance filter which removes all but one vhost from Z39...
[metaproxy-moved-to-github.git] / xml / schema / metaproxy.rnc
1 # Metaproxy XML config file schemas
2 #  $Id: metaproxy.rnc,v 1.13 2007-01-02 15:35:36 marc Exp $
3
4 #   Copyright (c) 2005-2006, Index Data.
5
6 #   See the LICENSE file for details
7
8
9 # The RelaxNG Compact Syntax file 'metaproxy.rnc' is the master copy.
10
11 # The RelaxNG XML Syntax and XML Schema are generated using 'trang':
12 # trang metaproxy.rnc metaproxy.rng 
13 # trang metaproxy.rnc metaproxy.xsd 
14
15 # Config file validation is done using 'xmllint':
16 # xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml 
17 # xmllint -/-schema metaproxy.xsd config-bytarget.xml
18
19 # For information on RelaxNG see http://relaxng.org 
20 # see also http://books.xmlschemata.org/relaxng/
21
22
23 namespace mp = "http://indexdata.com/metaproxy"
24
25 start |= metaproxy
26
27 include "retrievalinfo.rnc"
28
29 metaproxy =
30   element mp:metaproxy {
31     attribute version { "1.0" },
32     element mp:start {
33             attribute route { xsd:NCName }
34     },
35     element mp:filters { filter+ }?,
36     element mp:routes { route+ }
37   }
38
39 route =
40   element mp:route {
41     attribute id { xsd:NCName },
42     filter+
43   }
44
45 filter =
46   element mp:filter {
47     filter_refid
48     | filter_auth_simple
49     | filter_backend_test
50     | filter_bounce
51     | filter_frontend_net
52     | filter_http_file
53     | filter_load_balance
54     | filter_log
55     | filter_multi
56     | filter_query_rewrite
57     | filter_record_transform
58     | filter_session_shared
59     | filter_sru_z3950
60     | filter_virt_db
61     | filter_z3950_client
62     | filter_zeerex_explain
63   }
64
65 filter_refid = attribute refid { xsd:NCName }
66
67 filter_auth_simple =
68   attribute type { "auth_simple" },
69   attribute id { xsd:NCName }?,
70   attribute name { xsd:NCName }?,
71   element mp:userRegister { xsd:string }?,
72   element mp:targetRegister { xsd:string }?,
73   element mp:discardUnauthorisedTargets { empty }?
74
75 filter_backend_test =
76   attribute type { "backend_test" },
77   attribute id { xsd:NCName }?,
78   attribute name { xsd:NCName }?
79
80 filter_bounce =
81   attribute type { "bounce" },
82   attribute id { xsd:NCName }?,
83   attribute name { xsd:NCName }?
84
85 filter_frontend_net =
86   attribute type { "frontend_net" },
87   attribute id { xsd:NCName }?,
88   attribute name { xsd:NCName }?,
89   element mp:threads { xsd:integer }?,
90   element mp:port { xsd:string },
91   element mp:timeout { xsd:integer }?
92
93 filter_http_file =
94   attribute type { "http_file" },
95   attribute id { xsd:NCName }?,
96   attribute name { xsd:NCName }?,
97   element mp:mimetypes { xsd:string },
98   element mp:area {
99     element mp:documentroot { xsd:string },
100     element mp:prefix { xsd:string }
101   }
102
103 filter_load_balance =
104   attribute type { "load_balance" },
105   attribute id { xsd:NCName }?,
106   attribute name { xsd:NCName }?
107
108 filter_log =
109   attribute type { "log" },
110   attribute id { xsd:NCName }?,
111   attribute name { xsd:NCName }?,
112   element mp:message { xsd:string }?,
113   element mp:filename { xsd:string }?,
114   element mp:category {
115     attribute init-options { xsd:boolean }?,
116     attribute request-session { xsd:boolean }?,
117     attribute response-session { xsd:boolean }?,
118     attribute apdu { xsd:boolean }?,
119     attribute request-apdu { xsd:boolean }?,
120     attribute response-apdu { xsd:boolean }?
121   }?
122
123 filter_multi =
124   attribute type { "multi" },
125   attribute id { xsd:NCName }?,
126   attribute name { xsd:NCName }?,
127   element mp:target {
128     attribute route { xsd:string },
129     xsd:string
130   }*,
131   element mp:hideunavailable { empty }?
132
133 filter_query_rewrite =
134   attribute type { "query_rewrite" },
135   attribute id { xsd:NCName }?,
136   attribute name { xsd:NCName }?,
137   element mp:xslt { 
138         attribute stylesheet { xsd:string }
139   }
140
141 filter_record_transform =
142   attribute type { "record_transform" },
143   attribute id { xsd:NCName }?,
144   attribute name { xsd:NCName }?,
145   retrievalinfo 
146
147 filter_session_shared =
148   attribute type { "session_shared" },
149   attribute id { xsd:NCName }?,
150   attribute name { xsd:NCName }?,
151   element mp:resultset {
152     attribute max { xsd:integer },
153     attribute ttl { xsd:integer }
154   },
155   element mp:session {
156     attribute ttl { xsd:integer }
157   }
158
159 filter_sru_z3950 =
160   attribute type { "sru_z3950" },
161   attribute id { xsd:NCName }?,
162   attribute name { xsd:NCName }?
163
164 filter_virt_db =
165   attribute type { "virt_db" },
166   attribute id { xsd:NCName }?,
167   attribute name { xsd:NCName }?,
168   element mp:virtual {
169     attribute route { xsd:NCName }?,
170     element mp:database { xsd:NCName },
171     element mp:target { xsd:string }+
172   }+
173
174 filter_z3950_client =
175   attribute type { "z3950_client" },
176   attribute id { xsd:NCName }?,
177   attribute name { xsd:NCName }?,
178   element mp:timeout { xsd:integer }?
179
180 filter_zeerex_explain =
181   attribute type { "zeerex_explain" },
182   attribute id { xsd:NCName }?,
183   attribute name { xsd:NCName }?