update retrievalinfo schema
[metaproxy-moved-to-github.git] / xml / schema / retrievalinfo.rnc
1 # Metaproxy XML config file schemas
2
3 #   Copyright (C) 2005-2012 Index Data.
4
5 #   See the LICENSE file for details
6
7
8 # The RelaxNG Compact Syntax file 'retrievalinfo.rnc' is the master copy.
9
10 # The RelaxNG XML Syntax and XML Schema are generated using 'trang':
11 # trang retrievalinfo.rnc retrievalinfo.rng 
12 # trang retrievalinfo.rnc retrievalinfo.xsd 
13
14 # Config file validation is done using 'xmllint':
15 # xmllint -/-relaxng retrievalinfo.rng retrievalinfo.xml 
16 # xmllint -/-schema retrievalinfo.xsd retirevalinfo.xml
17
18 # For information on RelaxNG see http://relaxng.org 
19 # see also http://books.xmlschemata.org/relaxng/
20
21 namespace y = "http://indexdata.com/yaz"
22
23 # need to be in different namespace then metaproxy, otherwise 
24 # xslt element definition clashes in XML Schema files
25 # namespace y = "http://indexdata.com/metaproxy"
26
27 start |= retrievalinfo
28
29 marc = element y:marc {
30   attribute inputformat { xsd:string },
31   attribute outputformat { xsd:string },
32   attribute inputcharset { xsd:string },
33   attribute outputcharset { xsd:string }?,
34   attribute leaderspec { xsd:string }?
35 }
36
37 xslt = element y:xslt {
38   attribute stylesheet { xsd:string }
39 }
40
41 usemarcon = element y:usemarcon {
42   attribute stage1 { xsd:string }?,
43   attribute stage2 { xsd:string }?
44 }
45
46 retrievalinfo = 
47   element y:retrievalinfo { 
48     attribute version { "1.0" },
49     element y:retrieval {
50       attribute syntax { xsd:string },
51       attribute name { xsd:string }?,
52       attribute identifier { xsd:string }?,
53       #attribute backendsyntax { xsd:string }?,
54       #attribute backendname { xsd:string }?,
55       element y:backend {
56       attribute syntax { xsd:string },
57       attribute name { xsd:string }?,
58       (marc | xslt | usemarcon)*
59       }?
60     }+
61   }