# Schema for YAZ retrieval info and USEMARCON extension
#
#   Copyright (C) Index Data
#   See the LICENSE file for details.

namespace y = "http://indexdata.com/yaz"

start |= retrievalinfo

marc = element y:marc {
  attribute inputformat { xsd:string },
  attribute outputformat { xsd:string },
  attribute inputcharset { xsd:string },
  attribute outputcharset { xsd:string }?,
  attribute leaderspec { xsd:string }?
}

xslt = element y:xslt {
  attribute stylesheet { xsd:string },
  element y:param {
  attribute name {xsd:string},
  attribute value {xsd:string}
  }*
}

usemarcon = element y:usemarcon {
  attribute stage1 { xsd:string }?,
  attribute stage2 { xsd:string }?
}

retrievalinfo = 
  element y:retrievalinfo { 
    attribute version { "1.0" },
    element y:retrieval {
      attribute syntax { xsd:string },
      attribute name { xsd:string }?,
      attribute identifier { xsd:string }?,
      element y:backend {
      attribute syntax { xsd:string },
      attribute name { xsd:string }?,
      (marc | xslt | usemarcon)*
      }?
    }+
  }
