BMLT Root Server
ChangeResponse.php
Go to the documentation of this file.
1 <?php
2 /****************************************************************************************//**
3 * \file ChangeResponse.php *
4 * \brief Returns an XML response, containing the schema for the semantic editing XML 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='changeResponse'>
37  <xs:complexType>
38  <xs:sequence>
39  <xs:choice>
40  <xs:element ref='ns1:changeMeeting'/>
41  <xs:element ref='ns1:newMeeting'/>
42  </xs:choice>
43  </xs:sequence>
44  </xs:complexType>
45  </xs:element>
46 
47  <xs:element name='changeMeeting'>
48  <xs:complexType>
49  <xs:sequence>
50  <xs:element ref='ns1:field'/>
51  </xs:sequence>
52  <xs:attribute name='id' use='required' type='xs:integer'/>
53  </xs:complexType>
54  </xs:element>
55 
56  <xs:element name='newMeeting'>
57  <xs:complexType>
58  <xs:sequence>
59  <xs:element maxOccurs='unbounded' ref='ns1:field'/>
60  </xs:sequence>
61  <xs:attribute name='id' use='required' type='xs:integer'/>
62  </xs:complexType>
63  </xs:element>
64 
65  <xs:element name='field'>
66  <xs:complexType>
67  <xs:sequence>
68  <xs:element name='oldValue' type='xs:string'/>
69  <xs:element name='newValue' type='xs:string'/>
70  </xs:sequence>
71  <xs:attribute name='key' use='required' type='xs:NCName'/>
72  </xs:complexType>
73  </xs:element>
74 
75 </xs:schema><?php ob_end_flush(); ?>
$_GET['switcher']