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