X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=xml%2Fschema%2Fmetaproxy.rnc;h=509a00efcead47f8967c0c1ecc71c8b837491acc;hb=03e2fc2fbd11931ca4183c3f1fb678f09eb5403e;hp=9ea24b6e82528c5b4ff469e5169d86849e44b715;hpb=52d4aac8b44ac72ee7274ace6eb6cd09434c4293;p=metaproxy-moved-to-github.git diff --git a/xml/schema/metaproxy.rnc b/xml/schema/metaproxy.rnc index 9ea24b6..509a00e 100644 --- a/xml/schema/metaproxy.rnc +++ b/xml/schema/metaproxy.rnc @@ -1,119 +1,210 @@ -# The RelaxNG Compact Syntax file is the master copy +# Metaproxy XML config file schemas +# $Id: metaproxy.rnc,v 1.22 2008-02-27 11:08:50 adam Exp $ +# +# Copyright (c) 2005-2008, 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 +# trang metaproxy.rnc metaproxy.xsd +# +# Config file validation is done using 'xmllint': # xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml -# see also http://books.xmlschemata.org/relaxng/relax-CHP-16-SECT-2.html +# 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" -start = metaproxy +namespace mp = "http://indexdata.com/metaproxy" -metaproxy = - element yp2 { - element start { - attribute route { xsd:NCName } +start |= metaproxy + +include "retrievalinfo.rnc" + +any = (text | element * { attribute * { text }*, any })* + +metaproxy = + element mp:metaproxy { + attribute version { "1.0" }, + element mp:start { + attribute route { xsd:NCName } }, - element filters { filter+ }?, - element routes { - route+ - } + element mp:filters { filter+ }?, + element mp:routes { route+ } } -route = element route { +route = + element mp:route { attribute id { xsd:NCName }, filter+ -} - -filter = - element filter { - ( filter_refid - | filter_auth_simple - | filter_backend_test - | filter_bounce - | filter_frontend_net - | filter_http_file - | filter_log - | filter_multi - | filter_query_rewrite - | filter_virt_db - | filter_z3950_client - ) -} + } + +filter = + element mp:filter { + filter_refid + | filter_auth_simple + | filter_backend_test + | filter_bounce + | filter_cql_rpn + | filter_frontend_net + | filter_http_file + | 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_zeerex_explain + } filter_refid = attribute refid { xsd:NCName } -filter_auth_simple = - attribute type { "auth_simple" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element userRegister { xsd:string }?, - element targetRegister { xsd:string }?, - element discardUnauthorisedTargets { empty }? - -filter_backend_test = - attribute type { "backend_test" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }? - -filter_bounce = - attribute type { "bounce" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }? - -filter_frontend_net = - attribute type { "frontend_net" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element threads { xsd:integer }?, - element port { xsd:string } - -filter_http_file = - attribute type { "http_file" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element mimetypes { xsd:string }, - element area { - element documentroot { xsd:string }, - element prefix { xsd:string } - } - -filter_log = - attribute type { "log" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element message { xsd:NCName }, - element filename { xsd:string }?, - element category { - attribute request-session { xsd:boolean }?, - attribute response-session { xsd:boolean }?, - attribute request-apdu { xsd:boolean }?, - attribute response-apdu { xsd:boolean }? - }? - -filter_multi = - attribute type { "multi" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element hideunavailable { empty }? - -filter_query_rewrite = - attribute type { "query_rewrite" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element xslt { xsd:string } - -filter_virt_db = - attribute type { "virt_db" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element virtual { - attribute route { xsd:NCName }?, - element database { xsd:NCName }, - element target { xsd:string }+ - }+ - -filter_z3950_client = - attribute type { "z3950_client" }, - attribute id { xsd:NCName }?, - attribute name { xsd:NCName }?, - element timeout { xsd:integer } +filter_auth_simple = + attribute type { "auth_simple" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:userRegister { xsd:string }?, + element mp:targetRegister { xsd:string }?, + element mp:discardUnauthorisedTargets { empty }? + +filter_backend_test = + attribute type { "backend_test" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }? + +filter_bounce = + attribute type { "bounce" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }? + +filter_cql_rpn = + attribute type { "cql_rpn" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:conversion { + attribute file { xsd:string } + } + +filter_frontend_net = + attribute type { "frontend_net" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:threads { xsd:integer }?, + element mp:port { xsd:string }+, + element mp:timeout { xsd:integer }? + +filter_http_file = + attribute type { "http_file" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:mimetypes { xsd:string }, + element mp:area { + element mp:documentroot { xsd:string }, + element mp:prefix { xsd:string } + } + +filter_load_balance = + attribute type { "load_balance" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }? + +filter_log = + attribute type { "log" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:message { xsd:string }?, + element mp:filename { xsd:string }?, + element mp:time-format { xsd:string }?, + element mp:category { + attribute user-access { xsd:boolean }?, + attribute access { xsd:boolean }?, + attribute init-options { xsd:boolean }?, + attribute request-session { xsd:boolean }?, + attribute response-session { xsd:boolean }?, + attribute apdu { xsd:boolean }?, + attribute request-apdu { xsd:boolean }?, + attribute response-apdu { xsd:boolean }? + }? + +filter_multi = + attribute type { "multi" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:target { + attribute route { xsd:string }, + xsd:string + }*, + element mp:hideunavailable { empty }?, + element mp:mergetype { xsd:string }? + +filter_query_rewrite = + attribute type { "query_rewrite" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:xslt { + attribute stylesheet { xsd:string } + } +filter_record_transform = + attribute type { "record_transform" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + retrievalinfo + +filter_session_shared = + attribute type { "session_shared" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:resultset { + attribute max { xsd:integer }, + attribute ttl { xsd:integer } + }?, + element mp:session { + attribute ttl { xsd:integer } + }? + +filter_sru_z3950 = + attribute type { "sru_z3950" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:database { + attribute name { xsd:NCName }, + any + }+ + +filter_virt_db = + attribute type { "virt_db" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:virtual { + attribute route { xsd:NCName }?, + element mp:database { xsd:NCName }, + element mp:target { xsd:string }+ + }+ + +filter_z3950_client = + attribute type { "z3950_client" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:timeout { xsd:integer }?, + element mp:default_target { xsd:string }?, + element mp:force_target { xsd:string }? + +#filter_zeerex_explain = +# attribute type { "zeerex_explain" }, +# attribute id { xsd:NCName }?, +# attribute name { xsd:NCName }?, +# element mp:database { +# attribute name { xsd:NCName }, +# any +# }+ + +