slides.rng 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <grammar xmlns:dbs="http://docbook.org/ns/docbook-slides" ns="" xmlns:db="http://docbook.org/ns/docbook" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
  3. <!-- See http://docbook.org/ns/docbook-slides -->
  4. <!--
  5. This file is part of DocBook Slides V5.0
  6. Copyright 2012 Gabor Kovesdan
  7. Release: $Id$
  8. Permission to use, copy, modify and distribute the DocBook Slides
  9. schema and its accompanying documentation for any purpose and without
  10. fee is hereby granted in perpetuity, provided that the above copyright
  11. notice and this paragraph appear in all copies. The copyright
  12. holders make no representation about the suitability of the schema
  13. for any purpose. It is provided "as is" without expressed or implied
  14. warranty.
  15. If you modify the DocBook Slides schema in any way, label your schema
  16. as a variant of DocBook Slides. See the reference documentation
  17. (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  18. for more information.
  19. Please direct all questions, bug reports, or suggestions for changes
  20. to the docbook@lists.oasis-open.org mailing list. For more
  21. information, see http://www.oasis-open.org/docbook/.
  22. ======================================================================
  23. -->
  24. <include href="docbook.rng" ns="http://docbook.org/ns/docbook">
  25. <start>
  26. <ref name="dbs.slides"/>
  27. </start>
  28. <!-- Avoid ID clashes -->
  29. <define name="db._any.attribute">
  30. <attribute>
  31. <anyName>
  32. <except>
  33. <name>xml:id</name>
  34. <name ns="">linkend</name>
  35. </except>
  36. </anyName>
  37. </attribute>
  38. </define>
  39. <define name="db.common.attributes">
  40. <interleave>
  41. <optional>
  42. <ref name="db.xml.id.attribute"/>
  43. </optional>
  44. <ref name="db.common.base.attributes"/>
  45. <optional>
  46. <ref name="db.annotations.attribute"/>
  47. </optional>
  48. <optional>
  49. <ref name="dbs.style.attributes"/>
  50. </optional>
  51. </interleave>
  52. </define>
  53. <!-- Any element and attribute from the SVG namespace -->
  54. <define name="db._any.svg">
  55. <element>
  56. <nsName ns="http://www.w3.org/2000/svg"/>
  57. <zeroOrMore>
  58. <choice>
  59. <ref name="dbs._any.attribute"/>
  60. <text/>
  61. <ref name="db._any"/>
  62. </choice>
  63. </zeroOrMore>
  64. </element>
  65. </define>
  66. <!-- Any element and attribute from the MathML namespace -->
  67. <define name="db._any.mml">
  68. <element>
  69. <nsName ns="http://www.w3.org/1998/Math/MathML"/>
  70. <zeroOrMore>
  71. <choice>
  72. <ref name="dbs._any.attribute"/>
  73. <text/>
  74. <ref name="db._any"/>
  75. </choice>
  76. </zeroOrMore>
  77. </element>
  78. </define>
  79. </include>
  80. <!-- Any attribute from any namespace -->
  81. <define name="dbs._any.attribute">
  82. <attribute>
  83. <anyName/>
  84. </attribute>
  85. </define>
  86. <define name="dbs.all.content">
  87. <interleave>
  88. <optional>
  89. <ref name="db.all.blocks"/>
  90. </optional>
  91. <ref name="dbs.speakernotes"/>
  92. <ref name="dbs.handoutnotes"/>
  93. <optional>
  94. <ref name="db._any.svg"/>
  95. </optional>
  96. <optional>
  97. <ref name="db._any.mml"/>
  98. </optional>
  99. <optional>
  100. <ref name="dbs.block"/>
  101. </optional>
  102. </interleave>
  103. </define>
  104. <define name="dbs.block">
  105. <element>
  106. <a:documentation>Indicates a formatting block that can have its own styling applied</a:documentation>
  107. <name ns="http://docbook.org/ns/docbook-slides">block</name>
  108. <ref name="dbs.block.attlist"/>
  109. <zeroOrMore>
  110. <ref name="dbs.all.content"/>
  111. </zeroOrMore>
  112. </element>
  113. </define>
  114. <define name="dbs.block.role.attribute">
  115. <attribute name="role">
  116. <a:documentation>Role attribute for the block element</a:documentation>
  117. </attribute>
  118. </define>
  119. <define name="dbs.block.status.attribute">
  120. <ref name="db.status.attribute">
  121. <a:documentation>Status attribute for the block element</a:documentation>
  122. </ref>
  123. </define>
  124. <define name="dbs.block.attlist">
  125. <interleave>
  126. <optional>
  127. <ref name="dbs.block.role.attribute"/>
  128. </optional>
  129. <ref name="db.common.attributes"/>
  130. <ref name="db.common.linking.attributes"/>
  131. <optional>
  132. <ref name="db.label.attribute"/>
  133. </optional>
  134. <optional>
  135. <ref name="dbs.block.status.attribute"/>
  136. </optional>
  137. </interleave>
  138. </define>
  139. <define name="dbs.slides">
  140. <element>
  141. <a:documentation>Root element of a slides document</a:documentation>
  142. <name ns="http://docbook.org/ns/docbook-slides">slides</name>
  143. <ref name="dbs.slides.attlist"/>
  144. <ref name="db._info.title.req"/>
  145. <optional>
  146. <ref name="dbs.speakernotes"/>
  147. </optional>
  148. <optional>
  149. <ref name="dbs.handoutnotes"/>
  150. </optional>
  151. <zeroOrMore>
  152. <interleave>
  153. <optional>
  154. <ref name="dbs.foil"/>
  155. </optional>
  156. <optional>
  157. <ref name="dbs.foilgroup"/>
  158. </optional>
  159. </interleave>
  160. </zeroOrMore>
  161. </element>
  162. </define>
  163. <define name="dbs.slides.role.attribute">
  164. <attribute name="role">
  165. <a:documentation>Role attribute for the slides element</a:documentation>
  166. </attribute>
  167. </define>
  168. <define name="dbs.slides.status.attribute">
  169. <ref name="db.status.attribute">
  170. <a:documentation>Status attribute for the slides element</a:documentation>
  171. </ref>
  172. </define>
  173. <define name="dbs.slides.attlist">
  174. <interleave>
  175. <optional>
  176. <ref name="dbs.slides.role.attribute"/>
  177. </optional>
  178. <ref name="db.common.attributes"/>
  179. <ref name="db.common.linking.attributes"/>
  180. <optional>
  181. <ref name="db.label.attribute"/>
  182. </optional>
  183. <optional>
  184. <ref name="dbs.slides.status.attribute"/>
  185. </optional>
  186. </interleave>
  187. </define>
  188. <define name="dbs.foilgroup">
  189. <element>
  190. <name ns="http://docbook.org/ns/docbook-slides">foilgroup</name>
  191. <ref name="dbs.foilgroup.attlist"/>
  192. <ref name="db._info.title.req"/>
  193. <zeroOrMore>
  194. <ref name="dbs.all.content"/>
  195. </zeroOrMore>
  196. <oneOrMore>
  197. <ref name="dbs.foil"/>
  198. </oneOrMore>
  199. </element>
  200. </define>
  201. <define name="dbs.foilgroup.role.attribute">
  202. <attribute name="role">
  203. <a:documentation>Role attribute for the foilgroup element</a:documentation>
  204. </attribute>
  205. </define>
  206. <define name="dbs.foilgroup.status.attribute">
  207. <ref name="db.status.attribute">
  208. <a:documentation>Status attribute for the foilgroup element</a:documentation>
  209. </ref>
  210. </define>
  211. <define name="dbs.foilgroup.attlist">
  212. <interleave>
  213. <optional>
  214. <ref name="dbs.foilgroup.role.attribute"/>
  215. </optional>
  216. <ref name="db.common.attributes"/>
  217. <ref name="db.common.linking.attributes"/>
  218. <optional>
  219. <ref name="db.label.attribute"/>
  220. </optional>
  221. <optional>
  222. <ref name="dbs.slides.status.attribute"/>
  223. </optional>
  224. </interleave>
  225. </define>
  226. <define name="dbs.foil">
  227. <element>
  228. <a:documentation>Indicates a foil that may have some info and content</a:documentation>
  229. <name ns="http://docbook.org/ns/docbook-slides">foil</name>
  230. <ref name="dbs.foil.attlist"/>
  231. <ref name="db._info.title.req"/>
  232. <zeroOrMore>
  233. <ref name="dbs.all.content"/>
  234. </zeroOrMore>
  235. <zeroOrMore>
  236. <ref name="db.navigation.components"/>
  237. </zeroOrMore>
  238. </element>
  239. </define>
  240. <define name="dbs.foil.role.attribute">
  241. <attribute name="role">
  242. <a:documentation>Role attribute for the foil element</a:documentation>
  243. </attribute>
  244. </define>
  245. <define name="dbs.foil.status.attribute">
  246. <ref name="db.status.attribute">
  247. <a:documentation>Status attribute for the foil element</a:documentation>
  248. </ref>
  249. </define>
  250. <define name="dbs.foil.attlist">
  251. <interleave>
  252. <optional>
  253. <ref name="dbs.foil.role.attribute"/>
  254. </optional>
  255. <ref name="db.common.attributes"/>
  256. <ref name="db.common.linking.attributes"/>
  257. <optional>
  258. <ref name="db.label.attribute"/>
  259. </optional>
  260. <optional>
  261. <ref name="dbs.foil.status.attribute"/>
  262. </optional>
  263. </interleave>
  264. </define>
  265. <define name="dbs.speakernotes">
  266. <element>
  267. <a:documentation>Indicates notes for the speaker</a:documentation>
  268. <name ns="http://docbook.org/ns/docbook-slides">speakernotes</name>
  269. <ref name="dbs.speakernotes.attlist"/>
  270. <oneOrMore>
  271. <ref name="db.all.blocks"/>
  272. </oneOrMore>
  273. </element>
  274. </define>
  275. <define name="dbs.speakernotes.role.attribute">
  276. <attribute name="role">
  277. <a:documentation>Role attribute for the speakernotes element</a:documentation>
  278. </attribute>
  279. </define>
  280. <define name="dbs.speakernotes.attlist">
  281. <interleave>
  282. <optional>
  283. <ref name="dbs.speakernotes.role.attribute"/>
  284. </optional>
  285. <ref name="db.common.attributes"/>
  286. <ref name="db.common.linking.attributes"/>
  287. </interleave>
  288. </define>
  289. <define name="dbs.handoutnotes">
  290. <element>
  291. <a:documentation>Indicates notes that are meant for printed copies</a:documentation>
  292. <name ns="http://docbook.org/ns/docbook-slides">handoutnotes</name>
  293. <ref name="dbs.handoutnotes.attlist"/>
  294. <oneOrMore>
  295. <ref name="db.all.blocks"/>
  296. </oneOrMore>
  297. </element>
  298. </define>
  299. <define name="dbs.handoutnotes.role.attribute">
  300. <a:documentation>Role attribute for the handoutnotes element</a:documentation>
  301. <attribute name="role">
  302. <a:documentation>Role attribute for the handoutnotes element</a:documentation>
  303. </attribute>
  304. </define>
  305. <define name="dbs.handoutnotes.attlist">
  306. <interleave>
  307. <optional>
  308. <ref name="dbs.handoutnotes.role.attribute"/>
  309. </optional>
  310. <ref name="db.common.attributes"/>
  311. <ref name="db.common.linking.attributes"/>
  312. </interleave>
  313. </define>
  314. <define name="dbs.style.attributes">
  315. <interleave>
  316. <optional>
  317. <ref name="dbs.incremental.attribute"/>
  318. </optional>
  319. <optional>
  320. <ref name="dbs.collapsible.attribute"/>
  321. </optional>
  322. <optional>
  323. <ref name="dbs.style.attribute"/>
  324. </optional>
  325. </interleave>
  326. </define>
  327. <define name="dbs.incremental.attribute">
  328. <attribute name="dbs:incremental">
  329. <a:documentation>Attribute indicating an incremental part</a:documentation>
  330. <choice>
  331. <value>0</value>
  332. <a:documentation>disabled</a:documentation>
  333. <value>1</value>
  334. <a:documentation>enabled</a:documentation>
  335. </choice>
  336. </attribute>
  337. </define>
  338. <define name="dbs.collapsible.attribute">
  339. <attribute name="dbs:collapsible">
  340. <a:documentation>Attribute indicating a collapsible part</a:documentation>
  341. <choice>
  342. <value>0</value>
  343. <a:documentation>disabled</a:documentation>
  344. <value>1</value>
  345. <a:documentation>enabled</a:documentation>
  346. <value>expanded</value>
  347. <a:documentation>enabled and expanded by default</a:documentation>
  348. </choice>
  349. </attribute>
  350. </define>
  351. <define name="dbs.style.attribute">
  352. <attribute name="dbs:style">
  353. <a:documentation>Attribute indicating a formatting style class</a:documentation>
  354. </attribute>
  355. </define>
  356. </grammar>