forked from tharman/SADE
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.xsd
320 lines (316 loc) · 13.7 KB
/
config.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml" elementFormDefault="unqualified">
<!-- Importing XHTML namespace -->
<xs:import namespace="http://www.w3.org/1999/xhtml"
schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"/>
<xs:annotation>
<xs:documentation>
This schema is primarily meant for documentation of the available options in the config.
The listing of parameter-keys is not exhaustive, i.e. some configurations may not validate.
</xs:documentation>
</xs:annotation>
<xs:simpleType name="config_keys">
<xs:restriction base="xs:NCName">
<xs:enumeration value="project-id">
<xs:annotation>
<xs:documentation>
This param provides an ID for the project. May be used as JavaScrpt object property identifier and XML ID
so the set of valid characters is restricted.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="project-title">
<xs:annotation>
<xs:documentation>
This param provides a intelligable name for the project.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="logo-image">
<xs:annotation>
<xs:documentation>
This param provides a path to a logo for this project which is inserted by the app:logo function in
cr-xq/core/app.xql into a tag of class "app:logo". Eg. there is a span tag for this purpose in the minimal template's
head.html. The path is relative to "%location_of_config.xml%/static".
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="teaser-image">
<xs:annotation>
<xs:documentation>
This param provides a path to a logo for this project which is used by the app:list-projects function in
cr-xq/core/app.xql. The path is relative to "%location_of_config.xml%/static".
The app:list-projects function is normally used in the "default" project, not providing any data itself,
just giving an overview of the available projects.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="teaser-text">
<xs:annotation>
<xs:documentation>
This param provides a short summary text for this project which is used by the app:list-projects function in
cr-xq/core/app.xql.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="visibility">
<xs:annotation>
<xs:documentation>
If "protected" only users listed in a "users" parameter have access rights.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="users">
<xs:annotation>
<xs:documentation>
Users which have access rights if the "visibility" is "protected".
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="template">
<xs:annotation>
<xs:documentation>
This param provides a reference to a template to be used for the project.
Change the template for the project by changing the param template!
TODO: how to distinguish between (sade-)global and (project-)local templates?
Possible values are e.g. "minimal" or "stb-template". Possible templates can be enumerated in
/db/apps/cr-xq/templates.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="data-dir">
<xs:annotation>
<xs:documentation>
The directory where the data is to be found in the exist directory structure.
E.g. /db/cr-data/%project-name%/sth/sth-else/etc.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="pages-dir">
<xs:annotation>
<xs:documentation>
Expected by the facsviewer-module
The directory where the data split page wise is to be found in the exist directory structure.
E.g. /db/cr-data/%project-name%/pages.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="orig-data-dir">
<xs:annotation>
<xs:documentation>
OBSOLETED - will be removed
The directory where the data in its original format is to be found in the exist directory structure.
E.g. /db/cr-data/%project-name%/orig.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="metadata-path">
<xs:annotation>
<xs:documentation>
The directory where the meta data is to be found in the exist directory structure.
E.g. /db/cr-data/_md/%project-id%.
Used by the resource-module as base-collection when looking up metadata records for resources.
e.g. %app-root%/%project-id%/get/%md-identifier%
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="module_param_keys">
<xs:restriction base="xs:NCName">
<xs:enumeration value="facs.path">
<xs:annotation>
<xs:documentation>
facsviewer: A URL pointing to the location where the facsimile pictures for this project can be found.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="x-context">
<xs:annotation>
<xs:documentation>
fcs: This param provides the identifier to restrict the search context when querying using HTTP.
The identifier can represent either a whole collection (a sub-project) or an individual resource.
The character set is restricted as this parameter is passed as a URL parameter.
Corresponds to <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.clarin.eu/fcs">http://www.clarin.eu/fcs</a> x-cmd-context.
The identifier must have been announced beforehand via the request: %app-url%/%project%/fcs?operation=scan&scanClause=fcs.resource
Thus it is an opaque string to client applications. In other words, whatever given project issues as identifiers for its resources,
it has to be able to interpret it, once confronted with these identifiers sent in the x-context parameter.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="default.dataview">
<xs:annotation>
<xs:documentation>
fcs: define, which dataview shall be served in the searchRetrieveResponse, when nothing explicit requested in the "x-dataview" parameter
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="x-dataview">
<xs:annotation>
<xs:documentation>
fcs: which dataview shall be served in the searchRetrieveResponse (for every record/hit).
This is primarily expected to come as http-request parameter, but it can be also set in the configuration. (Overrides "default.dataview")
allowed value: comma-separated list of values some of: "kwic", "full", "facs", "title", "kwic", "navigation", "xmlescaped"
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="site.name">
<xs:annotation>
<xs:documentation>
fcs: Provides a title for this project visible at the html-views for the fcs endpoint . E.g. %app-url%/%project_id%/fcs?x-format=htmlpage
Will be deprecated in favor of project-title.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="mappings">
<xs:annotation>
<xs:documentation>
fcs: This param provides an absolute path to a file which maps exist indexes search options in SRU searches.
required for fcs-module.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="data.path">
<xs:annotation>
<xs:documentation>
fcs: This param provides an absolute path to the data for this project.
Will be deprecated in favor of data-path
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="scripts.path">
<xs:annotation>
<xs:documentation>
fcs: This param provides an absolute db-path to XSL scripts for this project.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="scan.xsl">
<xs:annotation>
<xs:documentation>
fcs: This param provides a file name for a XSL script to be applied on the XML-result of the fcs:scan-operation to transform into HTML.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="searchRetrieve.xsl">
<xs:annotation>
<xs:documentation>
fcs: This param provides a file name for a XSL script to be applied on the XML-result of the fcs:searchRetrieve-operation to transform into HTML.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cache.path">
<xs:annotation>
<xs:documentation>
fcs: This param provides an absolute path to a location where FCS indexes are being cached.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="index.prefix">
<xs:annotation>
<xs:documentation>
fcs: This param provides an absolute path ??? which will be prefixed to cached FCS indexes.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="module_keys">
<xs:restriction base="xs:NCName">
<xs:enumeration value="fcs">
<xs:annotation>
<xs:documentation>
Identifier for the Federated Content Search (fcs) module.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="facsviewer">
<xs:annotation>
<xs:documentation>
Identifier for the facsimile viewer module (facsviewer).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="aqay">
<xs:annotation>
<xs:documentation>
Identifier for module Automatic Querying and Analysis
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="test">
<xs:annotation>
<xs:documentation>
???
Provide param for the test module.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:element name="config">
<xs:complexType>
<xs:annotation>
<xs:documentation>
Root element for SADE/cr-xq configuration.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="param" maxOccurs="unbounded">
<xs:complexType mixed="true" >
<xs:choice>
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xhtml:link"/>
<xs:element ref="xhtml:style"/>
<xs:element ref="xhtml:script"/>
<xs:element ref="xhtml:div"/>
<xs:element ref="xhtml:p"/>
</xs:choice>
</xs:choice>
<xs:attribute name="key" use="required" type="config_keys"/>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" ref="module"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="container"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="module">
<xs:annotation>
<xs:documentation>
Additional module-specific configuration.
Parameters inside the module element have higher precedence then global parameters.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="param" maxOccurs="unbounded">
<xs:complexType mixed="true">
<xs:attribute name="key" use="required" type="module_param_keys"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="key" use="required" type="module_keys"/>
</xs:complexType>
</xs:element>
<xs:element name="container">
<xs:annotation>
<xs:documentation>
Overrides for some parts of the representation provided by the templates.
Currently only used with the key=html-head, to allow individual projects to inject project-specific stuff (css, js) in the html/head
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xhtml:link"/>
<xs:element ref="xhtml:style"/>
<xs:element ref="xhtml:script"/>
<xs:element ref="xhtml:div"/>
<xs:element ref="xhtml:p"/>
</xs:choice>
<xs:attribute name="key" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
</xs:schema>