You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sitemap-v02.dtd 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <!-- ===================================================================
  2. Apache Cocoon Sitemap DTD (Version 0.2)
  3. PURPOSE:
  4. INITIAL DRAFT DTD for the Cocoon2 sitemap.xmap files.
  5. TYPICAL INVOCATION:
  6. <!DOCTYPE map:sitemap PUBLIC
  7. "-//APACHE//DTD Cocoon Sitemap Vx.yz//EN"
  8. "sitemap-vxyz.dtd">
  9. where
  10. x := major version
  11. y := minor version
  12. z := status identifier (optional)
  13. NOTES:
  14. * ATTENTION: This initial DTD was reverse-engineered from the various
  15. sitemap.xmap instances included in the current distribution. This is
  16. just an attempt to document the existing rules for sitemap structure.
  17. In many cases a very lax content model is used, simply to get around
  18. validation issues.
  19. A proper design process is still required.
  20. * Needed by XML editing tools for creation of reliable documents.
  21. * Can generate XSD once DTD is locked down.
  22. * We need to synchronise this DTD with the relax-ng work
  23. by <Bruno.Dumon@the-ecorp.com> ... cocoon-dev 2001-07-18
  24. http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=99545886226916&w=2
  25. * This DTD has been tested with various XML validating parsers.
  26. * The big questions (still) are:
  27. "What possibilities were not included in the examples?" and
  28. "What in the example sitemap.xmap files is mandatory versus optional?"
  29. AUTHORS:
  30. Jeffrey Ricker NG (Usonia Holdings) <rickerng@usonia.net>
  31. David Crossley <crossley@indexgeo.com.au>
  32. FIXME:
  33. - map:act is used in various contexts, so it has a loose definition
  34. - Completely rewrite this DTD looking from the application
  35. point-of-view (do not rely on this temporary initial DTD)
  36. - map:when and map:otherwise are shown in xdocs/sitemap.xml but are
  37. not used in the sitemap.xmap files
  38. - align elements and attributes with sitemap*.xsl
  39. - review all xdocs/userdocs/generators/*.xml etc. and sync with this DTD
  40. CHANGE HISTORY:
  41. 20010715 V0.1 Initial version. (RNG)
  42. 20011106 V0.2 Reviewed all */sitemap.xmap and added definitions (DC)
  43. 20011106 V0.2 All elements now have "map:" prefix. (DC)
  44. 20011106 V0.2 Incorporated comments Bruno Dumon cocoon-dev 20010718 (DC)
  45. 20011116 V0.2 Changes from label/view discussion cocoon-dev 20011115 (DC)
  46. 20011219 V0.2 Deprecated 'redirect-to resource'. Added 'map:call resource'(CH)
  47. ==================================================================== -->
  48. <!ELEMENT map:sitemap (map:components, map:views?, map:resources?,
  49. map:action-sets?, map:pipelines)>
  50. <!ATTLIST map:sitemap
  51. xmlns:map CDATA #FIXED "http://apache.org/cocoon/sitemap/1.0"
  52. >
  53. <!-- =============================================================== -->
  54. <!-- Components -->
  55. <!-- =============================================================== -->
  56. <!ELEMENT map:components (map:generators, map:transformers, map:readers,
  57. map:serializers, map:selectors?, map:matchers?,
  58. map:actions?)>
  59. <!-- RNG: must they appear in this order?
  60. must they all appear, even if they are empty? -->
  61. <!-- DC: it seems that some sitemaps do not contain all components
  62. e.g. documentation/sitemap.xmap does not have map:selectors -->
  63. <!-- Generators ======================================== -->
  64. <!ELEMENT map:generators (map:generator*)>
  65. <!ATTLIST map:generators
  66. default CDATA #IMPLIED
  67. >
  68. <!ELEMENT map:generator EMPTY>
  69. <!ATTLIST map:generator
  70. name CDATA #REQUIRED
  71. src CDATA #REQUIRED
  72. label CDATA #IMPLIED
  73. pool-max CDATA #IMPLIED
  74. pool-min CDATA #IMPLIED
  75. pool-grow CDATA #IMPLIED
  76. >
  77. <!-- RNG: with all attributes, which are required and which are implied? -->
  78. <!-- Transformers ====================================== -->
  79. <!ELEMENT map:transformers (map:transformer*)>
  80. <!ATTLIST map:transformers
  81. default CDATA #IMPLIED
  82. >
  83. <!ELEMENT map:transformer ANY>
  84. <!-- RNG: surely the content is not ANY. However, there were so many
  85. children here that I did not know where to begin -->
  86. <!-- DC: here are some that are currently used -->
  87. <!ELEMENT use-store (#PCDATA)>
  88. <!ELEMENT use-request-parameters (#PCDATA)>
  89. <!ELEMENT use-browser-capabilities-db (#PCDATA)>
  90. <!ELEMENT catalogue-name (#PCDATA)>
  91. <!ELEMENT catalogue-location (#PCDATA)>
  92. <!ATTLIST map:transformer
  93. name CDATA #REQUIRED
  94. src CDATA #REQUIRED
  95. label CDATA #IMPLIED
  96. pool-max CDATA #IMPLIED
  97. pool-min CDATA #IMPLIED
  98. pool-grow CDATA #IMPLIED
  99. >
  100. <!-- Readers =========================================== -->
  101. <!ELEMENT map:readers (map:reader*)>
  102. <!ATTLIST map:readers
  103. default CDATA #IMPLIED
  104. >
  105. <!ELEMENT map:reader EMPTY>
  106. <!-- RNG: does reader ever have children? Its peers do. -->
  107. <!ATTLIST map:reader
  108. name CDATA #REQUIRED
  109. src CDATA #REQUIRED
  110. >
  111. <!-- Serializers ======================================= -->
  112. <!ELEMENT map:serializers (map:serializer*)>
  113. <!ATTLIST map:serializers
  114. default CDATA #IMPLIED
  115. >
  116. <!ELEMENT map:serializer (doctype-public|doctype-system|encoding|
  117. omit-xml-declaration|parameter)*>
  118. <!-- RNG: are these the only children of serializer? -->
  119. <!ATTLIST map:serializer
  120. name CDATA #REQUIRED
  121. mime-type CDATA #REQUIRED
  122. src CDATA #REQUIRED
  123. pool-max CDATA #IMPLIED
  124. pool-min CDATA #IMPLIED
  125. pool-grow CDATA #IMPLIED
  126. >
  127. <!ELEMENT doctype-public (#PCDATA)>
  128. <!ELEMENT doctype-system (#PCDATA)>
  129. <!ELEMENT encoding (#PCDATA)>
  130. <!ELEMENT omit-xml-declaration (#PCDATA)>
  131. <!ELEMENT parameter EMPTY>
  132. <!ATTLIST parameter
  133. name CDATA #REQUIRED
  134. value CDATA #REQUIRED
  135. type CDATA #IMPLIED
  136. >
  137. <!-- Selectors ========================================= -->
  138. <!ELEMENT map:selectors (map:selector*)>
  139. <!ATTLIST map:selectors
  140. default CDATA #IMPLIED
  141. >
  142. <!ELEMENT map:selector (browser*)>
  143. <!ATTLIST map:selector
  144. name CDATA #REQUIRED
  145. src CDATA #REQUIRED
  146. >
  147. <!ELEMENT browser EMPTY>
  148. <!ATTLIST browser
  149. name CDATA #REQUIRED
  150. useragent CDATA #REQUIRED
  151. >
  152. <!-- Matchers ========================================== -->
  153. <!ELEMENT map:matchers (map:matcher*)>
  154. <!ATTLIST map:matchers
  155. default CDATA #IMPLIED
  156. >
  157. <!ELEMENT map:matcher (attribute-name|parameter-name|header-name)*>
  158. <!ATTLIST map:matcher
  159. name CDATA #REQUIRED
  160. src CDATA #REQUIRED
  161. >
  162. <!ELEMENT attribute-name (#PCDATA)>
  163. <!ELEMENT parameter-name (#PCDATA)>
  164. <!ELEMENT header-name (#PCDATA)>
  165. <!-- Actions =========================================== -->
  166. <!ELEMENT map:actions (map:action*)>
  167. <!ATTLIST map:actions
  168. default CDATA #IMPLIED
  169. >
  170. <!ELEMENT map:action EMPTY>
  171. <!ATTLIST map:action
  172. name CDATA #REQUIRED
  173. src CDATA #REQUIRED
  174. >
  175. <!-- =============================================================== -->
  176. <!-- Views -->
  177. <!-- =============================================================== -->
  178. <!ELEMENT map:views (map:view*)>
  179. <!ELEMENT map:view (map:transform*,map:serialize)>
  180. <!ATTLIST map:view
  181. name CDATA #REQUIRED
  182. from-label CDATA #IMPLIED
  183. from-position (first|last) "last"
  184. >
  185. <!ELEMENT map:serialize (map:parameter*)>
  186. <!ATTLIST map:serialize
  187. type CDATA #REQUIRED
  188. mime-type CDATA #IMPLIED
  189. status-code CDATA #IMPLIED
  190. >
  191. <!-- =============================================================== -->
  192. <!-- Resources -->
  193. <!-- =============================================================== -->
  194. <!ELEMENT map:resources (map:resource*)>
  195. <!ELEMENT map:resource ((map:generate,map:transform+,map:serialize) | map:act)>
  196. <!ATTLIST map:resource
  197. name CDATA #REQUIRED
  198. >
  199. <!-- generate and transform defined in PIPELINE section -->
  200. <!-- =============================================================== -->
  201. <!-- Action Sets -->
  202. <!-- =============================================================== -->
  203. <!ELEMENT map:action-sets (map:action-set*)>
  204. <!ELEMENT map:action-set (map:act+)>
  205. <!ATTLIST map:action-set
  206. name CDATA #REQUIRED
  207. >
  208. <!ELEMENT map:act (map:parameter|map:redirect-to|map:call|map:generate|
  209. map:transform|map:serialize|map:act|map:match)*>
  210. <!ATTLIST map:act
  211. type CDATA #IMPLIED
  212. action CDATA #IMPLIED
  213. set CDATA #IMPLIED
  214. >
  215. <!-- =============================================================== -->
  216. <!-- Pipelines -->
  217. <!-- =============================================================== -->
  218. <!ELEMENT map:pipelines (map:pipeline*)>
  219. <!ELEMENT map:pipeline (map:match*, map:handle-errors?)>
  220. <!ELEMENT map:match (map:mount | map:redirect-to | map:call | map:generate |
  221. map:transform | map:serialize | map:read |
  222. map:aggregate | map:act | map:match)*>
  223. <!-- RNG: It seemed from the example that match should be defined as
  224. match (map:mount*|map:redirect-to*|(map:generate*,map:transform*,map:serialize*)*|map:read*|map:aggregate*)
  225. but I have no way of knowing.
  226. -->
  227. <!-- DC: Now map:act complicates the content model even further -->
  228. <!ATTLIST map:match
  229. type CDATA #IMPLIED
  230. pattern CDATA #REQUIRED
  231. >
  232. <!-- map:act is already defined in the Action Sets section -->
  233. <!ELEMENT map:mount EMPTY>
  234. <!ATTLIST map:mount
  235. uri-prefix CDATA #REQUIRED
  236. src CDATA #REQUIRED
  237. reload-method (synchron|asynchron) "asynchron"
  238. check-reload (true|false|yes|no) "no"
  239. >
  240. <!ELEMENT map:redirect-to EMPTY>
  241. <!ATTLIST map:redirect-to
  242. uri CDATA #IMPLIED
  243. session (true|false|yes|no) "no"
  244. >
  245. <!-- CH: redirects to resources are now deprecated
  246. <!ATTLIST map:redirect-to
  247. uri CDATA #IMPLIED
  248. resource CDATA #IMPLIED
  249. target CDATA #IMPLIED
  250. session (true|false|yes|no) "no"
  251. >
  252. -->
  253. <!ELEMENT map:call (map:parameter*)>
  254. <!ATTLIST map:call
  255. resource CDATA #REQUIRED
  256. >
  257. <!ELEMENT map:generate (map:parameter*)>
  258. <!ATTLIST map:generate
  259. type CDATA #IMPLIED
  260. src CDATA #IMPLIED
  261. label CDATA #IMPLIED
  262. >
  263. <!ELEMENT map:parameter EMPTY>
  264. <!ATTLIST map:parameter
  265. name CDATA #REQUIRED
  266. value CDATA #REQUIRED
  267. >
  268. <!ELEMENT map:transform (map:parameter*)>
  269. <!ATTLIST map:transform
  270. type CDATA #IMPLIED
  271. src CDATA #IMPLIED
  272. label CDATA #IMPLIED
  273. >
  274. <!-- map:serialize is already defined in VIEWS section -->
  275. <!ELEMENT map:read EMPTY>
  276. <!ATTLIST map:read
  277. src CDATA #REQUIRED
  278. mime-type CDATA #REQUIRED
  279. type CDATA #IMPLIED
  280. >
  281. <!ELEMENT map:aggregate (map:part*)>
  282. <!ATTLIST map:aggregate
  283. element CDATA #IMPLIED
  284. prefix CDATA #IMPLIED
  285. ns CDATA #IMPLIED
  286. label CDATA #IMPLIED
  287. >
  288. <!ELEMENT map:part EMPTY>
  289. <!ATTLIST map:part
  290. src CDATA #IMPLIED
  291. element CDATA #IMPLIED
  292. ns CDATA #IMPLIED
  293. strip-root CDATA #IMPLIED
  294. label CDATA #IMPLIED
  295. >
  296. <!ELEMENT map:handle-errors (map:generate*,map:transform*,map:serialize*)>
  297. <!-- =============================================================== -->
  298. <!-- End of DTD -->
  299. <!-- =============================================================== -->