added first version of ZeeRex Explain filter for SRU explain
[metaproxy-moved-to-github.git] / xml / schema / metaproxy.rnc
1 # Metaproxy XML config file schemas
2 #  $Id: metaproxy.rnc,v 1.12 2006-12-28 14:59:44 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_log
54     | filter_multi
55     | filter_query_rewrite
56     | filter_record_transform
57     | filter_session_shared
58     | filter_sru_z3950
59     | filter_virt_db
60     | filter_z3950_client
61     | filter_zeerex_explain
62   }
63
64 filter_refid = attribute refid { xsd:NCName }
65
66 filter_auth_simple =
67   attribute type { "auth_simple" },
68   attribute id { xsd:NCName }?,
69   attribute name { xsd:NCName }?,
70   element mp:userRegister { xsd:string }?,
71   element mp:targetRegister { xsd:string }?,
72   element mp:discardUnauthorisedTargets { empty }?
73
74 filter_backend_test =
75   attribute type { "backend_test" },
76   attribute id { xsd:NCName }?,
77   attribute name { xsd:NCName }?
78
79 filter_bounce =
80   attribute type { "bounce" },
81   attribute id { xsd:NCName }?,
82   attribute name { xsd:NCName }?
83
84 filter_frontend_net =
85   attribute type { "frontend_net" },
86   attribute id { xsd:NCName }?,
87   attribute name { xsd:NCName }?,
88   element mp:threads { xsd:integer }?,
89   element mp:port { xsd:string },
90   element mp:timeout { xsd:integer }?
91
92 filter_http_file =
93   attribute type { "http_file" },
94   attribute id { xsd:NCName }?,
95   attribute name { xsd:NCName }?,
96   element mp:mimetypes { xsd:string },
97   element mp:area {
98     element mp:documentroot { xsd:string },
99     element mp:prefix { xsd:string }
100   }
101
102 filter_log =
103   attribute type { "log" },
104   attribute id { xsd:NCName }?,
105   attribute name { xsd:NCName }?,
106   element mp:message { xsd:string }?,
107   element mp:filename { xsd:string }?,
108   element mp:category {
109     attribute init-options { xsd:boolean }?,
110     attribute request-session { xsd:boolean }?,
111     attribute response-session { xsd:boolean }?,
112     attribute apdu { xsd:boolean }?,
113     attribute request-apdu { xsd:boolean }?,
114     attribute response-apdu { xsd:boolean }?
115   }?
116
117 filter_multi =
118   attribute type { "multi" },
119   attribute id { xsd:NCName }?,
120   attribute name { xsd:NCName }?,
121   element mp:target {
122     attribute route { xsd:string },
123     xsd:string
124   }*,
125   element mp:hideunavailable { empty }?
126
127 filter_query_rewrite =
128   attribute type { "query_rewrite" },
129   attribute id { xsd:NCName }?,
130   attribute name { xsd:NCName }?,
131   element mp:xslt { 
132         attribute stylesheet { xsd:string }
133   }
134
135 filter_record_transform =
136   attribute type { "record_transform" },
137   attribute id { xsd:NCName }?,
138   attribute name { xsd:NCName }?,
139   retrievalinfo 
140
141 filter_session_shared =
142   attribute type { "session_shared" },
143   attribute id { xsd:NCName }?,
144   attribute name { xsd:NCName }?,
145   element mp:resultset {
146     attribute max { xsd:integer },
147     attribute ttl { xsd:integer }
148   },
149   element mp:session {
150     attribute ttl { xsd:integer }
151   }
152
153 filter_sru_z3950 =
154   attribute type { "sru_z3950" },
155   attribute id { xsd:NCName }?,
156   attribute name { xsd:NCName }?
157
158 filter_virt_db =
159   attribute type { "virt_db" },
160   attribute id { xsd:NCName }?,
161   attribute name { xsd:NCName }?,
162   element mp:virtual {
163     attribute route { xsd:NCName }?,
164     element mp:database { xsd:NCName },
165     element mp:target { xsd:string }+
166   }+
167
168 filter_z3950_client =
169   attribute type { "z3950_client" },
170   attribute id { xsd:NCName }?,
171   attribute name { xsd:NCName }?,
172   element mp:timeout { xsd:integer }?
173
174 filter_zeerex_explain =
175   attribute type { "zeerex_explain" },
176   attribute id { xsd:NCName }?,
177   attribute name { xsd:NCName }?