source: BOOK/schema/clfs/0.1/rng/clfs.rnc@ 1bdabc9

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

Clean up the schema a bit.

  • Property mode set to 100644
File size: 3.9 KB
Line 
1
2namespace c = "http://schema.cross-lfs.org/book"
3
4# We are building around the DocBook Schema
5include "../../../docbook/4.5/rng/docbook.rnc" {
6 sect1 = (
7 element sect1 {
8 sect1.attlist,
9 sect1info?,
10 sect.title.content,
11 nav.class*,
12 ((divcomponent.mix+, (refentry.class* | sect2* | simplesect*))
13 | refentry.class+
14 | sect2+
15 | simplesect+),
16 nav.class*
17 } | clfs.sect.package )
18}
19
20# Common Attributes
21xml.attrib.base =
22 attribute xml:base {
23 text
24 }?
25xml.attrib.id =
26 attribute id {
27 text
28 }
29
30# Extend the standard profiling attributes
31local.effectivity.attrib &=
32 clfs.attrib.arch,
33 clfs.attrib.bits,
34 clfs.attrib.multilib
35
36# Profiling Attributes
37clfs.attrib.arch = attribute c:arch { text }?
38clfs.attrib.bits = attribute c:bits { text }?
39clfs.attrib.multilib = attribute c:multilib { "true" | "false" }?
40
41# Inline Elements
42
43clfs.inline =
44 (clfs.inline.literal |
45 clfs.inline.replaceable |
46 clfs.inline.application |
47 clfs.inline.dirname |
48 clfs.inline.filename |
49 clfs.inline.command |
50 text)*
51
52clfs.inline.common.attrib =
53 clfs.attrib.arch,
54 clfs.attrib.bits,
55 clfs.attrib.multilib
56
57clfs.inline.literal =
58 element c:literal {
59 clfs.inline.common.attrib,
60 clfs.inline
61 }
62clfs.inline.replaceable =
63 element c:replaceable {
64 clfs.inline.common.attrib,
65 clfs.inline
66 }
67clfs.inline.application =
68 element c:application {
69 clfs.inline.common.attrib,
70 clfs.inline
71 }
72clfs.inline.dirname =
73 element c:dirname {
74 clfs.inline.common.attrib,
75 clfs.inline
76 }
77clfs.inline.filename =
78 element c:filename {
79 clfs.inline.common.attrib,
80 clfs.inline
81 }
82clfs.inline.command =
83 element c:command {
84 clfs.inline.common.attrib,
85 clfs.inline
86 }
87
88# Block Elements
89
90clfs.package.para =
91 element c:para {
92 clfs.attrib.arch,
93 clfs.attrib.bits,
94 clfs.attrib.multilib,
95 clfs.inline
96 }
97
98clfs.package.note =
99 element c:note {
100 clfs.attrib.arch,
101 clfs.attrib.bits,
102 clfs.attrib.multilib,
103 (clfs.package.para | clfs.package.command)*
104 }
105
106clfs.package.warning =
107 element c:note {
108 clfs.attrib.arch,
109 clfs.attrib.bits,
110 clfs.attrib.multilib,
111 (clfs.package.para | clfs.package.command)*
112 }
113
114clfs.package.command =
115 element c:command {
116 clfs.attrib.arch,
117 clfs.attrib.bits,
118 clfs.attrib.multilib,
119 attribute c:nodump {
120 "true" | "false"
121 }?,
122 (element c:literal { text } | text)+
123 }
124
125clfs.package.title =
126 element c:title {
127 xml.attrib.base,
128 text
129 }
130
131clfs.package.version =
132 element c:version {
133 xml.attrib.base,
134 text
135 }
136
137clfs.package.variant =
138 element c:variant {
139 xml.attrib.base,
140 text
141 }?
142
143clfs.package.description =
144 element c:description {
145 xml.attrib.base,
146 clfs.inline
147 }
148
149# The Package
150clfs.sect.package =
151 element c:package {
152 xml.attrib.base,
153 xml.attrib.id,
154 clfs.attrib.arch,
155 clfs.attrib.bits,
156 clfs.attrib.multilib,
157 attribute c:multibuild {
158 "true" | "false"
159 },
160
161 clfs.package.title,
162 clfs.package.version,
163 clfs.package.variant,
164 clfs.package.description,
165
166 element c:install {
167 (clfs.package.para |
168 clfs.package.command |
169 clfs.package.note |
170 clfs.package.warning)+
171 }?,
172
173 element c:config {
174 (clfs.package.para |
175 clfs.package.command |
176 clfs.package.note |
177 clfs.package.warning)+
178 }?,
179
180 element c:contents {
181 attribute c:ref {
182 text
183 } | (
184 element c:program {
185 element c:name {
186 text
187 },
188 element c:description {
189 clfs.inline
190 }
191 }*,
192 element c:library {
193 element c:name {
194 text
195 },
196 element c:description {
197 clfs.inline
198 }
199 }*,
200 element c:directory {
201 element c:name {
202 text
203 },
204 element c:description {
205 clfs.inline
206 }
207 }*
208 )
209 }?
210 }
Note: See TracBrowser for help on using the repository browser.