Added schema xsd and rng that are auto-generated by trang.
[metaproxy-moved-to-github.git] / xml / schema / retrievalinfo.xsd
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 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://indexdata.com/yaz" xmlns:mp="http://indexdata.com/metaproxy" xmlns:y="http://indexdata.com/yaz">
24   <xs:import namespace="http://indexdata.com/metaproxy" schemaLocation="metaproxy.xsd"/>
25   <!--
26     need to be in different namespace then metaproxy, otherwise 
27     xslt element definition clashes in XML Schema files
28     namespace y = "http://indexdata.com/metaproxy"
29   -->
30   <xs:element name="marc">
31     <xs:complexType>
32       <xs:attribute name="inputformat" use="required" type="xs:string"/>
33       <xs:attribute name="outputformat" use="required" type="xs:string"/>
34       <xs:attribute name="inputcharset" use="required" type="xs:string"/>
35     </xs:complexType>
36   </xs:element>
37   <xs:element name="xslt">
38     <xs:complexType>
39       <xs:attribute name="stylesheet" use="required" type="xs:string"/>
40     </xs:complexType>
41   </xs:element>
42   <xs:element name="retrievalinfo" substitutionGroup="mp:filter_record_transform"/>
43   <xs:element name="retrieval">
44     <xs:complexType>
45       <xs:sequence>
46         <xs:element minOccurs="0" ref="y:backend"/>
47       </xs:sequence>
48       <xs:attribute name="syntax" use="required" type="xs:string"/>
49       <xs:attribute name="name" type="xs:string"/>
50       <xs:attribute name="identifier" type="xs:string"/>
51     </xs:complexType>
52   </xs:element>
53   <xs:element name="backend">
54     <xs:complexType>
55       <xs:choice minOccurs="0" maxOccurs="unbounded">
56         <xs:element ref="y:marc"/>
57         <xs:element ref="y:xslt"/>
58       </xs:choice>
59       <xs:attribute name="syntax" use="required" type="xs:string"/>
60       <xs:attribute name="name" type="xs:string"/>
61     </xs:complexType>
62   </xs:element>
63 </xs:schema>