BMLT Root Server
HierServiceBodies.php
Go to the documentation of this file.
1 <?php
2 /****************************************************************************************//**
3 * \file HierServiceBodies.php *
4 * \brief Returns an XML response, containing the schema for the Admin Service body info call. *
5 
6  This file is part of the Basic Meeting List Toolbox (BMLT).
7 
8  Find out more at: https://bmlt.app
9 
10  BMLT is free software: you can redistribute it and/or modify
11  it under the terms of the MIT License.
12 
13  BMLT is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  MIT License for more details.
17 
18  You should have received a copy of the MIT License along with this code.
19  If not, see <https://opensource.org/licenses/MIT>.
20 ********************************************************************************************/
21 
22 // The caller can request compression. Not all clients can deal with compressed replies.
23 if (isset($_GET['compress_xml']) || isset($_POST['compress_xml'])) {
24  if (zlib_get_coding_type() === false) {
25  ob_start("ob_gzhandler");
26  } else {
27  header('Content-Type:application/xml; charset=UTF-8');
28  ob_start();
29  }
30 } else {
31  header('Content-Type:application/xml; charset=UTF-8');
32  ob_start();
33 }
34 echo "<"."?xml version=\"1.0\" encoding=\"UTF-8\"?".">\n"; ?>
35 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:ns1='http://<?php echo $_SERVER['SERVER_NAME'] ?>' elementFormDefault='qualified' targetNamespace='http://<?php echo $_SERVER['SERVER_NAME'] ?>'>
36  <xs:element name='service_bodies'>
37  <xs:complexType>
38  <xs:sequence>
39  <xs:element minOccurs='1' maxOccurs='unbounded' ref='ns1:service_body'/>
40  </xs:sequence>
41  </xs:complexType>
42  </xs:element>
43 
44  <xs:element name='service_body'>
45  <xs:complexType>
46  <xs:sequence>
47  <xs:element name='service_body_type' type='xs:string' minOccurs='1' maxOccurs='1'/>
48  <xs:element name='description' type='xs:string' minOccurs='0' maxOccurs='1'/>
49  <xs:element name='uri' type='xs:anyURI' minOccurs='0' maxOccurs='1'/>
50  <xs:element name='helpline' type='xs:string' minOccurs='0' maxOccurs='1'/>
51  <xs:element ref='ns1:parent_service_body' minOccurs='0' maxOccurs='1'/>
52  <xs:element name='contact_email' type='xs:string' minOccurs='0' maxOccurs='1'/>
53  <xs:element ref='ns1:editors' minOccurs='1' maxOccurs='1'/>
54  <xs:choice>
55  <xs:element ref='ns1:children' minOccurs='0' maxOccurs='1'/>
56  <xs:element ref='ns1:service_bodies' minOccurs='0' maxOccurs='1'/>
57  </xs:choice>
58  </xs:sequence>
59  <xs:attribute name='id' use='required' type='xs:short'/>
60  <xs:attribute name='name' use='required' type='xs:string'/>
61  <xs:attribute name='type' use='required' type='xs:string'/>
62  </xs:complexType>
63  </xs:element>
64 
65  <xs:element name='editors'>
66  <xs:complexType>
67  <xs:sequence>
68  <xs:element ref='ns1:service_body_editors' minOccurs='1' maxOccurs='1'/>
69  <xs:element ref='ns1:meeting_list_editors' minOccurs='0' maxOccurs='1'/>
70  <xs:element ref='ns1:observers' minOccurs='0' maxOccurs='1'/>
71  </xs:sequence>
72  </xs:complexType>
73  </xs:element>
74 
75  <xs:element name='service_body_editors'>
76  <xs:complexType>
77  <xs:sequence>
78  <xs:element ref='ns1:editor' minOccurs='1' maxOccurs='unbounded'/>
79  </xs:sequence>
80  </xs:complexType>
81  </xs:element>
82 
83  <xs:element name='meeting_list_editors'>
84  <xs:complexType>
85  <xs:sequence>
86  <xs:element ref='ns1:editor' minOccurs='1' maxOccurs='unbounded'/>
87  </xs:sequence>
88  </xs:complexType>
89  </xs:element>
90 
91  <xs:element name='children'>
92  <xs:complexType>
93  <xs:sequence>
94  <xs:element ref='ns1:child_service_body' minOccurs='1' maxOccurs='unbounded'/>
95  </xs:sequence>
96  </xs:complexType>
97  </xs:element>
98 
99  <xs:element name='observers'>
100  <xs:complexType>
101  <xs:sequence>
102  <xs:element ref='ns1:editor' minOccurs='1' maxOccurs='unbounded'/>
103  </xs:sequence>
104  </xs:complexType>
105  </xs:element>
106 
107  <xs:element name='editor'>
108  <xs:complexType>
109  <xs:attribute name='id' use='required' type='xs:short'/>
110  <xs:attribute name='admin_type' use='required' type='xs:string'/>
111  <xs:attribute name='admin_name' use='required' type='xs:string'/>
112  </xs:complexType>
113  </xs:element>
114 
115  <xs:element name='parent_service_body'>
116  <xs:complexType>
117  <xs:simpleContent>
118  <xs:restriction base="xs:anyType">
119  <xs:simpleType>
120  <xs:restriction base="xs:string">
121  <xs:minLength value="1" />
122  </xs:restriction>
123  </xs:simpleType>
124  <xs:attribute name='id' use='required' type='xs:short'/>
125  <xs:attribute name='type' use='required' type='xs:string'/>
126  </xs:restriction>
127  </xs:simpleContent>
128  </xs:complexType>
129  </xs:element>
130 
131  <xs:element name='child_service_body'>
132  <xs:complexType>
133  <xs:simpleContent>
134  <xs:restriction base="xs:anyType">
135  <xs:simpleType>
136  <xs:restriction base="xs:string">
137  <xs:minLength value="1" />
138  </xs:restriction>
139  </xs:simpleType>
140  <xs:attribute name='id' use='required' type='xs:short'/>
141  <xs:attribute name='type' use='required' type='xs:string'/>
142  </xs:restriction>
143  </xs:simpleContent>
144  </xs:complexType>
145  </xs:element>
146 </xs:schema><?php ob_end_flush(); ?>
$_GET['switcher']