Split config schemas to separate files
[metaproxy-moved-to-github.git] / xml / schema / filter_multi.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 'metaproxy.rnc' is the master copy.
11   
12   The RelaxNG XML Syntax and XML Schema are generated using 'trang':
13   trang metaproxy.rnc metaproxy.rng 
14   trang metaproxy.rnc metaproxy.xsd 
15   
16   Config file validation is done using 'xmllint':
17   xmllint -/-relaxng metaproxy.rng ../../../etc/config1.xml 
18   xmllint -/-schema metaproxy.xsd config-bytarget.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/metaproxy" 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/yaz" schemaLocation="retrievalinfo.xsd"/>
26   <xs:group name="filter_multi">
27     <xs:sequence>
28       <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:target"/>
29       <xs:element minOccurs="0" ref="mp:hideunavailable"/>
30       <xs:element minOccurs="0" ref="mp:mergetype"/>
31     </xs:sequence>
32   </xs:group>
33   <xs:element name="target">
34     <xs:complexType>
35       <xs:simpleContent>
36         <xs:extension base="xs:string">
37           <xs:attribute name="route" use="required" type="xs:string"/>
38         </xs:extension>
39       </xs:simpleContent>
40     </xs:complexType>
41   </xs:element>
42   <xs:element name="hideunavailable">
43     <xs:complexType/>
44   </xs:element>
45   <xs:element name="mergetype" type="xs:string"/>
46   <xs:attributeGroup name="filter_multi">
47     <xs:attribute name="type" use="required">
48       <xs:simpleType>
49         <xs:restriction base="xs:token">
50           <xs:enumeration value="multi"/>
51         </xs:restriction>
52       </xs:simpleType>
53     </xs:attribute>
54     <xs:attribute name="id" type="xs:NCName"/>
55     <xs:attribute name="name" type="xs:NCName"/>
56   </xs:attributeGroup>
57 </xs:schema>