|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 Sane Software Manifesto helper tools |
|
4 Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
|
5 |
|
6 This program is free software: you can redistribute it and/or modify |
|
7 it under the terms of the GNU General Public License as published by |
|
8 the Free Software Foundation, version 3. |
|
9 |
|
10 This program is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 GNU General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU General Public License |
|
16 along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 --> |
|
18 <xs:schema xmlns="tag:globalcode.info,2019:sane-software/manifesto" |
|
19 targetNamespace="tag:globalcode.info,2019:sane-software/manifesto" |
|
20 xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|
21 elementFormDefault="qualified" |
|
22 attributeFormDefault="unqualified"> |
|
23 |
|
24 <xs:element name="manifesto" type="Manifesto"/> |
|
25 |
|
26 <xs:complexType name="Manifesto"> |
|
27 <xs:sequence> |
|
28 <xs:element name="title" type="xs:string"/> |
|
29 <xs:element name="id" type="ID"/> |
|
30 <xs:element name="preamble" type="xs:string"/> |
|
31 <xs:element name="chapter" type="Chapter" maxOccurs="unbounded"/> |
|
32 </xs:sequence> |
|
33 </xs:complexType> |
|
34 |
|
35 <xs:simpleType name="ID"> |
|
36 <xs:annotation> |
|
37 <xs:documentation> |
|
38 UUID, but must start with a letter, to comply with XML ID rules; |
|
39 use e.g. uuidgen | grep ^[a-f]; |
|
40 Never reuse the ID if one chapter/item is removed and another with different meaning is added. |
|
41 </xs:documentation> |
|
42 </xs:annotation> |
|
43 <xs:restriction base="xs:ID"> |
|
44 <xs:pattern value="[a-f][a-f0-9]{7}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/> |
|
45 </xs:restriction> |
|
46 </xs:simpleType> |
|
47 |
|
48 <xs:complexType name="Chapter"> |
|
49 <xs:sequence> |
|
50 <xs:element name="name" type="xs:string"/> |
|
51 <xs:element name="id" type="ID"/> |
|
52 <xs:element name="item" type="Item" maxOccurs="unbounded"/> |
|
53 </xs:sequence> |
|
54 </xs:complexType> |
|
55 |
|
56 <xs:complexType name="Item"> |
|
57 <xs:sequence> |
|
58 <xs:element name="id" type="ID"/> |
|
59 <xs:element name="text" type="xs:string" minOccurs="1" maxOccurs="unbounded"/> |
|
60 <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> |
|
61 <xs:element name="item" type="Item" minOccurs="0" maxOccurs="unbounded"/> |
|
62 </xs:sequence> |
|
63 </xs:complexType> |
|
64 |
|
65 </xs:schema> |