From: Adam Dickmeiss Date: Fri, 19 Jul 2013 12:26:04 +0000 (+0200) Subject: Add schema for http_rewrite filter X-Git-Tag: v1.3.60~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=9385dfd8322690a4fb9fadc474787a2e081a1d24;p=metaproxy-moved-to-github.git Add schema for http_rewrite filter --- diff --git a/etc/Makefile.am b/etc/Makefile.am index 50e4d4c..5dbb9fb 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -23,6 +23,7 @@ xmlconfig = $(srcdir)/config-bytarget.xml \ $(srcdir)/config-solr.xml \ $(srcdir)/config-zoom.xml \ $(srcdir)/config-proxy.xml \ + $(srcdir)/config-rewrite.xml \ $(srcdir)/retrieval-info.xml config = example.simple-auth example.target-auth pqf2pqf.xsl explain.xml \ diff --git a/etc/config-rewrite.xml b/etc/config-rewrite.xml new file mode 100644 index 0000000..4ad9ff8 --- /dev/null +++ b/etc/config-rewrite.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/schema/Makefile.am b/xml/schema/Makefile.am index a605b48..c62f1b9 100644 --- a/xml/schema/Makefile.am +++ b/xml/schema/Makefile.am @@ -12,6 +12,8 @@ filter_cql_rpn.rnc \ filter_frontend_net.rnc \ filter_http_client.rnc \ filter_http_file.rnc \ +filter_http_rewrite.rnc \ +filter_http_rewrite1.rnc \ filter_limit.rnc \ filter_load_balance.rnc \ filter_log.rnc \ diff --git a/xml/schema/filter_http_rewrite.rnc b/xml/schema/filter_http_rewrite.rnc new file mode 100644 index 0000000..99b1214 --- /dev/null +++ b/xml/schema/filter_http_rewrite.rnc @@ -0,0 +1,44 @@ +# Metaproxy XML config file schema + +namespace mp = "http://indexdata.com/metaproxy" + +rewrite = element mp:rewrite { + attribute from { xsd:string }, + attribute to { xsd:string } +} + +rule = element mp:rule { + attribute name { xsd:string }, + rewrite* +} + +within = element mp:within { + attribute tag { xsd:string }?, + attribute attr { xsd:string }?, + attribute type { xsd:string }?, + attribute header { xsd:string }?, + attribute reqline { xsd:string }?, + attribute rule { xsd:string } +} + +content = element mp:content { + attribute type { xsd:string }, + attribute mime { xsd:string }?, + within* +} + +section = (rule | content)* + +filter_http_rewrite = + attribute type { "http_rewrite" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:request { + attribute verbose { xsd:string }, + section + }?, + element mp:response { + attribute verbose { xsd:string }, + section + }? + diff --git a/xml/schema/metaproxy.rnc b/xml/schema/metaproxy.rnc index 1562fb2..4d9263e 100644 --- a/xml/schema/metaproxy.rnc +++ b/xml/schema/metaproxy.rnc @@ -30,6 +30,7 @@ include "filter_cql_rpn.rnc" include "filter_frontend_net.rnc" include "filter_http_client.rnc" include "filter_http_file.rnc" +include "filter_http_rewrite.rnc" include "filter_http_rewrite1.rnc" include "filter_limit.rnc" include "filter_load_balance.rnc" @@ -82,6 +83,7 @@ filter = | filter_frontend_net | filter_http_client | filter_http_file + | filter_http_rewrite | filter_http_rewrite1 | filter_limit | filter_load_balance