jps_geometry.xsd 9.51 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
  <xs:element name="geometry">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="rooms" maxOccurs="1" minOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="room" maxOccurs="unbounded" minOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="subroom" maxOccurs="unbounded" minOccurs="1">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="polygon" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="vertex" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
22 23
                                        <xs:attribute type="xs:float" name="px" use="required" />
                                        <xs:attribute type="xs:float" name="py" use="required" />
24 25 26 27 28
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
29
                              <xs:attribute type="xs:string" name="caption" use="required" />
30 31 32 33 34 35 36 37 38 39 40 41
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="obstacle" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="polygon">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="vertex" maxOccurs="unbounded" minOccurs="0">
                                        <xs:complexType>
                                          <xs:simpleContent>
                                            <xs:extension base="xs:string">
42 43
                                              <xs:attribute type="xs:float" name="px" use="required" />
                                              <xs:attribute type="xs:float" name="py" use="required" />
44 45 46 47 48
                                            </xs:extension>
                                          </xs:simpleContent>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
49
                                    <xs:attribute type="xs:string" name="caption" use="optional" />
50 51 52
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
53 54 55 56
                              <xs:attribute type="xs:int" name="id" use="required" />
                              <xs:attribute type="xs:string" name="caption" use="optional" />
                              <xs:attribute type="xs:float" name="height" use="optional" />
                              <xs:attribute type="xs:int" name="closed" use="optional" />
57 58
                            </xs:complexType>
                          </xs:element>
59
                          <xs:element name="up" minOccurs="0">
60 61 62
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
63 64
                                  <xs:attribute type="xs:float" name="px" use="required" />
                                  <xs:attribute type="xs:byte" name="py" use="required" />
65 66 67 68 69 70 71 72
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="down" minOccurs="0">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
73 74
                                  <xs:attribute type="xs:float" name="px" use="required" />
                                  <xs:attribute type="xs:byte" name="py" use="required" />
75 76 77 78 79
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
80 81 82 83
                        <xs:attribute type="xs:int" name="id" use="required" />
                        <xs:attribute type="xs:int" name="closed" use="optional" />
                        <xs:attribute type="xs:float" name="A_x" use="optional" />
                        <xs:attribute type="xs:float" name="B_y" use="optional" />
Ulrich Kemloh's avatar
Ulrich Kemloh committed
84
                        <xs:attribute type="xs:float" name="C" use="optional" />
85
                        <xs:attribute name="class" use="required">
86 87 88 89 90 91 92
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="stair" />
                              <xs:enumeration value="subroom" />
                              <xs:enumeration value="floor" />
                            </xs:restriction>
                          </xs:simpleType>
93 94 95 96 97 98 99 100 101 102 103 104 105
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="crossings" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="crossing" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="vertex" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
106 107
                                        <xs:attribute type="xs:float" name="px" use="required" />
                                        <xs:attribute type="xs:float" name="py" use="required" />
108 109 110 111 112
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
113 114 115
                              <xs:attribute type="xs:int" name="id" use="required" />
                              <xs:attribute type="xs:int" name="subroom1_id" use="required" />
                              <xs:attribute type="xs:int" name="subroom2_id" use="required" />
116 117 118 119 120 121
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
122 123
                  <xs:attribute type="xs:int" name="id" use="required" />
                  <xs:attribute type="xs:string" name="caption" use="optional" />
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="transitions">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="transition" maxOccurs="unbounded" minOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="vertex" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
139 140
                            <xs:attribute type="xs:float" name="px" use="required" />
                            <xs:attribute type="xs:float" name="py" use="required" />
141 142 143 144 145
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
146 147 148 149 150 151 152
                  <xs:attribute type="xs:int" name="id" use="required" />
                  <xs:attribute type="xs:string" name="caption" use="required" />
                  <xs:attribute type="xs:string" name="type" use="optional" />
                  <xs:attribute type="xs:int" name="room1_id" use="required" />
                  <xs:attribute type="xs:int" name="subroom1_id" use="required" />
                  <xs:attribute type="xs:int" name="room2_id" use="required" />
                  <xs:attribute type="xs:int" name="subroom2_id" use="required" />
153 154 155 156 157 158
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
      <xs:attribute type="xs:string" name="caption" use="required" />
      <xs:attribute name="version" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:float">
            <xs:enumeration value="0.5" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="unit" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="m" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
174 175
    </xs:complexType>
  </xs:element>
176 177
</xs:schema>