source: BOOK/schema/clfs/0.1/rng/clfs.rng@ d4c109d

Last change on this file since d4c109d was d4c109d, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Add xml:base to items that may be included in another page using an xi:include.

  • Property mode set to 100644
File size: 8.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<grammar xmlns:c="http://schema.cross-lfs.org/book" xmlns="http://relaxng.org/ns/structure/1.0">
3 <!-- We are building around the DocBook Schema -->
4 <include href="docbook.rng">
5 <define name="sect1">
6 <choice>
7 <element name="sect1">
8 <ref name="sect1.attlist"/>
9 <optional>
10 <ref name="sect1info"/>
11 </optional>
12 <ref name="sect.title.content"/>
13 <zeroOrMore>
14 <ref name="nav.class"/>
15 </zeroOrMore>
16 <choice>
17 <group>
18 <oneOrMore>
19 <ref name="divcomponent.mix"/>
20 </oneOrMore>
21 <choice>
22 <zeroOrMore>
23 <ref name="refentry.class"/>
24 </zeroOrMore>
25 <zeroOrMore>
26 <ref name="sect2"/>
27 </zeroOrMore>
28 <zeroOrMore>
29 <ref name="simplesect"/>
30 </zeroOrMore>
31 </choice>
32 </group>
33 <oneOrMore>
34 <ref name="refentry.class"/>
35 </oneOrMore>
36 <oneOrMore>
37 <ref name="sect2"/>
38 </oneOrMore>
39 <oneOrMore>
40 <ref name="simplesect"/>
41 </oneOrMore>
42 </choice>
43 <zeroOrMore>
44 <ref name="nav.class"/>
45 </zeroOrMore>
46 </element>
47 <ref name="clfs.sect.package"/>
48 </choice>
49 </define>
50 </include>
51 <!-- Common Attributes -->
52 <define name="xml.attrib.base">
53 <optional>
54 <attribute name="xml:base"/>
55 </optional>
56 </define>
57 <define name="xml.attrib.id">
58 <attribute name="id"/>
59 </define>
60 <!-- Extend the standard profiling attributes -->
61 <define name="local.effectivity.attrib" combine="interleave">
62 <ref name="clfs.attrib.arch"/>
63 <ref name="clfs.attrib.bits"/>
64 <ref name="clfs.attrib.multilib"/>
65 </define>
66 <!-- Profiling Attributes -->
67 <define name="clfs.attrib.arch">
68 <optional>
69 <attribute name="c:arch"/>
70 </optional>
71 </define>
72 <define name="clfs.attrib.bits">
73 <optional>
74 <attribute name="c:bits"/>
75 </optional>
76 </define>
77 <define name="clfs.attrib.multilib">
78 <optional>
79 <attribute name="c:multilib">
80 <choice>
81 <value>true</value>
82 <value>false</value>
83 </choice>
84 </attribute>
85 </optional>
86 </define>
87 <!-- Inline Elements -->
88 <define name="clfs.inline">
89 <zeroOrMore>
90 <choice>
91 <ref name="clfs.inline.literal"/>
92 <ref name="clfs.inline.replaceable"/>
93 <ref name="clfs.inline.application"/>
94 <ref name="clfs.inline.dirname"/>
95 <ref name="clfs.inline.filename"/>
96 <ref name="clfs.inline.command"/>
97 <text/>
98 </choice>
99 </zeroOrMore>
100 </define>
101 <define name="clfs.inline.common.attrib">
102 <ref name="clfs.attrib.arch"/>
103 <ref name="clfs.attrib.bits"/>
104 <ref name="clfs.attrib.multilib"/>
105 </define>
106 <define name="clfs.inline.literal">
107 <element name="c:literal">
108 <ref name="clfs.inline.common.attrib"/>
109 <ref name="clfs.inline"/>
110 </element>
111 </define>
112 <define name="clfs.inline.replaceable">
113 <element name="c:replaceable">
114 <ref name="clfs.inline.common.attrib"/>
115 <ref name="clfs.inline"/>
116 </element>
117 </define>
118 <define name="clfs.inline.application">
119 <element name="c:application">
120 <ref name="clfs.inline.common.attrib"/>
121 <ref name="clfs.inline"/>
122 </element>
123 </define>
124 <define name="clfs.inline.dirname">
125 <element name="c:dirname">
126 <ref name="clfs.inline.common.attrib"/>
127 <ref name="clfs.inline"/>
128 </element>
129 </define>
130 <define name="clfs.inline.filename">
131 <element name="c:filename">
132 <ref name="clfs.inline.common.attrib"/>
133 <ref name="clfs.inline"/>
134 </element>
135 </define>
136 <define name="clfs.inline.command">
137 <element name="c:command">
138 <ref name="clfs.inline.common.attrib"/>
139 <ref name="clfs.inline"/>
140 </element>
141 </define>
142 <!-- Block Elements -->
143 <define name="clfs.package.para">
144 <element name="c:para">
145 <ref name="clfs.attrib.arch"/>
146 <ref name="clfs.attrib.bits"/>
147 <ref name="clfs.attrib.multilib"/>
148 <ref name="clfs.inline"/>
149 </element>
150 </define>
151 <define name="clfs.package.note">
152 <element name="c:note">
153 <ref name="clfs.attrib.arch"/>
154 <ref name="clfs.attrib.bits"/>
155 <ref name="clfs.attrib.multilib"/>
156 <zeroOrMore>
157 <choice>
158 <ref name="clfs.package.para"/>
159 <ref name="clfs.package.command"/>
160 </choice>
161 </zeroOrMore>
162 </element>
163 </define>
164 <define name="clfs.package.warning">
165 <element name="c:note">
166 <ref name="clfs.attrib.arch"/>
167 <ref name="clfs.attrib.bits"/>
168 <ref name="clfs.attrib.multilib"/>
169 <zeroOrMore>
170 <choice>
171 <ref name="clfs.package.para"/>
172 <ref name="clfs.package.command"/>
173 </choice>
174 </zeroOrMore>
175 </element>
176 </define>
177 <define name="clfs.package.command">
178 <element name="c:command">
179 <ref name="clfs.attrib.arch"/>
180 <ref name="clfs.attrib.bits"/>
181 <ref name="clfs.attrib.multilib"/>
182 <optional>
183 <attribute name="c:nodump">
184 <choice>
185 <value>true</value>
186 <value>false</value>
187 </choice>
188 </attribute>
189 </optional>
190 <oneOrMore>
191 <choice>
192 <element name="c:literal">
193 <text/>
194 </element>
195 <text/>
196 </choice>
197 </oneOrMore>
198 </element>
199 </define>
200 <!-- The Package -->
201 <define name="clfs.sect.package">
202 <element name="c:package">
203 <ref name="xml.attrib.base"/>
204 <ref name="xml.attrib.id"/>
205 <ref name="clfs.attrib.arch"/>
206 <ref name="clfs.attrib.bits"/>
207 <ref name="clfs.attrib.multilib"/>
208 <attribute name="c:multibuild">
209 <choice>
210 <value>true</value>
211 <value>false</value>
212 </choice>
213 </attribute>
214 <element name="c:title">
215 <ref name="xml.attrib.base"/>
216 <text/>
217 </element>
218 <element name="c:version">
219 <ref name="xml.attrib.base"/>
220 <text/>
221 </element>
222 <optional>
223 <element name="c:variant">
224 <ref name="xml.attrib.base"/>
225 <text/>
226 </element>
227 </optional>
228 <element name="c:description">
229 <ref name="xml.attrib.base"/>
230 <ref name="clfs.inline"/>
231 </element>
232 <optional>
233 <element name="c:install">
234 <oneOrMore>
235 <choice>
236 <ref name="clfs.package.para"/>
237 <ref name="clfs.package.command"/>
238 <ref name="clfs.package.note"/>
239 <ref name="clfs.package.warning"/>
240 </choice>
241 </oneOrMore>
242 </element>
243 </optional>
244 <optional>
245 <element name="c:config">
246 <oneOrMore>
247 <choice>
248 <ref name="clfs.package.para"/>
249 <ref name="clfs.package.command"/>
250 <ref name="clfs.package.note"/>
251 <ref name="clfs.package.warning"/>
252 </choice>
253 </oneOrMore>
254 </element>
255 </optional>
256 <optional>
257 <element name="c:contents">
258 <choice>
259 <attribute name="c:ref"/>
260 <group>
261 <zeroOrMore>
262 <element name="c:program">
263 <element name="c:name">
264 <text/>
265 </element>
266 <element name="c:description">
267 <ref name="clfs.inline"/>
268 </element>
269 </element>
270 </zeroOrMore>
271 <zeroOrMore>
272 <element name="c:library">
273 <element name="c:name">
274 <text/>
275 </element>
276 <element name="c:description">
277 <ref name="clfs.inline"/>
278 </element>
279 </element>
280 </zeroOrMore>
281 <zeroOrMore>
282 <element name="c:directory">
283 <element name="c:name">
284 <text/>
285 </element>
286 <element name="c:description">
287 <ref name="clfs.inline"/>
288 </element>
289 </element>
290 </zeroOrMore>
291 </group>
292 </choice>
293 </element>
294 </optional>
295 </element>
296 </define>
297</grammar>
Note: See TracBrowser for help on using the repository browser.