Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git] / xml / schema / retrievalinfo.rnc
index 5819113..0695261 100644 (file)
@@ -1,32 +1,30 @@
-# Metaproxy XML config file schemas
-#  $Id: retrievalinfo.rnc,v 1.4 2006-12-12 11:01:40 marc Exp $
-# 
-#   Copyright (c) 2005-2006, Index Data.
-# 
-#   See the LICENSE file for details
-# 
-# 
-# The RelaxNG Compact Syntax file 'retrievalinfo.rnc' is the master copy.
-# 
-# The RelaxNG XML Syntax and XML Schema are generated using 'trang':
-# trang retrievalinfo.rnc retrievalinfo.rng 
-# trang retrievalinfo.rnc retrievalinfo.xsd 
-# 
-# Config file validation is done using 'xmllint':
-# xmllint -/-relaxng retrievalinfo.rng retrievalinfo.xml 
-# xmllint -/-schema retrievalinfo.xsd retirevalinfo.xml
-# 
-# For information on RelaxNG see http://relaxng.org 
-# see also http://books.xmlschemata.org/relaxng/
+# Schema for YAZ retrieval info and USEMARCON extension
 
 namespace y = "http://indexdata.com/yaz"
 
-# need to be in different namespace then metaproxy, otherwise 
-# xslt element definition clashes in XML Schema files
-# namespace y = "http://indexdata.com/metaproxy"
-
 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" },
@@ -34,19 +32,10 @@ retrievalinfo =
       attribute syntax { xsd:string },
       attribute name { xsd:string }?,
       attribute identifier { xsd:string }?,
-      #attribute backendsyntax { xsd:string }?,
-      #attribute backendname { xsd:string }?,
       element y:backend {
       attribute syntax { xsd:string },
       attribute name { xsd:string }?,
-        element y:marc {
-          attribute inputformat { xsd:string },
-          attribute outputformat { xsd:string },
-          attribute inputcharset { xsd:string }
-        },
-        element y:xslt {
-          attribute stylesheet { xsd:string }
-        }?
+      (marc | xslt | usemarcon)*
       }?
     }+
   }