Imported Upstream version 1.78.1
[platform/upstream/docbook-xsl-stylesheets.git] / slides / schema / relaxng / sect1.rng
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   This file is part of DocBook V5.0
4   
5   Copyright 1992-2008 HaL Computer Systems, Inc.,
6   O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
7   Corporation, Norman Walsh, Sun Microsystems, Inc., and the
8   Organization for the Advancement of Structured Information
9   Standards (OASIS).
10   
11   Release: $Id: sect1.rnc 8931 2010-10-20 13:29:20Z nwalsh $
12   
13   Permission to use, copy, modify and distribute the DocBook schema
14   and its accompanying documentation for any purpose and without fee
15   is hereby granted in perpetuity, provided that the above copyright
16   notice and this paragraph appear in all copies. The copyright
17   holders make no representation about the suitability of the schema
18   for any purpose. It is provided "as is" without expressed or implied
19   warranty.
20   
21   If you modify the DocBook schema in any way, label your schema as a
22   variant of DocBook. See the reference documentation
23   (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
24   for more information.
25   
26   Please direct all questions, bug reports, or suggestions for changes
27   to the docbook@lists.oasis-open.org mailing list. For more
28   information, see http://www.oasis-open.org/docbook/.
29   
30   ======================================================================
31 -->
32 <grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0">
33   <start combine="choice">
34     <choice>
35       <ref name="db.sect1"/>
36       <ref name="db.sect2"/>
37       <ref name="db.sect3"/>
38       <ref name="db.sect4"/>
39       <ref name="db.sect5"/>
40     </choice>
41   </start>
42   <define name="db.toplevel.sections" combine="choice">
43     <oneOrMore>
44       <ref name="db.sect1"/>
45     </oneOrMore>
46     <zeroOrMore>
47       <ref name="db.simplesect"/>
48     </zeroOrMore>
49   </define>
50   <!-- ====================================================================== -->
51   <define name="db.sect1.sections">
52     <choice>
53       <group>
54         <oneOrMore>
55           <ref name="db.sect2"/>
56         </oneOrMore>
57         <zeroOrMore>
58           <ref name="db.simplesect"/>
59         </zeroOrMore>
60       </group>
61       <oneOrMore>
62         <ref name="db.simplesect"/>
63       </oneOrMore>
64     </choice>
65   </define>
66   <div>
67     <db:refname>sect1</db:refname>
68     <db:refpurpose>A top-level section of document</db:refpurpose>
69     <define name="db.sect1.status.attribute">
70       <ref name="db.status.attribute"/>
71     </define>
72     <define name="db.sect1.role.attribute">
73       <attribute name="role"/>
74     </define>
75     <define name="db.sect1.attlist">
76       <interleave>
77         <optional>
78           <ref name="db.sect1.role.attribute"/>
79         </optional>
80         <ref name="db.common.attributes"/>
81         <ref name="db.common.linking.attributes"/>
82         <optional>
83           <ref name="db.label.attribute"/>
84         </optional>
85         <optional>
86           <ref name="db.sect1.status.attribute"/>
87         </optional>
88       </interleave>
89     </define>
90     <define name="db.sect1.info">
91       <ref name="db._info.title.req"/>
92     </define>
93     <define name="db.sect1">
94       <element name="sect1">
95         <ref name="db.sect1.attlist"/>
96         <ref name="db.sect1.info"/>
97         <choice>
98           <group>
99             <oneOrMore>
100               <ref name="db.all.blocks"/>
101             </oneOrMore>
102             <optional>
103               <ref name="db.sect1.sections"/>
104             </optional>
105           </group>
106           <ref name="db.sect1.sections"/>
107         </choice>
108         <zeroOrMore>
109           <ref name="db.navigation.components"/>
110         </zeroOrMore>
111       </element>
112     </define>
113   </div>
114   <!-- ====================================================================== -->
115   <define name="db.sect2.sections">
116     <choice>
117       <group>
118         <oneOrMore>
119           <ref name="db.sect3"/>
120         </oneOrMore>
121         <zeroOrMore>
122           <ref name="db.simplesect"/>
123         </zeroOrMore>
124       </group>
125       <oneOrMore>
126         <ref name="db.simplesect"/>
127       </oneOrMore>
128     </choice>
129   </define>
130   <div>
131     <db:refname>sect2</db:refname>
132     <db:refpurpose>A subsection within a sect1</db:refpurpose>
133     <define name="db.sect2.status.attribute">
134       <ref name="db.status.attribute"/>
135     </define>
136     <define name="db.sect2.role.attribute">
137       <attribute name="role"/>
138     </define>
139     <define name="db.sect2.attlist">
140       <interleave>
141         <optional>
142           <ref name="db.sect2.role.attribute"/>
143         </optional>
144         <ref name="db.common.attributes"/>
145         <ref name="db.common.linking.attributes"/>
146         <optional>
147           <ref name="db.label.attribute"/>
148         </optional>
149         <optional>
150           <ref name="db.sect2.status.attribute"/>
151         </optional>
152       </interleave>
153     </define>
154     <define name="db.sect2.info">
155       <ref name="db._info.title.req"/>
156     </define>
157     <define name="db.sect2">
158       <element name="sect2">
159         <ref name="db.sect2.attlist"/>
160         <ref name="db.sect2.info"/>
161         <choice>
162           <group>
163             <oneOrMore>
164               <ref name="db.all.blocks"/>
165             </oneOrMore>
166             <optional>
167               <ref name="db.sect2.sections"/>
168             </optional>
169           </group>
170           <ref name="db.sect2.sections"/>
171         </choice>
172         <zeroOrMore>
173           <ref name="db.navigation.components"/>
174         </zeroOrMore>
175       </element>
176     </define>
177   </div>
178   <!-- ====================================================================== -->
179   <define name="db.sect3.sections">
180     <choice>
181       <group>
182         <oneOrMore>
183           <ref name="db.sect4"/>
184         </oneOrMore>
185         <zeroOrMore>
186           <ref name="db.simplesect"/>
187         </zeroOrMore>
188       </group>
189       <oneOrMore>
190         <ref name="db.simplesect"/>
191       </oneOrMore>
192     </choice>
193   </define>
194   <div>
195     <db:refname>sect3</db:refname>
196     <db:refpurpose>A subsection within a sect2</db:refpurpose>
197     <define name="db.sect3.status.attribute">
198       <ref name="db.status.attribute"/>
199     </define>
200     <define name="db.sect3.role.attribute">
201       <attribute name="role"/>
202     </define>
203     <define name="db.sect3.attlist">
204       <interleave>
205         <optional>
206           <ref name="db.sect3.role.attribute"/>
207         </optional>
208         <ref name="db.common.attributes"/>
209         <ref name="db.common.linking.attributes"/>
210         <optional>
211           <ref name="db.label.attribute"/>
212         </optional>
213         <optional>
214           <ref name="db.sect3.status.attribute"/>
215         </optional>
216       </interleave>
217     </define>
218     <define name="db.sect3.info">
219       <ref name="db._info.title.req"/>
220     </define>
221     <define name="db.sect3">
222       <element name="sect3">
223         <ref name="db.sect3.attlist"/>
224         <ref name="db.sect3.info"/>
225         <choice>
226           <group>
227             <oneOrMore>
228               <ref name="db.all.blocks"/>
229             </oneOrMore>
230             <optional>
231               <ref name="db.sect3.sections"/>
232             </optional>
233           </group>
234           <ref name="db.sect3.sections"/>
235         </choice>
236         <zeroOrMore>
237           <ref name="db.navigation.components"/>
238         </zeroOrMore>
239       </element>
240     </define>
241   </div>
242   <!-- ====================================================================== -->
243   <define name="db.sect4.sections">
244     <choice>
245       <group>
246         <oneOrMore>
247           <ref name="db.sect5"/>
248         </oneOrMore>
249         <zeroOrMore>
250           <ref name="db.simplesect"/>
251         </zeroOrMore>
252       </group>
253       <oneOrMore>
254         <ref name="db.simplesect"/>
255       </oneOrMore>
256     </choice>
257   </define>
258   <div>
259     <db:refname>sect4</db:refname>
260     <db:refpurpose>A subsection within a sect3</db:refpurpose>
261     <define name="db.sect4.status.attribute">
262       <ref name="db.status.attribute"/>
263     </define>
264     <define name="db.sect4.role.attribute">
265       <attribute name="role"/>
266     </define>
267     <define name="db.sect4.attlist">
268       <interleave>
269         <optional>
270           <ref name="db.sect4.role.attribute"/>
271         </optional>
272         <ref name="db.common.attributes"/>
273         <ref name="db.common.linking.attributes"/>
274         <optional>
275           <ref name="db.label.attribute"/>
276         </optional>
277         <optional>
278           <ref name="db.sect4.status.attribute"/>
279         </optional>
280       </interleave>
281     </define>
282     <define name="db.sect4.info">
283       <ref name="db._info.title.req"/>
284     </define>
285     <define name="db.sect4">
286       <element name="sect4">
287         <ref name="db.sect4.attlist"/>
288         <ref name="db.sect4.info"/>
289         <choice>
290           <group>
291             <oneOrMore>
292               <ref name="db.all.blocks"/>
293             </oneOrMore>
294             <optional>
295               <ref name="db.sect4.sections"/>
296             </optional>
297           </group>
298           <ref name="db.sect4.sections"/>
299         </choice>
300         <zeroOrMore>
301           <ref name="db.navigation.components"/>
302         </zeroOrMore>
303       </element>
304     </define>
305   </div>
306   <!-- ====================================================================== -->
307   <define name="db.sect5.sections">
308     <oneOrMore>
309       <ref name="db.simplesect"/>
310     </oneOrMore>
311   </define>
312   <div>
313     <db:refname>sect5</db:refname>
314     <db:refpurpose>A subsection within a sect4</db:refpurpose>
315     <define name="db.sect5.status.attribute">
316       <ref name="db.status.attribute"/>
317     </define>
318     <define name="db.sect5.role.attribute">
319       <attribute name="role"/>
320     </define>
321     <define name="db.sect5.attlist">
322       <interleave>
323         <optional>
324           <ref name="db.sect5.role.attribute"/>
325         </optional>
326         <ref name="db.common.attributes"/>
327         <ref name="db.common.linking.attributes"/>
328         <optional>
329           <ref name="db.label.attribute"/>
330         </optional>
331         <optional>
332           <ref name="db.sect5.status.attribute"/>
333         </optional>
334       </interleave>
335     </define>
336     <define name="db.sect5.info">
337       <ref name="db._info.title.req"/>
338     </define>
339     <define name="db.sect5">
340       <element name="sect5">
341         <ref name="db.sect5.attlist"/>
342         <ref name="db.sect5.info"/>
343         <choice>
344           <group>
345             <oneOrMore>
346               <ref name="db.all.blocks"/>
347             </oneOrMore>
348             <optional>
349               <ref name="db.sect5.sections"/>
350             </optional>
351           </group>
352           <ref name="db.sect5.sections"/>
353         </choice>
354         <zeroOrMore>
355           <ref name="db.navigation.components"/>
356         </zeroOrMore>
357       </element>
358     </define>
359   </div>
360 </grammar>