source: BOOK/schema/clfs/0.1/rng/clfs.rnc@ 8823a97

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

Add an attribute to the schema. c:r, r for reference.

  • Property mode set to 100644
File size: 4.1 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
41clfs.attrib.r = attribute c:r { text }?
42
43# Inline Elements
44
45clfs.inline =
46 (clfs.inline.literal |
47 clfs.inline.replaceable |
48 clfs.inline.application |
49 clfs.inline.dirname |
50 clfs.inline.filename |
51 clfs.inline.command |
52 text)*
53
54clfs.inline.common.attrib =
55 clfs.attrib.arch,
56 clfs.attrib.bits,
57 clfs.attrib.multilib
58
59clfs.inline.literal =
60 element c:literal {
61 clfs.inline.common.attrib,
62 clfs.inline
63 }
64clfs.inline.replaceable =
65 element c:replaceable {
66 clfs.inline.common.attrib,
67 clfs.inline
68 }
69clfs.inline.application =
70 element c:application {
71 clfs.inline.common.attrib,
72 clfs.inline
73 }
74clfs.inline.dirname =
75 element c:dirname {
76 clfs.inline.common.attrib,
77 clfs.inline
78 }
79clfs.inline.filename =
80 element c:filename {
81 clfs.inline.common.attrib,
82 clfs.inline
83 }
84clfs.inline.command =
85 element c:command {
86 clfs.inline.common.attrib,
87 clfs.inline
88 }
89
90# Block Elements
91
92clfs.package.para =
93 element c:para {
94 xml.attrib.base,
95 clfs.attrib.arch,
96 clfs.attrib.bits,
97 clfs.attrib.multilib,
98 clfs.attrib.r,
99 clfs.inline
100 }
101
102clfs.package.note =
103 element c:note {
104 xml.attrib.base,
105 clfs.attrib.arch,
106 clfs.attrib.bits,
107 clfs.attrib.multilib,
108 clfs.attrib.r,
109 (clfs.package.para | clfs.package.command)*
110 }
111
112clfs.package.warning =
113 element c:note {
114 xml.attrib.base,
115 clfs.attrib.arch,
116 clfs.attrib.bits,
117 clfs.attrib.multilib,
118 clfs.attrib.r,
119 (clfs.package.para | clfs.package.command)*
120 }
121
122clfs.package.command =
123 element c:command {
124 xml.attrib.base,
125 clfs.attrib.arch,
126 clfs.attrib.bits,
127 clfs.attrib.multilib,
128 clfs.attrib.r,
129 attribute c:nodump {
130 "true" | "false"
131 }?,
132 (element c:literal { text } | text)+
133 }
134
135clfs.package.title =
136 element c:title {
137 xml.attrib.base,
138 text
139 }
140
141clfs.package.version =
142 element c:version {
143 xml.attrib.base,
144 text
145 }
146
147clfs.package.variant =
148 element c:variant {
149 xml.attrib.base,
150 text
151 }?
152
153clfs.package.description =
154 element c:description {
155 xml.attrib.base,
156 clfs.inline
157 }
158
159# The Package
160clfs.sect.package =
161 element c:package {
162 xml.attrib.base,
163 xml.attrib.id,
164 clfs.attrib.arch,
165 clfs.attrib.bits,
166 clfs.attrib.multilib,
167 attribute c:multibuild {
168 "true" | "false"
169 },
170
171 clfs.package.title,
172 clfs.package.version,
173 clfs.package.variant,
174 clfs.package.description,
175
176 element c:install {
177 (clfs.package.para |
178 clfs.package.command |
179 clfs.package.note |
180 clfs.package.warning)+
181 }?,
182
183 element c:config {
184 (clfs.package.para |
185 clfs.package.command |
186 clfs.package.note |
187 clfs.package.warning)+
188 }?,
189
190 element c:contents {
191 attribute c:ref {
192 text
193 } | (
194 element c:program {
195 element c:name {
196 text
197 },
198 element c:description {
199 clfs.inline
200 }
201 }*,
202 element c:library {
203 element c:name {
204 text
205 },
206 element c:description {
207 clfs.inline
208 }
209 }*,
210 element c:directory {
211 element c:name {
212 text
213 },
214 element c:description {
215 clfs.inline
216 }
217 }*
218 )
219 }?
220 }
Note: See TracBrowser for help on using the repository browser.