Added schema xsd and rng that are auto-generated by trang.
[metaproxy-moved-to-github.git] / xml / schema / retrievalinfo.rng
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Metaproxy XML config file schemas
4   
5     Copyright (c) 2005-2008 Index Data.
6   
7     See the LICENSE file for details
8   
9   
10   The RelaxNG Compact Syntax file 'retrievalinfo.rnc' is the master copy.
11   
12   The RelaxNG XML Syntax and XML Schema are generated using 'trang':
13   trang retrievalinfo.rnc retrievalinfo.rng 
14   trang retrievalinfo.rnc retrievalinfo.xsd 
15   
16   Config file validation is done using 'xmllint':
17   xmllint -/-relaxng retrievalinfo.rng retrievalinfo.xml 
18   xmllint -/-schema retrievalinfo.xsd retirevalinfo.xml
19   
20   For information on RelaxNG see http://relaxng.org 
21   see also http://books.xmlschemata.org/relaxng/
22 -->
23 <grammar xmlns:y="http://indexdata.com/yaz" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
24   <!--
25     need to be in different namespace then metaproxy, otherwise 
26     xslt element definition clashes in XML Schema files
27     namespace y = "http://indexdata.com/metaproxy"
28   -->
29   <start combine="choice">
30     <ref name="retrievalinfo"/>
31   </start>
32   <define name="marc">
33     <element name="y:marc">
34       <attribute name="inputformat">
35         <data type="string"/>
36       </attribute>
37       <attribute name="outputformat">
38         <data type="string"/>
39       </attribute>
40       <attribute name="inputcharset">
41         <data type="string"/>
42       </attribute>
43     </element>
44   </define>
45   <define name="xslt">
46     <element name="y:xslt">
47       <attribute name="stylesheet">
48         <data type="string"/>
49       </attribute>
50     </element>
51   </define>
52   <define name="retrievalinfo">
53     <element name="y:retrievalinfo">
54       <attribute name="version">
55         <value>1.0</value>
56       </attribute>
57       <oneOrMore>
58         <element name="y:retrieval">
59           <attribute name="syntax">
60             <data type="string"/>
61           </attribute>
62           <optional>
63             <attribute name="name">
64               <data type="string"/>
65             </attribute>
66           </optional>
67           <optional>
68             <attribute name="identifier">
69               <data type="string"/>
70             </attribute>
71           </optional>
72           <optional>
73             <!--
74               attribute backendsyntax { xsd:string }?,
75               attribute backendname { xsd:string }?,
76             -->
77             <element name="y:backend">
78               <attribute name="syntax">
79                 <data type="string"/>
80               </attribute>
81               <optional>
82                 <attribute name="name">
83                   <data type="string"/>
84                 </attribute>
85               </optional>
86               <zeroOrMore>
87                 <choice>
88                   <ref name="marc"/>
89                   <ref name="xslt"/>
90                 </choice>
91               </zeroOrMore>
92             </element>
93           </optional>
94         </element>
95       </oneOrMore>
96     </element>
97   </define>
98 </grammar>