Split config schemas to separate files
[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-2011 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 schemaLocation="local.xsd"/>
25   <xs:import namespace="http://indexdata.com/metaproxy" schemaLocation="metaproxy.xsd"/>
26   <!--
27     need to be in different namespace then metaproxy, otherwise 
28     xslt element definition clashes in XML Schema files
29     namespace y = "http://indexdata.com/metaproxy"
30   -->
31   <xs:element name="marc">
32     <xs:complexType>
33       <xs:attribute name="inputformat" use="required" type="xs:string"/>
34       <xs:attribute name="outputformat" use="required" type="xs:string"/>
35       <xs:attribute name="inputcharset" use="required" type="xs:string"/>
36     </xs:complexType>
37   </xs:element>
38   <xs:element name="xslt">
39     <xs:complexType>
40       <xs:attribute name="stylesheet" use="required" type="xs:string"/>
41     </xs:complexType>
42   </xs:element>
43   <xs:element name="retrievalinfo" substitutionGroup="filter_record_transform"/>
44   <xs:element name="retrieval">
45     <xs:complexType>
46       <xs:sequence>
47         <xs:element minOccurs="0" ref="y:backend"/>
48       </xs:sequence>
49       <xs:attribute name="syntax" use="required" type="xs:string"/>
50       <xs:attribute name="name" type="xs:string"/>
51       <xs:attribute name="identifier" type="xs:string"/>
52     </xs:complexType>
53   </xs:element>
54   <xs:element name="backend">
55     <xs:complexType>
56       <xs:choice minOccurs="0" maxOccurs="unbounded">
57         <xs:element ref="y:marc"/>
58         <xs:element ref="y:xslt"/>
59       </xs:choice>
60       <xs:attribute name="syntax" use="required" type="xs:string"/>
61       <xs:attribute name="name" type="xs:string"/>
62     </xs:complexType>
63   </xs:element>
64 </xs:schema>