# Metaproxy XML config file schemas
#
#   Copyright (C) Index Data
#   See the LICENSE file for details.

namespace mp = "http://indexdata.com/metaproxy"

filter_zoom =
  attribute type { "zoom" },
  attribute id { xsd:NCName }?,
  attribute name { xsd:NCName }?,
  element mp:torus {
    attribute allow_ip { xsd:string }?,
    attribute auth_url { xsd:string }?,
    attribute url { xsd:string }?,
    attribute content_url { xsd:string }?,
    attribute realm { xsd:string }?,
    attribute xsldir { xsd:string }?,
    attribute element_transform { xsd:string }?,
    attribute element_raw { xsd:string }?,
    attribute element_passthru { xsd:string }?,
    attribute proxy { xsd:string }?,
    attribute explain_xsl { xsd:string }?,
    attribute record_xsl { xsd:string }?,
    element mp:records {
      element mp:record {
        element mp:authentication { xsd:string }?,
        element mp:authenticationMode { xsd:string }?,
        element mp:piggyback { xsd:string }?,
        element mp:queryEncoding { xsd:string }?,
        element mp:udb { xsd:string },
        element mp:cclmap_au { xsd:string }?,
        element mp:cclmap_date { xsd:string }?,
        element mp:cclmap_isbn { xsd:string }?,
        element mp:cclmap_su { xsd:string }?,
        element mp:cclmap_term { xsd:string }?,
        element mp:cclmap_ti { xsd:string }?,
        element mp:contentAuthentication { xsd:string }?,
        element mp:elementSet { xsd:string }?,
        element mp:recordEncoding { xsd:string }?,
        element mp:requestSyntax { xsd:string }?,
        element mp:sru { xsd:string }?,
        element mp:sruVersion { xsd:string }?,
        element mp:transform { xsd:string }?,
        element mp:literalTransform { xsd:string }?,
        element mp:urlRecipe { xsd:string }?,
        element mp:zurl { xsd:string },
        element mp:cfAuth { xsd:string }?,
        element mp:cfProxy { xsd:string }?,
        element mp:cfSubDB { xsd:string }?,
        element mp:contentConnector { xsd:string }?,
        element mp:sortStrategy { xsd:string }?,
        element mp:sortmap_author { xsd:string }?,
        element mp:sortmap_date { xsd:string }?,
        element mp:sortmap_title { xsd:string }?,
        element mp:extraArgs { xsd:string }?,
        element mp:rpn2cql { xsd:string }?,
        element mp:retryOnFailure { xsd:string }?
      }*
    }?
  }?,
  element mp:fieldmap {
    attribute cql { xsd:string },
    attribute ccl { xsd:string }?
  }*,
  element mp:cclmap {
    element mp:qual {
      attribute name { xsd:string },
      element mp:attr {
        attribute type { xsd:string },
        attribute value { xsd:string }
      }+
    }*
  }?,
  element mp:contentProxy {
    attribute config_file { xsd:string }?,
    attribute server { xsd:string }?,
    attribute tmp_file { xsd:string }?
  }?,
  element mp:log {
    attribute apdu { xsd:boolean }?
  }?,
  element mp:zoom {
    attribute timeout { xsd:integer }?,
    attribute proxy_timeout { xsd:integer }?
  }?
