-# The RelaxNG Compact Syntax file is the master copy
+# Metaproxy XML config file schemas
+#
+# Copyright (C) 2005-2012 Index Data.
+#
+# See the LICENSE file for details
+#
+#
+# The RelaxNG Compact Syntax file 'metaproxy.rnc' is the master copy.
+#
+# The RelaxNG XML Syntax and XML Schema are generated using 'trang':
# trang metaproxy.rnc metaproxy.rng
-# xmllint --relaxng metaproxy.rng ../../../etc/config1.xml
-# see also http://books.xmlschemata.org/relaxng/relax-CHP-16-SECT-2.html
+# trang metaproxy.rnc metaproxy.xsd
+#
+# Config file validation is done using 'xmllint':
+# xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml
+# xmllint -/-schema metaproxy.xsd config-bytarget.xml
+#
+# For information on RelaxNG see http://relaxng.org
+# see also http://books.xmlschemata.org/relaxng/
-default namespace = "http://indexdata.dk/yp2/config/1"
+namespace mp = "http://indexdata.com/metaproxy"
-start = metaproxy
+start |= metaproxy
-metaproxy =
- element yp2 {
- element start {
- attribute route { xsd:NCName }
- },
- element filters { filter+ }?,
- element routes {
- route+
- }
- }
-
-route = element route {
- attribute id { xsd:NCName },
- (filter
- | filter_ref_id
- )+
-}
+include "filter_auth_simple.rnc"
+include "filter_backend_test.rnc"
+include "filter_bounce.rnc"
+include "filter_cgi.rnc"
+include "filter_cql_rpn.rnc"
+include "filter_frontend_net.rnc"
+include "filter_http_file.rnc"
+include "filter_limit.rnc"
+include "filter_load_balance.rnc"
+include "filter_log.rnc"
+include "filter_multi.rnc"
+include "filter_query_rewrite.rnc"
+include "filter_record_transform.rnc"
+include "filter_session_shared.rnc"
+include "filter_sru_z3950.rnc"
+include "filter_virt_db.rnc"
+include "filter_z3950_client.rnc"
+include "filter_zoom.rnc"
-filter =
- (filter_log
- | filter_bounce
- | filter_frontend_net
- | filter_z3950_client
- )
+any = (text | element * { attribute * { text }*, any })*
-filter_ref_id =
- element filter {
- attribute refid { xsd:NCName }
+metaproxy =
+ element mp:metaproxy {
+ attribute version { "1.0" },
+ element mp:dlpath { xsd:string }?,
+ element mp:start {
+ attribute route { xsd:NCName }
+ },
+ element mp:filters { filter+ }?,
+ element mp:routes { route+ }
}
-filter_bounce =
- element filter {
- attribute type { "bounce" },
- attribute id { xsd:NCName }?,
- attribute name { xsd:NCName }
+route =
+ element mp:route {
+ attribute id { xsd:NCName },
+ filters+
}
-filter_log =
- element filter {
- attribute type { "log" },
- attribute id { xsd:NCName }?,
- attribute name { xsd:NCName }?,
- element message { xsd:NCName }?
+filters =
+ filter |
+ element mp:filters {
+ filters+
}
-filter_frontend_net =
- element filter {
- attribute type { "frontend_net" },
- attribute id { xsd:NCName }?,
- attribute name { xsd:NCName }?,
- element threads { xsd:integer },
- element port { xsd:string }
+filter =
+ element mp:filter {
+ filter_refid
+ | filter_auth_simple
+ | filter_backend_test
+ | filter_bounce
+ | filter_cgi
+ | filter_cql_rpn
+ | filter_frontend_net
+ | filter_http_file
+ | filter_limit
+ | filter_load_balance
+ | filter_log
+ | filter_multi
+ | filter_query_rewrite
+ | filter_record_transform
+ | filter_session_shared
+ | filter_sru_z3950
+ | filter_virt_db
+ | filter_z3950_client
+ | filter_zoom
}
-filter_z3950_client =
- element filter {
- attribute type { "z3950_client" },
- attribute id { xsd:NCName }?,
- attribute name { xsd:NCName }?,
- element timeout { xsd:integer }
- }
+filter_refid = attribute refid { xsd:NCName }