slides.rnc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. namespace db = "http://docbook.org/ns/docbook"
  2. namespace mml = "http://www.w3.org/1998/Math/MathML"
  3. namespace svg = "http://www.w3.org/2000/svg"
  4. default namespace dbs = "http://docbook.org/ns/docbook-slides"
  5. # See http://docbook.org/ns/docbook-slides
  6. # This file is part of DocBook Slides V5.0
  7. #
  8. # Copyright 2012 Gabor Kovesdan
  9. #
  10. # Release: $Id$
  11. #
  12. # Permission to use, copy, modify and distribute the DocBook Slides
  13. # schema and its accompanying documentation for any purpose and without
  14. # fee is hereby granted in perpetuity, provided that the above copyright
  15. # notice and this paragraph appear in all copies. The copyright
  16. # holders make no representation about the suitability of the schema
  17. # for any purpose. It is provided "as is" without expressed or implied
  18. # warranty.
  19. #
  20. # If you modify the DocBook Slides schema in any way, label your schema
  21. # as a variant of DocBook Slides. See the reference documentation
  22. # (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  23. # for more information.
  24. #
  25. # Please direct all questions, bug reports, or suggestions for changes
  26. # to the docbook@lists.oasis-open.org mailing list. For more
  27. # information, see http://www.oasis-open.org/docbook/.
  28. #
  29. # ======================================================================
  30. include "../../../../docbook/relaxng/docbook/docbook/docbook.rnc" inherit = db {
  31. start = dbs.slides
  32. # Avoid ID clashes
  33. db._any.attribute = attribute * - (xml:id | linkend) { text }
  34. db.common.attributes =
  35. db.xml.id.attribute?
  36. & db.common.base.attributes
  37. & db.annotations.attribute?
  38. & dbs.style.attributes?
  39. # Any element and attribute from the SVG namespace
  40. db._any.svg =
  41. element svg:* { (dbs._any.attribute | text | db._any)* }
  42. # Any element and attribute from the MathML namespace
  43. db._any.mml =
  44. element mml:* { (dbs._any.attribute | text | db._any)* }
  45. }
  46. # Any attribute from any namespace
  47. dbs._any.attribute = attribute * { text }
  48. dbs.all.content = db.all.blocks? &
  49. dbs.speakernotes &
  50. dbs.handoutnotes &
  51. db._any.svg? &
  52. db._any.mml? &
  53. dbs.block?
  54. dbs.block =
  55. ## Indicates a formatting block that can have its own styling applied
  56. element block { dbs.block.attlist,
  57. dbs.all.content*
  58. }
  59. dbs.block.role.attribute =
  60. ## Role attribute for the block element
  61. attribute role { text }
  62. dbs.block.status.attribute =
  63. ## Status attribute for the block element
  64. db.status.attribute
  65. dbs.block.attlist = dbs.block.role.attribute?
  66. & db.common.attributes
  67. & db.common.linking.attributes
  68. & db.label.attribute?
  69. & dbs.block.status.attribute?
  70. dbs.slides =
  71. ## Root element of a slides document
  72. element slides { dbs.slides.attlist,
  73. db._info.title.req,
  74. dbs.speakernotes?,
  75. dbs.handoutnotes?,
  76. (
  77. dbs.foil? &
  78. dbs.foilgroup?
  79. )*
  80. }
  81. dbs.slides.role.attribute =
  82. ## Role attribute for the slides element
  83. attribute role { text }
  84. dbs.slides.status.attribute =
  85. ## Status attribute for the slides element
  86. db.status.attribute
  87. dbs.slides.attlist = dbs.slides.role.attribute?
  88. & db.common.attributes
  89. & db.common.linking.attributes
  90. & db.label.attribute?
  91. & dbs.slides.status.attribute?
  92. dbs.foilgroup = element foilgroup {
  93. dbs.foilgroup.attlist,
  94. db._info.title.req,
  95. dbs.all.content*,
  96. dbs.foil+
  97. }
  98. dbs.foilgroup.role.attribute =
  99. ## Role attribute for the foilgroup element
  100. attribute role { text }
  101. dbs.foilgroup.status.attribute =
  102. ## Status attribute for the foilgroup element
  103. db.status.attribute
  104. dbs.foilgroup.attlist = dbs.foilgroup.role.attribute?
  105. & db.common.attributes
  106. & db.common.linking.attributes
  107. & db.label.attribute?
  108. & dbs.slides.status.attribute?
  109. dbs.foil =
  110. ## Indicates a foil that may have some info and content
  111. element foil { dbs.foil.attlist,
  112. db._info.title.req,
  113. dbs.all.content*,
  114. db.navigation.components*
  115. }
  116. dbs.foil.role.attribute =
  117. ## Role attribute for the foil element
  118. attribute role { text }
  119. dbs.foil.status.attribute =
  120. ## Status attribute for the foil element
  121. db.status.attribute
  122. dbs.foil.attlist = dbs.foil.role.attribute?
  123. & db.common.attributes
  124. & db.common.linking.attributes
  125. & db.label.attribute?
  126. & dbs.foil.status.attribute?
  127. dbs.speakernotes =
  128. ## Indicates notes for the speaker
  129. element speakernotes { dbs.speakernotes.attlist,
  130. db.all.blocks+
  131. }
  132. dbs.speakernotes.role.attribute =
  133. ## Role attribute for the speakernotes element
  134. attribute role { text }
  135. dbs.speakernotes.attlist = dbs.speakernotes.role.attribute?
  136. & db.common.attributes
  137. & db.common.linking.attributes
  138. dbs.handoutnotes =
  139. ## Indicates notes that are meant for printed copies
  140. element handoutnotes { dbs.handoutnotes.attlist,
  141. db.all.blocks+
  142. }
  143. ## Role attribute for the handoutnotes element
  144. dbs.handoutnotes.role.attribute =
  145. ## Role attribute for the handoutnotes element
  146. attribute role { text }
  147. dbs.handoutnotes.attlist = dbs.handoutnotes.role.attribute?
  148. & db.common.attributes
  149. & db.common.linking.attributes
  150. dbs.style.attributes = dbs.incremental.attribute?
  151. & dbs.collapsible.attribute?
  152. & dbs.style.attribute?
  153. dbs.incremental.attribute =
  154. ## Attribute indicating an incremental part
  155. attribute dbs:incremental {
  156. ## disabled
  157. "0" |
  158. ## enabled
  159. "1" }
  160. dbs.collapsible.attribute =
  161. ## Attribute indicating a collapsible part
  162. attribute dbs:collapsible {
  163. ## disabled
  164. "0" |
  165. ## enabled
  166. "1" |
  167. ## enabled and expanded by default
  168. "expanded" }
  169. dbs.style.attribute =
  170. ## Attribute indicating a formatting style class
  171. attribute dbs:style { text }