Debian Codegraph @

docbook-xsl-ns/slides/schema/relaxng/slides.rnc

raw
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
6 # See http://docbook.org/ns/docbook-slides
7
8 # This file is part of DocBook Slides V5.0
9 #
10 # Copyright 2012 Gabor Kovesdan
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 [email protected] mailing list. For more
27 # information, see http://www.oasis-open.org/docbook/.
28 #
29 # ======================================================================
30
31 include "http://docbook.org/xml/5.0/rng/docbook.rnc" inherit = db {
32 start = dbs.slides
33
34 # Avoid ID clashes
35 db._any.attribute = attribute * - (xml:id | linkend) { text }
36
37 db.common.attributes =
38 db.xml.id.attribute?
39 & db.common.base.attributes
40 & db.annotations.attribute?
41 & dbs.style.attributes?
42
43 # Any element and attribute from the SVG namespace
44 db._any.svg =
45 element svg:* { (dbs._any.attribute | text | db._any)* }
46
47 # Any element and attribute from the MathML namespace
48 db._any.mml =
49 element mml:* { (dbs._any.attribute | text | db._any)* }
50 }
51
52 # Any attribute from any namespace
53 dbs._any.attribute = attribute * { text }
54
55 dbs.all.content = db.all.blocks? &
56 dbs.speakernotes? &
57 dbs.handoutnotes? &
58 db._any.svg? &
59 db._any.mml? &
60 dbs.block?
61
62 dbs.block =
63 ## Indicates a formatting block that can have its own styling applied
64 element block { dbs.block.attlist,
65 dbs.all.content*
66 }
67
68 dbs.block.role.attribute =
69 ## Role attribute for the block element
70 attribute role { text }
71
72 dbs.block.status.attribute =
73 ## Status attribute for the block element
74 db.status.attribute
75
76 dbs.block.attlist = dbs.block.role.attribute?
77 & db.common.attributes
78 & db.common.linking.attributes
79 & db.label.attribute?
80 & dbs.block.status.attribute?
81
82 dbs.slides =
83 ## Root element of a slides document
84 element slides { dbs.slides.attlist,
85 db._info.title.req,
86 dbs.speakernotes?,
87 dbs.handoutnotes?,
88 (
89 dbs.foil? &
90 dbs.foilgroup?
91 )*
92 }
93
94 dbs.slides.role.attribute =
95 ## Role attribute for the slides element
96 attribute role { text }
97
98 dbs.slides.status.attribute =
99 ## Status attribute for the slides element
100 db.status.attribute
101
102 dbs.slides.attlist = dbs.slides.role.attribute?
103 & db.common.attributes
104 & db.common.linking.attributes
105 & db.label.attribute?
106 & dbs.slides.status.attribute?
107
108 dbs.foilgroup = element foilgroup {
109 dbs.foilgroup.attlist,
110 db._info.title.req,
111 dbs.all.content*,
112 dbs.foil+
113 }
114
115 dbs.foilgroup.role.attribute =
116 ## Role attribute for the foilgroup element
117 attribute role { text }
118
119 dbs.foilgroup.status.attribute =
120 ## Status attribute for the foilgroup element
121 db.status.attribute
122
123 dbs.foilgroup.attlist = dbs.foilgroup.role.attribute?
124 & db.common.attributes
125 & db.common.linking.attributes
126 & db.label.attribute?
127 & dbs.slides.status.attribute?
128
129 dbs.foil =
130 ## Indicates a foil that may have some info and content
131 element foil { dbs.foil.attlist,
132 db._info.title.req,
133 dbs.all.content*,
134 db.navigation.components*
135 }
136
137 dbs.foil.role.attribute =
138 ## Role attribute for the foil element
139 attribute role { text }
140
141 dbs.foil.status.attribute =
142 ## Status attribute for the foil element
143 db.status.attribute
144
145 dbs.foil.attlist = dbs.foil.role.attribute?
146 & db.common.attributes
147 & db.common.linking.attributes
148 & db.label.attribute?
149 & dbs.foil.status.attribute?
150
151 dbs.speakernotes =
152 ## Indicates notes for the speaker
153 element speakernotes { dbs.speakernotes.attlist,
154 db.all.blocks+
155 }
156
157 dbs.speakernotes.role.attribute =
158 ## Role attribute for the speakernotes element
159 attribute role { text }
160
161 dbs.speakernotes.attlist = dbs.speakernotes.role.attribute?
162 & db.common.attributes
163 & db.common.linking.attributes
164
165 dbs.handoutnotes =
166 ## Indicates notes that are meant for printed copies
167 element handoutnotes { dbs.handoutnotes.attlist,
168 db.all.blocks+
169 }
170
171 ## Role attribute for the handoutnotes element
172 dbs.handoutnotes.role.attribute =
173 ## Role attribute for the handoutnotes element
174 attribute role { text }
175
176 dbs.handoutnotes.attlist = dbs.handoutnotes.role.attribute?
177 & db.common.attributes
178 & db.common.linking.attributes
179
180 dbs.style.attributes = dbs.incremental.attribute?
181 & dbs.collapsible.attribute?
182 & dbs.style.attribute?
183
184 dbs.incremental.attribute =
185 ## Attribute indicating an incremental part
186 attribute dbs:incremental {
187 ## disabled
188 "0" |
189 ## enabled
190 "1" }
191
192 dbs.collapsible.attribute =
193 ## Attribute indicating a collapsible part
194 attribute dbs:collapsible {
195 ## disabled
196 "0" |
197 ## enabled
198 "1" |
199 ## enabled and expanded by default
200 "expanded" }
201
202 dbs.style.attribute =
203 ## Attribute indicating a formatting style class
204 attribute dbs:style { text }