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 as well as os version) -->
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 <xs:complexType name="os_version_info">
130 <xs:attribute name="major" use="required" type="versionNumber" />
131 <xs:attribute name="minor" use="required" type="versionNumber" />
132 <xs:attribute name="release" use="required" type="versionNumber" />
133 <xs:attribute name="build" use="required" type="versionNumber" />
136 <!-- type used for exec entries -->
137 <xs:complexType name="exec_params">
138 <xs:attribute name="command" use="required" type="nonempty_token" />
139 <xs:attribute name="arguments" use="optional" type="nonempty_token" />
140 <xs:attribute name="background" use="optional" type="xs:boolean" />
141 <xs:attribute name="startdir" use="optional" type="dumbPath" />
142 <xs:attribute name="standalone" use="optional" type="xs:boolean" />
143 <xs:attribute name="x11" use="optional" type="x11Param" />
146 <!-- type used for tiles or descriptions, once in 'normal' version, once enforcing usage of en_US -->
147 <xs:complexType name="title_or_description">
149 <xs:extension base="nonempty_string">
150 <xs:attribute name="lang" use="required" type="isoLangcode" />
154 <xs:complexType name="title_or_description_enUS">
156 <xs:extension base="nonempty_string">
157 <xs:attribute name="lang" use="required" type="isoLangcode_en_US" />
162 <!-- type used for referencing images -->
163 <xs:complexType name="image_entry">
164 <xs:attribute name="src" use="required" type="dumbPath" />
167 <!-- type for referencing manuals/readme docs -->
168 <xs:complexType name="information_entry">
169 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
170 <xs:attribute name="type" use="required" type="docType" />
171 <xs:attribute name="src" use="required" type="dumbPath" />
174 <!-- type used for the license information -->
175 <xs:complexType name="license_info">
176 <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
177 <xs:attribute name="url" use="optional" type="xs:anyURI" />
178 <xs:attribute name="sourcecodeurl" use="optional" type="xs:anyURI" />
183 <!-- Combine the symple and complex types into the "real" PXML specification -->
185 <xs:element name="PXML">
188 <!-- specify the <package> tag with info about the complete package, information providable:
195 <xs:element name="package" minOccurs="1" maxOccurs="1">
199 <xs:element name="author" type="author_data" minOccurs="1" />
200 <!--App version info-->
201 <xs:element name="version" type="app_version_info" minOccurs="1" />
203 <xs:element name="titles" minOccurs="1">
206 <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
207 <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
212 <xs:element name="descriptions" minOccurs="0">
215 <xs:element name="title" type="title_or_description_enUS" minOccurs="0" maxOccurs="1" />
216 <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
221 <xs:element name="icon" type="image_entry" minOccurs="0" />
224 <xs:attribute name="id" use="required" type="dumbFolderName" />
227 <!-- specify the <application> tag with info about a single program
230 version (of the application)
231 osversion (min OS version supported)
232 title(s) (allowing compatibility to <HF6, too!)
233 description(s) (allowing compatibility to <HF6, too!)
237 info/manual/readme entry
239 associations to file types
242 <xs:element name="application" minOccurs="1" maxOccurs="unbounded">
245 <!--Execution params -->
246 <xs:element name="exec" type="exec_params" minOccurs="1" />
248 <xs:element name="author" type="author_data" minOccurs="1" />
249 <!--App version info-->
250 <xs:element name="version" type="app_version_info" minOccurs="1" />
251 <!--OS Version info-->
252 <xs:element name="osversion" type="os_version_info" minOccurs="0" />
254 <!-- via <titles> element, used for HF6+ -->
255 <xs:element name="titles" minOccurs="1">
258 <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
259 <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
264 <!-- via <title> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
265 <xs:element name="title" type="title_or_description_enUS" minOccurs="0" />
267 <!-- via <descriptions> element, used for HF6+ -->
268 <xs:element name="descriptions" minOccurs="0">
271 <xs:element name="description" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
272 <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
277 <!-- via <description> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
278 <xs:element name="description" type="title_or_description_enUS" minOccurs="0" />
280 <xs:element name="icon" type="image_entry" minOccurs="0" />
282 <xs:element name="licenses" minOccurs="1">
285 <xs:element name="license" type="license_info" minOccurs="1" maxOccurs="unbounded" />
290 <xs:element name="previewpics" minOccurs="0">
293 <xs:element name="pic" type="image_entry" minOccurs="0" maxOccurs="unbounded" />
297 <!--Info (aka manual or readme entry)-->
298 <xs:element name="info" type="information_entry" minOccurs="0" />
300 <xs:element name="categories" minOccurs="1">
303 <xs:element name="category" minOccurs="1" maxOccurs="unbounded">
306 <xs:element name="subcategory" minOccurs="0" maxOccurs="unbounded">
308 <xs:attribute name="name" type="fdoSubCategory" />
312 <xs:attribute name="name" use="required" type="fdoCategory" />
319 <xs:element name="associations" minOccurs="0">
322 <xs:element name="association" type="association_data" maxOccurs="unbounded" />
327 <xs:element name="clockspeed" minOccurs="0">
329 <xs:attribute name="frequency" use="required" type="xs:positiveInteger" />
334 <xs:attribute name="id" use="required" type="dumbFolderName" />
335 <xs:attribute name="appdata" use="optional" type="dumbFolderName" />