aboutsummaryrefslogtreecommitdiffstats
path: root/src/resources/entities/sitemap-v02.dtd
blob: 7e34e8f89955c167825929ebc5a982ce7215eefc (plain)
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!-- ===================================================================

     Apache Cocoon Sitemap DTD (Version 0.2)

PURPOSE:
  INITIAL DRAFT DTD for the Cocoon2 sitemap.xmap files.

TYPICAL INVOCATION:

  <!DOCTYPE map:sitemap PUBLIC
       "-//APACHE//DTD Cocoon Sitemap Vx.yz//EN"
       "sitemap-vxyz.dtd">

  where

    x := major version
    y := minor version
    z := status identifier (optional)

NOTES:
* ATTENTION: This initial DTD was reverse-engineered from the various
  sitemap.xmap instances included in the current distribution. This is
  just an attempt to document the existing rules for sitemap structure.
  In many cases a very lax content model is used, simply to get around
  validation issues.
  A proper design process is still required.
* Needed by XML editing tools for creation of reliable documents.
* Can generate XSD once DTD is locked down.
* We need to synchronise this DTD with the relax-ng work
  by <Bruno.Dumon@the-ecorp.com> ... cocoon-dev 2001-07-18
  http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=99545886226916&w=2
* This DTD has been tested with various XML validating parsers.
* The big questions (still) are: 
  "What possibilities were not included in the examples?" and 
  "What in the example sitemap.xmap files is mandatory versus optional?"

AUTHORS:
  Jeffrey Ricker NG (Usonia Holdings) <rickerng@usonia.net>
  David Crossley <crossley@indexgeo.com.au>

FIXME:
  - map:act is used in various contexts, so it has a loose definition
  - Completely rewrite this DTD looking from the application
    point-of-view (do not rely on this temporary initial DTD)
  - map:when and map:otherwise are shown in xdocs/sitemap.xml but are
    not used in the sitemap.xmap files
  - align elements and attributes with sitemap*.xsl
  - review all xdocs/userdocs/generators/*.xml etc. and sync with this DTD

CHANGE HISTORY:
  20010715 V0.1 Initial version. (RNG)
  20011106 V0.2 Reviewed all */sitemap.xmap and added definitions (DC)
  20011106 V0.2 All elements now have "map:" prefix. (DC)
  20011106 V0.2 Incorporated comments Bruno Dumon cocoon-dev 20010718 (DC)
  20011116 V0.2 Changes from label/view discussion cocoon-dev 20011115 (DC)
  20011219 V0.2 Deprecated 'redirect-to resource'. Added 'map:call resource'(CH)

==================================================================== -->

<!ELEMENT map:sitemap (map:components, map:views?, map:resources?,
                       map:action-sets?, map:pipelines)>
<!ATTLIST map:sitemap
        xmlns:map CDATA #FIXED "http://apache.org/cocoon/sitemap/1.0"
>

<!-- =============================================================== -->
<!-- Components -->
<!-- =============================================================== -->

<!ELEMENT map:components (map:generators, map:transformers, map:readers,
                          map:serializers, map:selectors?, map:matchers?,
                          map:actions?)>
<!-- RNG: must they appear in this order?
          must they all appear, even if they are empty? -->
<!-- DC: it seems that some sitemaps do not contain all components
         e.g. documentation/sitemap.xmap does not have map:selectors -->

  <!-- Generators ======================================== -->
<!ELEMENT map:generators (map:generator*)>
<!ATTLIST map:generators
        default CDATA #IMPLIED
>
<!ELEMENT map:generator EMPTY>
<!ATTLIST map:generator
        name CDATA #REQUIRED
        src CDATA #REQUIRED
        label CDATA #IMPLIED
        pool-max CDATA #IMPLIED
        pool-min CDATA #IMPLIED
        pool-grow CDATA #IMPLIED
>

<!-- RNG: with all attributes, which are required and which are implied? -->

  <!-- Transformers ====================================== -->
<!ELEMENT map:transformers (map:transformer*)>
<!ATTLIST map:transformers
        default CDATA #IMPLIED
