From 5c729d564d57d5c4c650d253b5e531825befafba Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Fri, 6 Oct 2006 14:28:26 +0000 Subject: [PATCH] added first shot on relaxng schema for metaproxy still need to resolve ambiguity in schema --- xml/schema/metaproxy.rnc | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 xml/schema/metaproxy.rnc diff --git a/xml/schema/metaproxy.rnc b/xml/schema/metaproxy.rnc new file mode 100644 index 0000000..f648a18 --- /dev/null +++ b/xml/schema/metaproxy.rnc @@ -0,0 +1,71 @@ +# The RelaxNG Compact Syntax file is the master copy +# 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 + +default namespace = "http://indexdata.dk/yp2/config/1" + +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 + )+ +} + +filter = + (filter_log + | filter_bounce + | filter_frontend_net + | filter_z3950_client + ) + +filter_ref_id = + element filter { + attribute refid { xsd:NCName } + } + +filter_bounce = + element filter { + attribute type { "bounce" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName } + } + +filter_log = + element filter { + attribute type { "log" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element message { xsd:NCName }? + } + +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_z3950_client = + element filter { + attribute type { "z3950_client" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element timeout { xsd:integer } + } + -- 1.7.10.4