1 namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
2 namespace rng = "http://relaxng.org/ns/structure/1.0"
4 # Emacs Muse RELAX NG Schema v. 1.0
5 # Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
7 # Author: Brad Collins (brad AT chenla DOT org)
8 # Maintainer: Michael Olson (mwolson AT gnu DOT org)
10 # This is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 3 of the License, or
13 # (at your option) any later version. This material is distributed in
14 # the hope that it will be useful, but WITHOUT ANY WARRANTY; without
15 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 # PARTICULAR PURPOSE. See the GNU General Public License for more
17 # details.You should have received a copy of the GNU General Public
18 # License along with this file; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 # RelaxNG Compact syntax can be converted into RelaxNG XML Syntax,
25 # DTD format and XML Schema language using free tools.
27 # Emacs users are encouraged to use James Clarke's nxml-mode for
28 # editing and validating XML files. If you are in nxml-mode use the
29 # command C-c C-s C-f to point to this schema file, say yes if you
30 # are asked if you want to copy the file to your location, and then
31 # C-c C-s C-a can be used to reload the schema if you make changes
37 # - Original version by Brad Collins.
40 # - Hacked it to the point of working with Muse's QuickStart
44 # - Permit lists to be nested.
47 # - Permit paragraph-level markup, such as links, to appear in
49 # - Support multiple definitions in a definition list.
50 # - Permit a list to be nested inside of a definition.
51 # - Permit a link to be inside of a title.
52 # - Permit emphasis to be inside of other emphasis.
63 muse.element.pageinfo?
64 & muse.element.section*
66 & muse.element.blockquote*
71 & muse.element.example*
75 # ------------------------------------------------
77 # ------------------------------------------------
78 ## pageinfo element used for metadata
80 muse.element.pageinfo = element pageinfo {
82 & muse.element.author?
83 & muse.element.maintainer?
84 & muse.element.pubdate? }?
87 muse.element.title = element title {
91 ## page author element
92 muse.element.author = element author { text }?
94 ## page maintainer element
95 muse.element.maintainer = element maintainer { text }?
97 ## page publication date element
98 muse.element.pubdate = element pubdate { text }?
100 # ------------------------------------------------
102 # ------------------------------------------------
104 muse.element.section = element section {
106 & muse.attribute.level?
107 & muse.element.section*
108 & muse.element.title*
110 & muse.element.blockquote*
111 & muse.element.table*
114 & muse.element.image*
115 & muse.element.example*
116 & muse.element.verse*
119 ## blockquote element
120 muse.element.blockquote = element blockquote {
125 muse.element.p = element p {
127 & muse.element.format*
128 & muse.element.image*
130 & muse.element.image*
131 & muse.element.anchor*
132 & muse.element.footnote*
136 muse.element.example = element example { text }?
139 muse.element.verse = element verse {
140 muse.element.line* }?
142 ## verse line element
143 muse.element.line = element line {
145 & muse.element.format*
146 & muse.element.image*
148 & muse.element.image*
149 & muse.element.anchor*
150 & muse.element.footnote*
153 # ------------------------------------------------
154 # Unordered list elements
155 # ------------------------------------------------
157 muse.element.list = element list {
159 & muse.element.item* }?
161 muse.element.item = element item {
163 & muse.element.definition*
165 & muse.element.format*
166 & muse.element.image*
169 & muse.element.blockquote*
170 & muse.element.table*
171 & muse.element.example*
172 & muse.element.verse*
176 # ------------------------------------------------
177 # Definition list elements
178 # ------------------------------------------------
180 muse.element.term = element term {
182 & muse.element.format*
183 & muse.element.image*
185 & muse.element.image*
189 muse.element.definition = element definition {
191 & muse.element.format*
192 & muse.element.image*
194 & muse.element.image*
198 # ------------------------------------------------
200 # ------------------------------------------------
203 ## used for emphasis, underlining, and centering paragraphs
204 muse.element.format = element format {
206 & muse.attribute.level?
208 & muse.element.format*
212 ## used for small pieces of monospace text, like commands
213 muse.element.code = element code { text }?
215 muse.element.image = element image { muse.attribute.href? }?
217 ## horizontal rule element
218 muse.element.hr = element hr { empty }?
221 muse.element.footnote = element footnote { text }?
224 muse.element.anchor = element anchor { muse.attribute.id }?
227 muse.element.link = element link {
229 & muse.attribute.href
232 # ------------------------------------------------
234 # ------------------------------------------------
237 muse.attribute.type = attribute type { text }?
240 muse.attribute.level = attribute level { text }?
242 ## href attribute -- must have valid URI
243 muse.attribute.href = attribute href { xsd:anyURI }?
246 muse.attribute.id = attribute id { text }?
248 # ------------------------------------------------
250 # ------------------------------------------------
253 muse.element.table = element table {
255 & muse.element.thead*
256 & muse.element.tfoot* }?
258 ## table body element
259 muse.element.tbody = element tbody { muse.element.tr* }?
261 ## table header element
262 muse.element.thead = element thead { muse.element.tr* }?
264 ## table footer element
265 muse.element.tfoot = element tfoot { muse.element.tr* }?
268 muse.element.tr = element tr {
270 & muse.element.th* }?
273 muse.element.td = element td {
275 & muse.element.format*
276 & muse.element.image*
278 & muse.element.image*
279 & muse.element.anchor*
280 & muse.element.footnote*
284 muse.element.th = element th {
286 & muse.element.format*
287 & muse.element.image*
289 & muse.element.image*
290 & muse.element.anchor*
291 & muse.element.footnote*