Split config schemas to separate files
[metaproxy-moved-to-github.git] / xml / schema / filter_virt_db.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_virt_db">
27     <xs:sequence>
28       <xs:element minOccurs="0" ref="mp:pass-vhosts"/>
29       <xs:element minOccurs="0" ref="mp:torus"/>
30       <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:virtual"/>
31     </xs:sequence>
32   </xs:group>
33   <xs:element name="pass-vhosts" type="xs:boolean"/>
34   <xs:element name="torus">
35     <xs:complexType>
36       <xs:attribute name="url" use="required" type="xs:string"/>
37     </xs:complexType>
38   </xs:element>
39   <xs:element name="virtual">
40     <xs:complexType>
41       <xs:sequence>
42         <xs:element name="database" type="xs:string"/>
43         <xs:element maxOccurs="unbounded" name="target" type="xs:string"/>
44       </xs:sequence>
45       <xs:attribute name="route" type="xs:NCName"/>
46     </xs:complexType>
47   </xs:element>
48   <xs:attributeGroup name="filter_virt_db">
49     <xs:attribute name="type" use="required">
50       <xs:simpleType>
51         <xs:restriction base="xs:token">
52           <xs:enumeration value="virt_db"/>
53         </xs:restriction>
54       </xs:simpleType>
55     </xs:attribute>
56     <xs:attribute name="id" type="xs:NCName"/>
57     <xs:attribute name="name" type="xs:NCName"/>
58   </xs:attributeGroup>
59 </xs:schema>