Commit | Line | Data |
---|---|---|
a314770a MW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.woltlab.com" targetNamespace="http://www.woltlab.com" elementFormDefault="qualified"> | |
61d010dd | 3 | <!-- include types --> |
a314770a | 4 | <xs:include schemaLocation="types.xsd" /> |
2ee2acec | 5 | |
61d010dd | 6 | <!-- data element --> |
a314770a MW |
7 | <xs:element name="package"> |
8 | <xs:complexType> | |
9 | <xs:choice maxOccurs="unbounded"> | |
10 | <xs:element name="instructions" type="instructions" minOccurs="1" maxOccurs="unbounded" /> | |
11 | <xs:element name="packageinformation" type="packageInformation" minOccurs="1" maxOccurs="1" /> | |
12 | <xs:element name="authorinformation" type="authorInformation" minOccurs="1" maxOccurs="1" /> | |
13 | <xs:element name="requiredpackages" type="requiredPackages" minOccurs="0" maxOccurs="1" /> | |
14 | <xs:element name="optionalpackages" type="optionalPackages" minOccurs="0" maxOccurs="1" /> | |
15 | <xs:element name="excludedpackages" type="excludedPackages" minOccurs="0" maxOccurs="1" /> | |
89484ba0 | 16 | <xs:element name="compatibility" type="compatibility" minOccurs="0" maxOccurs="1" /> |
a314770a MW |
17 | </xs:choice> |
18 | <xs:attribute name="name" type="woltlab_varchar" use="required" /> | |
19 | </xs:complexType> | |
20 | </xs:element> | |
2ee2acec | 21 | |
61d010dd | 22 | <!-- simple package element --> |
a314770a MW |
23 | <xs:complexType name="simplePackage"> |
24 | <xs:simpleContent> | |
25 | <xs:extension base="xs:string"> | |
26 | <xs:attribute name="minversion" type="xs:string" /> | |
27 | <xs:attribute name="file" type="xs:string" /> | |
28 | </xs:extension> | |
29 | </xs:simpleContent> | |
30 | </xs:complexType> | |
2ee2acec | 31 | |
61d010dd | 32 | <!-- optional package element --> |
a314770a MW |
33 | <xs:complexType name="optionalPackage"> |
34 | <xs:simpleContent> | |
35 | <xs:extension base="xs:string"> | |
a314770a MW |
36 | <xs:attribute name="file" type="xs:string" use="required" /> |
37 | </xs:extension> | |
38 | </xs:simpleContent> | |
39 | </xs:complexType> | |
2ee2acec | 40 | |
61d010dd | 41 | <!-- excluded package element --> |
a314770a MW |
42 | <xs:complexType name="excludedPackage"> |
43 | <xs:simpleContent> | |
44 | <xs:extension base="xs:string"> | |
45 | <xs:attribute name="version" type="xs:string" /> | |
46 | </xs:extension> | |
47 | </xs:simpleContent> | |
48 | </xs:complexType> | |
89484ba0 AE |
49 | |
50 | <!-- api compatibility version element --> | |
51 | <xs:complexType name="apiVersion"> | |
52 | <xs:simpleContent> | |
53 | <xs:extension base="xs:string"> | |
54 | <xs:attribute name="version" type="xs:integer" use="required" /> | |
55 | </xs:extension> | |
56 | </xs:simpleContent> | |
57 | </xs:complexType> | |
58 | ||
61d010dd | 59 | <!-- instructions elements --> |
a314770a MW |
60 | <xs:complexType name="instructions"> |
61 | <xs:sequence> | |
2ee2acec OB |
62 | <xs:sequence> |
63 | <xs:element name="instruction" maxOccurs="unbounded" type="instructionType"/> | |
64 | </xs:sequence> | |
a314770a | 65 | </xs:sequence> |
2ee2acec | 66 | <xs:attribute name="type" type="instructionTypes" use="required" /> |
a314770a MW |
67 | <xs:attribute name="fromversion" type="woltlab_varchar" /> |
68 | </xs:complexType> | |
2ee2acec | 69 | |
61d010dd | 70 | <!-- instruction type attribute --> |
2ee2acec | 71 | <xs:simpleType name="instructionTypes"> |
a314770a MW |
72 | <xs:restriction base="xs:string"> |
73 | <xs:enumeration value="install" /> | |
74 | <xs:enumeration value="update" /> | |
75 | </xs:restriction> | |
76 | </xs:simpleType> | |
2ee2acec | 77 | |
61d010dd | 78 | <!-- package information element --> |
a314770a | 79 | <xs:complexType name="packageInformation"> |
9f2aa693 | 80 | <xs:choice maxOccurs="unbounded"> |
a314770a MW |
81 | <xs:element name="packagename" minOccurs="1" maxOccurs="unbounded"> |
82 | <xs:complexType> | |
83 | <xs:simpleContent> | |
84 | <xs:extension base="woltlab_varchar"> | |
85 | <xs:attribute name="language" type="xs:string" /> | |
86 | </xs:extension> | |
87 | </xs:simpleContent> | |
88 | </xs:complexType> | |
89 | </xs:element> | |
90 | <xs:element name="packagedescription" minOccurs="0" maxOccurs="unbounded"> | |
91 | <xs:complexType> | |
92 | <xs:simpleContent> | |
93 | <xs:extension base="xs:string"> | |
94 | <xs:attribute name="language" type="xs:string" /> | |
95 | </xs:extension> | |
96 | </xs:simpleContent> | |
97 | </xs:complexType> | |
98 | </xs:element> | |
2ee2acec | 99 | <xs:element name="applicationdirectory" type="woltlab_varchar" minOccurs="0" maxOccurs="1" /> |
d4245281 | 100 | <xs:element name="packageurl" type="xs:anyURI" minOccurs="0" maxOccurs="1" /> |
aac1247e | 101 | <xs:element name="isapplication" type="woltlab_boolean" minOccurs="0" maxOccurs="1" /> |
a314770a MW |
102 | <xs:element name="version" type="woltlab_varchar" minOccurs="1" maxOccurs="1" /> |
103 | <xs:element name="date" type="xs:date" minOccurs="1" maxOccurs="1" /> | |
9f2aa693 | 104 | </xs:choice> |
a314770a | 105 | </xs:complexType> |
2ee2acec | 106 | |
61d010dd | 107 | <!-- author information element --> |
a314770a MW |
108 | <xs:complexType name="authorInformation"> |
109 | <xs:all> | |
110 | <xs:element name="author" type="woltlab_varchar" minOccurs="1" /> | |
111 | <xs:element name="authorurl" type="xs:anyURI" minOccurs="0" /> | |
112 | </xs:all> | |
113 | </xs:complexType> | |
2ee2acec | 114 | |
61d010dd | 115 | <!-- required packages element --> |
a314770a MW |
116 | <xs:complexType name="requiredPackages"> |
117 | <xs:sequence> | |
118 | <xs:element name="requiredpackage" type="simplePackage" minOccurs="0" maxOccurs="unbounded" /> | |
119 | </xs:sequence> | |
120 | </xs:complexType> | |
2ee2acec | 121 | |
61d010dd | 122 | <!-- optional packages element --> |
a314770a MW |
123 | <xs:complexType name="optionalPackages"> |
124 | <xs:sequence> | |
125 | <xs:element name="optionalpackage" type="optionalPackage" minOccurs="0" maxOccurs="unbounded" /> | |
126 | </xs:sequence> | |
127 | </xs:complexType> | |
2ee2acec | 128 | |
61d010dd | 129 | <!-- excluded packages element --> |
a314770a MW |
130 | <xs:complexType name="excludedPackages"> |
131 | <xs:sequence> | |
132 | <xs:element name="excludedpackage" type="excludedPackage" minOccurs="0" maxOccurs="unbounded" /> | |
133 | </xs:sequence> | |
134 | </xs:complexType> | |
89484ba0 AE |
135 | |
136 | <!-- api compatibility element --> | |
137 | <xs:complexType name="compatibility"> | |
138 | <xs:sequence> | |
139 | <xs:element name="api" type="apiVersion" minOccurs="1" maxOccurs="unbounded" /> | |
140 | </xs:sequence> | |
141 | </xs:complexType> | |
2ee2acec OB |
142 | |
143 | <xs:complexType name="instructionType"> | |
144 | <xs:simpleContent> | |
145 | <xs:extension base="xs:string"> | |
146 | <xs:attribute name="type" use="required" type="woltlab_varchar"/> | |
147 | <xs:attribute name="application" type="woltlab_varchar"/> | |
148 | <xs:attribute name="run" type="woltlab_varchar"/> | |
149 | <xs:attribute name="flushCache" type="xs:boolean"/> | |
150 | </xs:extension> | |
151 | </xs:simpleContent> | |
152 | </xs:complexType> | |
a314770a | 153 | </xs:schema> |