1 <?xml version="1.0" encoding="utf-8"?>
2 <xs:schema targetNamespace="http://openpandora.org/namespaces/PXML" xmlns="http://openpandora.org/namespaces/PXML" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
5 <!-- declare some simpleTypes for later usage -->
7 <!-- Specify params allows with the 'x11' entry in exec -->
8 <xs:simpleType name="x11Param">
9 <xs:restriction base="xs:string">
10 <xs:enumeration value="req" />
11 <xs:enumeration value="stop" />
12 <xs:enumeration value="ignore" />
16 <!-- Specify the valid documentation formats in the <info> block -->
17 <xs:simpleType name="docType">
18 <xs:restriction base="xs:string">
19 <xs:enumeration value="text/html" />
20 <xs:enumeration value="text/plain" />
24 <!-- Make sure that version numbers only consist of letters, numbers and + as well as - -->
25 <xs:simpleType name="versionNumber">
26 <xs:restriction base="xs:string">
27 <xs:minLength value="1"/>
28 <xs:pattern value="[a-zA-Z0-9+-]*" />
32 <!-- Specify what is valid as release type -->
33 <xs:simpleType name="releaseType">
34 <xs:restriction base="xs:string">
35 <xs:enumeration value="alpha" />
36 <xs:enumeration value="beta" />
37 <xs:enumeration value="release" />
41 <!-- Specify what makes an email address "valid" -->
42 <xs:simpleType name="emailAddress">
43 <xs:restriction base="xs:string">
44 <xs:pattern value="[^@]+@[^\.]+\..+"/>
48 <!-- some restrictions regarding file names that are eg not allowed/possible when using sd cards formated as fat32 -->
49 <xs:simpleType name="dumbPath">
50 <xs:restriction base="xs:normalizedString">
51 <xs:pattern value="[^?>:]+" />
54 <xs:simpleType name="dumbFolderName">
55 <xs:restriction base="xs:normalizedString">
56 <xs:pattern value="[^?>:/]+" />
60 <!-- Specify lang codes -->
61 <xs:simpleType name="isoLangcode">
62 <xs:restriction base="xs:string">
63 <xs:minLength value="2"/>
64 <xs:pattern value="[a-zA-Z]{2,3}(_[a-zA-Z0-9]{2,3})*" />
67 <xs:simpleType name="isoLangcode_en_US">
68 <xs:restriction base="xs:string">
69 <xs:enumeration value="en_US" />
73 <!-- Definition of all allowed categories following the FDO specs -->
74 <xs:simpleType name="fdoCategory">
75 <xs:restriction base="xs:string">
76 <xs:pattern value="AudioVideo|Audio|Video|Development|Education|Game|Graphics|Network|Office|Settings|System|Utility"/>
79 <!-- Definition of all allowed subcategories following the FDO specs (should be based upon the given main categories, but would significantly increase complexity of the schema) -->
80 <xs:simpleType name="fdoSubCategory">
81 <xs:restriction base="xs:string">
82 <xs:pattern value="Building|Debugger|IDE|GUIDesigner|Profiling|RevisionControl|Translation|Calendar|ContactManagement|Database|Dictionary|Chart|Email|Finance|FlowChart|PDA|ProjectManagement|Presentation|Spreadsheet|WordProcessor|2DGraphics|VectorGraphics|RasterGraphics|3DGraphics|Scanning|OCR|Photography|Publishing|Viewer|TextTools|DesktopSettings|HardwareSettings|Printing|PackageManager|Dialup|InstantMessaging|Chat|IRCClient|FileTransfer|HamRadio|News|P2P|RemoteAccess|Telephony|TelephonyTools|VideoConference|WebBrowser|WebDevelopment|Midi|Mixer|Sequencer|Tuner|TV|AudioVideoEditing|Player|Recorder|DiscBurning|ActionGame|AdventureGame|ArcadeGame|BoardGame|BlocksGame|CardGame|KidsGame|LogicGame|RolePlaying|Simulation|SportsGame|StrategyGame|Art|Construction|Music|Languages|Science|ArtificialIntelligence|Astronomy|Biology|Chemistry|ComputerScience|DataVisualization|Economy|Electricity|Geography|Geology|Geoscience|History|ImageProcessing|Literature|Math|NumericalAnalysis|MedicalSoftware|Physics|Robotics|Sports|ParallelComputing|Amusement|Archiving|Compression|Electronics|Emulator|Engineering|FileTools|FileManager|TerminalEmulator|Filesystem|Monitor|Security|Accessibility|Calculator|Clock|TextEditor|Documentation|Core|KDE|GNOME|GTK|Qt|Motif|Java|ConsoleOnly"/>
86 <!-- Create some way to enforce entries to be nonempty -->
87 <xs:simpleType name="nonempty_token">
88 <xs:restriction base="xs:token">
89 <xs:minLength value="1"/>
92 <xs:simpleType name="nonempty_string">
93 <xs:restriction base="xs:string">
94 <xs:minLength value="1"/>
97 <xs:simpleType name="nonempty_normalizedString">
98 <xs:restriction base="xs:string">
99 <xs:minLength value="1"/>
105 <!-- declare some complexTypes for later usage -->
107 <!-- type used for file associations -->
108 <xs:complexType name="association_data">
109 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
110 <xs:attribute name="filetype" use="required" type="nonempty_token" />
111 <xs:attribute name="exec" use="required" type="nonempty_token" />
114 <!-- type used for author info -->
115 <xs:complexType name="author_data">
116 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
117 <xs:attribute name="website" use="optional" type="xs:anyURI" />
118 <xs:attribute name="email" use="optional" type="emailAddress" />
121 <!-- type used for version informations (full entry) -->
122 <xs:complexType name="app_version_info">
123 <xs:attribute name="major" use="required" type="versionNumber" />
124 <xs:attribute name="minor" use="required" type="versionNumber" />
125 <xs:attribute name="release" use="required" type="versionNumber" />
126 <xs:attribute name="build" use="required" type="versionNumber" />
127 <xs:attribute name="type" use="optional" type="releaseType" />
129 <!-- type used for OS version information (os version only) -->
130 <xs:complexType name="os_version_info">
131 <xs:attribute name="major" use="required" type="xs:nonNegativeInteger" />
132 <xs:attribute name="minor" use="required" type="xs:nonNegativeInteger" />
133 <xs:attribute name="release" use="required" type="xs:nonNegativeInteger" />
134 <xs:attribute name="build" use="required" type="xs:nonNegativeInteger" />
137 <!-- type used for exec entries -->
138 <xs:complexType name="exec_params">
139 <xs:attribute name="command" use="required" type="nonempty_token" />
140 <xs:attribute name="arguments" use="optional" type="nonempty_token" />
141 <xs:attribute name="background" use="optional" type="xs:boolean" />
142 <xs:attribute name="startdir" use="optional" type="dumbPath" />
143 <xs:attribute name="standalone" use="optional" type="xs:boolean" />
144 <xs:attribute name="x11" use="optional" type="x11Param" />
147 <!-- type used for tiles or descriptions, once in 'normal' version, once enforcing usage of en_US -->
148 <xs:complexType name="title_or_description">
150 <xs:extension base="nonempty_string">
151 <xs:attribute name="lang" use="required" type="isoLangcode" />
155 <xs:complexType name="title_or_description_enUS">
157 <xs:extension base="nonempty_string">
158 <xs:attribute name="lang" use="required" type="isoLangcode_en_US" />
163 <!-- type used for referencing images -->
164 <xs:complexType name="image_entry">
165 <xs:attribute name="src" use="required" type="dumbPath" />
168 <!-- type for referencing manuals/readme docs -->
169 <xs:complexType name="information_entry">
170 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
171 <xs:attribute name="type" use="required" type="docType" />
172 <xs:attribute name="src" use="required" type="dumbPath" />
175 <!-- type used for the license information -->
176 <xs:complexType name="license_info">
177 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
178 <xs:attribute name="url" use="optional" type="xs:anyURI" />
179 <xs:attribute name="sourcecodeurl" use="optional" type="xs:anyURI" />
184 <!-- Combine the symple and complex types into the "real" PXML specification -->
186 <xs:element name="PXML">
189 <!-- specify the <package> tag with info about the complete package, information providable:
196 <xs:element name="package" minOccurs="1" maxOccurs="1">
200 <xs:element name="author" type="author_data" minOccurs="1" />
201 <!--App version info-->
202 <xs:element name="version" type="app_version_info" minOccurs="1" />
204 <xs:element name="titles" minOccurs="1">
207 <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
208 <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
213 <xs:element name="descriptions" minOccurs="0">
216 <xs:element name="title" type="title_or_description_enUS" minOccurs="0" maxOccurs="1" />
217 <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
222 <xs:element name="icon" type="image_entry" minOccurs="0" />
225 <xs:attribute name="id" use="required" type="dumbFolderName" />
228 <!-- specify the <application> tag with info about a single program
231 version (of the application)
232 osversion (min OS version supported)
233 title(s) (allowing compatibility to <HF6, too!)
234 description(s) (allowing compatibility to <HF6, too!)
238 info/manual/readme entry
240 associations to file types
243 <xs:element name="application" minOccurs="1" maxOccurs="unbounded">
246 <!--Execution params -->
247 <xs:element name="exec" type="exec_params" minOccurs="1" />
249 <xs:element name="author" type="author_data" minOccurs="1" />
250 <!--App version info-->
251 <xs:element name="version" type="app_version_info" minOccurs="1" />
252 <!--OS Version info-->
253 <xs:element name="osversion" type="os_version_info" minOccurs="0" />
255 <!-- via <titles> element, used for HF6+ -->
256 <xs:element name="titles" minOccurs="1">
259 <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
260 <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
265 <!-- via <title> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
266 <xs:element name="title" type="title_or_description_enUS" minOccurs="0" />
268 <!-- via <descriptions> element, used for HF6+ -->
269 <xs:element name="descriptions" minOccurs="0">
272 <xs:element name="description" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
273 <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
278 <!-- via <description> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
279 <xs:element name="description" type="title_or_description_enUS" minOccurs="0" />
281 <xs:element name="icon" type="image_entry" minOccurs="0" />
283 <xs:element name="licenses" minOccurs="1">
286 <xs:element name="license" type="license_info" minOccurs="1" maxOccurs="unbounded" />
291 <xs:element name="previewpics" minOccurs="0">
294 <xs:element name="pic" type="image_entry" minOccurs="0" maxOccurs="unbounded" />
298 <!--Info (aka manual or readme entry)-->
299 <xs:element name="info" type="information_entry" minOccurs="0" />
301 <xs:element name="categories" minOccurs="1">
304 <xs:element name="category" minOccurs="1" maxOccurs="unbounded">
307 <xs:element name="subcategory" minOccurs="0" maxOccurs="unbounded">
309 <xs:attribute name="name" type="fdoSubCategory" />
313 <xs:attribute name="name" use="required" type="fdoCategory" />
320 <xs:element name="associations" minOccurs="0">
323 <xs:element name="association" type="association_data" maxOccurs="unbounded" />
328 <xs:element name="clockspeed" minOccurs="0">
330 <xs:attribute name="frequency" use="required" type="xs:positiveInteger" />
335 <xs:attribute name="id" use="required" type="dumbFolderName" />
336 <xs:attribute name="appdata" use="optional" type="dumbFolderName" />