>
<!ELEMENT map:transformer ANY>
<!-- RNG: surely the content is not ANY. However, there were so many
          children here that I did not know where to begin -->
<!-- DC: here are some that are currently used -->
<!ELEMENT use-store (#PCDATA)>
<!ELEMENT use-request-parameters (#PCDATA)>
<!ELEMENT use-browser-capabilities-db (#PCDATA)>
<!ELEMENT catalogue-name (#PCDATA)>
<!ELEMENT catalogue-location (#PCDATA)>
<!ATTLIST map:transformer
        name CDATA #REQUIRED
        src CDATA #REQUIRED
        label CDATA #IMPLIED
        pool-max CDATA #IMPLIED
        pool-min CDATA #IMPLIED
        pool-grow CDATA #IMPLIED
>

  <!-- Readers =========================================== -->
<!ELEMENT map:readers (map:reader*)>
<!ATTLIST map:readers
        default CDATA #IMPLIED
>
<!ELEMENT map:reader EMPTY>
<!-- RNG: does reader ever have children? Its peers do. -->
<!ATTLIST map:reader
        name CDATA #REQUIRED
        src CDATA #REQUIRED
>

  <!-- Serializers ======================================= -->
<!ELEMENT map:serializers (map:serializer*)>
<!ATTLIST map:serializers
        default CDATA #IMPLIED
>
<!ELEMENT map:serializer (doctype-public|doctype-system|encoding|
                          omit-xml-declaration|parameter)*>
<!-- RNG: are these the only children of serializer? -->
<!ATTLIST map:serializer
        name CDATA #REQUIRED
        mime-type CDATA #REQUIRED
        src CDATA #REQUIRED
        pool-max CDATA #IMPLIED
        pool-min CDATA #IMPLIED
        pool-grow CDATA #IMPLIED
>
<!ELEMENT doctype-public (#PCDATA)>
<!ELEMENT doctype-system (#PCDATA)>
<!ELEMENT encoding (#PCDATA)>
<!ELEMENT omit-xml-declaration (#PCDATA)>
<!ELEMENT parameter EMPTY>
<!ATTLIST parameter
        name CDATA #REQUIRED
        value CDATA #REQUIRED
        type CDATA #IMPLIED
>

  <!-- Selectors ========================================= -->
<!ELEMENT map:selectors (map:selector*)>
<!ATTLIST map:selectors
        default CDATA #IMPLIED
>
<!ELEMENT map:selector (browser*)>
<!ATTLIST map:selector
        name CDATA #REQUIRED
        src CDATA #REQUIRED
>
<!ELEMENT browser EMPTY>
<!ATTLIST browser
        name CDATA #REQUIRED
        useragent CDATA #REQUIRED
>

  <!-- Matchers ========================================== -->
<!ELEMENT map:matchers (map:matcher*)>
<!ATTLIST map:matchers
        default CDATA #IMPLIED
>
<!ELEMENT map:matcher (attribute-name|parameter-name|header-name)*>
<!ATTLIST map:matcher
        name CDATA #REQUIRED
        src CDATA #REQUIRED
>
<!ELEMENT attribute-name (#PCDATA)>
<!ELEMENT parameter-name (#PCDATA)>
<!ELEMENT header-name (#PCDATA)>

  <!-- Actions =========================================== -->
<!ELEMENT map:actions (map:action*)>
<!ATTLIST map:actions
        default CDATA #IMPLIED
>
<!ELEMENT map:action EMPTY>
<!ATTLIST map:action
        name CDATA #REQUIRED
        src CDATA #REQUIRED
>

<!-- =============================================================== -->
<!-- Views -->
<!-- =============================================================== -->

<!ELEMENT map:views (map:view*)>
<!ELEMENT map:view (map:transform*,map:serialize)>
<!ATTLIST map:view
        name CDATA #REQUIRED
        from-label CDATA #IMPLIED
        from-position (first|last) "last"
>
<!ELEMENT map:serialize (map:parameter*)>
<!ATTLIST map:serialize
        type CDATA #REQUIRED
        mime-type CDATA #IMPLIED
        status-code CDATA #IMPLIED
>

<!-- =============================================================== -->
<!-- Resources -->
<!-- =============================================================== -->

<!ELEMENT map:resources (map:resource*)>
<!ELEMENT map:resource ((map:generate,map:transform+,map:serialize) | map:act)>
<!ATTLIST map:resource
        name CDATA #REQUIRED
>
<!-- generate and transform defined in PIPELINE section -->

<!-- =============================================================== -->
<!-- Action Sets -->
<!-- =============================================================== -->

<!ELEMENT map:action-sets (map:action-set*)>
<!ELEMENT map:action-set (map:act+)>
<!ATTLIST map:action-set
        name CDATA #REQUIRED
>
<!ELEMENT map:act (map:parameter|map:redirect-to|map:call|map:generate|
                   map:transform|map:serialize|map:act|map:match)*>
<!ATTLIST map:act
        type CDATA #IMPLIED
        action CDATA #IMPLIED
        set CDATA #IMPLIED
>

<!-- =============================================================== -->
<!-- Pipelines -->
<!-- =============================================================== -->

<!ELEMENT map:pipelines (map:pipeline*)>
<!ELEMENT map:pipeline (map:match*, map:handle-errors?)>

<!ELEMENT map:match (map:mount | map:redirect-to | map:call | map:generate |
                     map:transform | map:serialize | map:read |
                     map:aggregate | map:act | map:match)*>
<!-- RNG: It seemed from the example that match should be defined as
  match (map:mount*|map:redirect-to*|(map:generate*,map:transform*,map:serialize*)*|map:read*|map:aggregate*)
  but I have no way of knowing.
-->
<!-- DC: Now map:act complicates the content model even further -->
<!ATTLIST map:match
        type CDATA #IMPLIED
        pattern CDATA #REQUIRED
>

<!-- map:act is already defined in the Action Sets section -->

<!ELEMENT map:mount EMPTY>
<!ATTLIST map:mount
        uri-prefix CDATA #REQUIRED
        src CDATA #REQUIRED
        reload-method (synchron|asynchron) "asynchron"
        check-reload (true|false|yes|no) "no"
>

<!ELEMENT map:redirect-to EMPTY>
<!ATTLIST map:redirect-to
        uri CDATA #IMPLIED
        session (true|false|yes|no) "no"
>
<!-- CH: redirects to resources are now deprecated
<!ATTLIST map:redirect-to
        uri CDATA #IMPLIED
        resource CDATA #IMPLIED
        target CDATA #IMPLIED
        session (true|false|yes|no) "no"
>
-->

<!ELEMENT map:call (map:parameter*)>
<!ATTLIST map:call
        resource CDATA #REQUIRED
>

<!ELEMENT map:generate (map:parameter*)>
<!ATTLIST map:generate
        type CDATA #IMPLIED
        src CDATA #IMPLIED
        label CDATA #IMPLIED
>
<!ELEMENT map:parameter EMPTY>
<!ATTLIST map:parameter
        name CDATA #REQUIRED
        value CDATA #REQUIRED
>

<!ELEMENT map:transform (map:parameter*)>
<!ATTLIST map:transform
        type CDATA #IMPLIED
        src CDATA #IMPLIED
        label CDATA #IMPLIED
>

<!-- map:serialize is already defined in VIEWS section -->

<!ELEMENT map:read EMPTY>
<!ATTLIST map:read
        src CDATA #REQUIRED
        mime-type CDATA #REQUIRED
        type CDATA #IMPLIED
>

<!ELEMENT map:aggregate (map:part*)>
<!ATTLIST map:aggregate
        element CDATA #IMPLIED
        prefix CDATA #IMPLIED
        ns CDATA #IMPLIED
        label CDATA #IMPLIED
>
<!ELEMENT map:part EMPTY>
<!ATTLIST map:part
        src CDATA #IMPLIED
        element CDATA #IMPLIED
        ns CDATA #IMPLIED
        strip-root CDATA #IMPLIED
        label CDATA #IMPLIED
>

<!ELEMENT map:handle-errors (map:generate*,map:transform*,map:serialize*)>

<!-- =============================================================== -->
<!-- End of DTD -->
<!-- =============================================================== -->