source: trunk/lib/docbook/website/schema/relaxng/layout.rng @ 3162

Last change on this file since 3162 was 3153, checked in by Nicklas Nordborg, 16 years ago

Added docbook DTD:s and stylesheets

File size: 9.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<grammar xmlns="http://relaxng.org/ns/structure/1.0"
3         xmlns:rng="http://relaxng.org/ns/structure/1.0"
4         xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
5         xmlns:doc="http://nwalsh.com/xmlns/documentation"
6         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
7
8<rng:div doc:docbook="yes" xmlns="">
9<partinfo>
10<releaseinfo
11   role="cvs">$Id: layout.rng,v 1.1 2004/03/03 22:31:10 dweiss Exp $</releaseinfo>
12<title>Website Layout Schema</title>
13<productname>Website</productname>
14<productnumber>2.5.0</productnumber>
15<releaseinfo role="filename">layout</releaseinfo>
16<copyright>
17<year>2002</year>
18<year>2003</year>
19<holder>Norman Walsh</holder>
20</copyright>
21</partinfo>
22
23<partintro>
24<para>This is the layout schema for Website.
25Please use the following formal public identifier to identify it:</para>
26
27<screen>"-//Norman Walsh//DTD Website Layout V2.5.0//EN"</screen>
28
29<para>For example:</para>
30
31<programlisting><![CDATA[<!DOCTYPE Layout PUBLIC "-//Norman Walsh//DTD Website Layout V2.5.0//EN"
32               "http://docbook.sourceforge.net/release/website/2.5.0/layout.dtd">
33               [...]>]]></programlisting>
34
35<para>Please direct all questions and comments about this DTD to
36Norman Walsh, <email>ndw@nwalsh.com</email>.</para>
37</partintro>
38</rng:div>
39
40  <define name="layout">
41    <element name="layout">
42      <ref name="attlist.layout"/>
43      <zeroOrMore>
44        <choice>
45          <ref name="config"/>
46          <ref name="style"/>
47          <ref name="script"/>
48          <ref name="headlink"/>
49          <ref name="copyright"/>
50        </choice>
51      </zeroOrMore>
52      <oneOrMore>
53        <ref name="toc"/>
54      </oneOrMore>
55      <zeroOrMore>
56        <ref name="notoc"/>
57      </zeroOrMore>
58    </element>
59  </define>
60
61  <define name="attlist.layout" combine="interleave">
62    <empty/>
63  </define>
64
65  <define name="any" combine="choice">
66    <ref name="layout"/>
67  </define>
68
69  <define name="config">
70    <element name="config">
71      <ref name="attlist.config"/>
72      <empty/>
73    </element>
74  </define>
75
76  <define name="any" combine="choice">
77    <ref name="config"/>
78  </define>
79
80  <define name="attlist.config" combine="interleave">
81    <attribute name="param"/>
82    <attribute name="value"/>
83    <optional>
84      <attribute name="altval"/>
85    </optional>
86  </define>
87
88  <define name="style">
89    <element name="style">
90      <ref name="attlist.style"/>
91      <text/>
92    </element>
93  </define>
94
95  <define name="any" combine="choice">
96    <ref name="style"/>
97  </define>
98
99  <define name="attlist.style" combine="interleave">
100    <optional>
101      <attribute name="src"/>
102    </optional>
103    <optional>
104      <attribute name="type"/>
105    </optional>
106    <optional>
107      <attribute name="language"/>
108    </optional>
109  </define>
110
111  <define name="script">
112    <element name="script">
113      <ref name="attlist.script"/>
114      <text/>
115    </element>
116  </define>
117
118  <define name="any" combine="choice">
119    <ref name="script"/>
120  </define>
121
122  <define name="attlist.script" combine="interleave">
123    <optional>
124      <attribute name="src"/>
125    </optional>
126    <optional>
127      <attribute name="language"/>
128    </optional>
129  </define>
130
131  <define name="headlink">
132    <element name="headlink">
133      <ref name="attlist.headlink"/>
134      <empty/>
135    </element>
136  </define>
137
138  <define name="any" combine="choice">
139    <ref name="headlink"/>
140  </define>
141
142  <define name="attlist.headlink" combine="interleave">
143    <optional>
144      <attribute name="href"/>
145    </optional>
146    <optional>
147      <attribute name="media"/>
148    </optional>
149    <optional>
150      <attribute name="name"/>
151    </optional>
152    <optional>
153      <attribute name="rel"/>
154    </optional>
155    <optional>
156      <attribute name="rev"/>
157    </optional>
158    <optional>
159      <attribute name="src"/>
160    </optional>
161    <optional>
162      <attribute name="title"/>
163    </optional>
164    <optional>
165      <attribute name="type"/>
166    </optional>
167  </define>
168
169  <define name="copyright">
170    <element name="copyright">
171      <ref name="attlist.copyright"/>
172      <oneOrMore>
173        <ref name="year"/>
174      </oneOrMore>
175      <oneOrMore>
176        <ref name="holder"/>
177      </oneOrMore>
178    </element>
179  </define>
180
181  <define name="attlist.copyright" combine="interleave">
182    <empty/>
183  </define>
184
185  <define name="any" combine="choice">
186    <ref name="copyright"/>
187  </define>
188
189  <define name="year">
190    <element name="year">
191      <ref name="attlist.year"/>
192      <zeroOrMore>
193        <text/>
194      </zeroOrMore>
195    </element>
196  </define>
197
198  <define name="attlist.year" combine="interleave">
199    <empty/>
200  </define>
201
202  <define name="any" combine="choice">
203    <ref name="year"/>
204  </define>
205
206  <define name="holder">
207    <element name="holder">
208      <ref name="attlist.holder"/>
209      <zeroOrMore>
210        <choice>
211          <text/>
212          <ref name="ulink"/>
213        </choice>
214      </zeroOrMore>
215    </element>
216  </define>
217
218  <define name="any" combine="choice">
219    <ref name="holder"/>
220  </define>
221
222  <define name="attlist.holder" combine="interleave">
223    <optional>
224      <attribute name="role"/>
225    </optional>
226  </define>
227
228  <define name="ulink">
229    <element name="ulink">
230      <ref name="attlist.ulink"/>
231      <zeroOrMore>
232        <text/>
233      </zeroOrMore>
234    </element>
235  </define>
236
237  <define name="any" combine="choice">
238    <ref name="ulink"/>
239  </define>
240
241  <define name="attlist.ulink" combine="interleave">
242    <attribute name="url"/>
243  </define>
244
245  <define name="toc">
246    <element name="toc">
247      <ref name="attlist.toc"/>
248      <zeroOrMore>
249        <ref name="tocentry"/>
250      </zeroOrMore>
251    </element>
252  </define>
253
254  <define name="any" combine="choice">
255    <ref name="toc"/>
256  </define>
257
258  <define name="attlist.toc" combine="interleave">
259    <attribute name="page"/>
260    <optional>
261      <attribute name="dir"/>
262    </optional>
263    <optional>
264      <attribute name="filename"/>
265    </optional>
266  </define>
267
268  <define name="tocentry">
269    <element name="tocentry">
270      <ref name="attlist.tocentry"/>
271      <zeroOrMore>
272        <choice>
273          <ref name="title"/>
274          <ref name="titleabbrev"/>
275          <ref name="summary"/>
276        </choice>
277      </zeroOrMore>
278      <zeroOrMore>
279        <ref name="tocentry"/>
280      </zeroOrMore>
281    </element>
282  </define>
283
284  <define name="any" combine="choice">
285    <ref name="tocentry"/>
286  </define>
287
288  <define name="attlist.tocentry" combine="interleave">
289    <optional>
290      <attribute name="id">
291        <data type="ID"/>
292      </attribute>
293    </optional>
294    <optional>
295      <attribute name="page"/>
296    </optional>
297    <optional>
298      <attribute name="href"/>
299    </optional>
300    <optional>
301      <attribute name="dir"/>
302    </optional>
303    <optional>
304      <attribute name="filename"/>
305    </optional>
306    <optional>
307      <attribute name="revisionflag">
308        <choice>
309          <value>added</value>
310          <value>changed</value>
311        </choice>
312      </attribute>
313    </optional>
314    <optional>
315      <attribute name="tocskip" a:defaultValue="0">
316        <choice>
317          <value>0</value>
318          <value>1</value>
319        </choice>
320      </attribute>
321    </optional>
322  </define>
323
324  <define name="notoc">
325    <element name="notoc">
326      <ref name="attlist.notoc"/>
327      <empty/>
328    </element>
329  </define>
330
331  <define name="any" combine="choice">
332    <ref name="notoc"/>
333  </define>
334
335  <define name="attlist.notoc" combine="interleave">
336    <attribute name="page"/>
337    <optional>
338      <attribute name="dir"/>
339    </optional>
340    <optional>
341      <attribute name="filename"/>
342    </optional>
343  </define>
344
345  <define name="title">
346    <element name="title">
347      <ref name="attlist.title"/>
348      <zeroOrMore>
349        <ref name="any"/>
350      </zeroOrMore>
351    </element>
352  </define>
353
354  <define name="attlist.title" combine="interleave">
355    <empty/>
356  </define>
357
358  <define name="any" combine="choice">
359    <ref name="title"/>
360  </define>
361
362  <define name="titleabbrev">
363    <element name="titleabbrev">
364      <ref name="attlist.titleabbrev"/>
365      <zeroOrMore>
366        <ref name="any"/>
367      </zeroOrMore>
368    </element>
369  </define>
370
371  <define name="attlist.titleabbrev" combine="interleave">
372    <empty/>
373  </define>
374
375  <define name="any" combine="choice">
376    <ref name="titleabbrev"/>
377  </define>
378
379  <define name="summary">
380    <element name="summary">
381      <ref name="attlist.summary"/>
382      <zeroOrMore>
383        <text/>
384      </zeroOrMore>
385    </element>
386  </define>
387
388  <define name="attlist.summary" combine="interleave">
389    <empty/>
390  </define>
391
392  <define name="any" combine="choice">
393    <ref name="summary"/>
394  </define>
395
396  <start>
397    <choice>
398      <ref name="layout"/>
399    </choice>
400  </start>
401
402  <define name="any" combine="choice">
403    <text/>
404  </define>
405</grammar>
Note: See TracBrowser for help on using the repository browser.