* configure.ac (--enable-link-time-optimization): Add clang support.
[bpt/emacs.git] / etc / schema / relaxng.rnc
CommitLineData
8cd39fb3
MH
1# RELAX NG XML syntax expressed in RELAX NG Compact syntax.
2
ba318903 3# Copyright (C) 2003-2004, 2007-2014 Free Software Foundation, Inc.
7742c3dc
CY
4
5# This file is part of GNU Emacs.
6
7# GNU Emacs is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
8cd39fb3
MH
20default namespace rng = "http://relaxng.org/ns/structure/1.0"
21namespace local = ""
22datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
23
24start = pattern
25
26pattern =
27 element element { (nameQName | nameClass), (common & pattern+) }
28 | element attribute { (nameQName | nameClass), (common & pattern?) }
29 | element group|interleave|choice|optional
30 |zeroOrMore|oneOrMore|list|mixed { common & pattern+ }
31 | element ref|parentRef { nameNCName, common }
32 | element empty|notAllowed|text { common }
33 | element data { type, param*, (common & exceptPattern?) }
34 | element value { commonAttributes, type?, xsd:string }
35 | element externalRef { href, common }
36 | element grammar { common & grammarContent* }
37
38param = element param { commonAttributes, nameNCName, xsd:string }
39
40exceptPattern = element except { common & pattern+ }
41
42grammarContent =
43 definition
44 | element div { common & grammarContent* }
45 | element include { href, (common & includeContent*) }
46
47includeContent =
48 definition
49 | element div { common & includeContent* }
50
51definition =
52 element start { combine?, (common & pattern+) }
53 | element define { nameNCName, combine?, (common & pattern+) }
54
55combine = attribute combine { "choice" | "interleave" }
56
57nameClass =
58 element name { commonAttributes, xsd:QName }
59 | element anyName { common & exceptNameClass? }
60 | element nsName { common & exceptNameClass? }
61 | element choice { common & nameClass+ }
62
63exceptNameClass = element except { common & nameClass+ }
64
65nameQName = attribute name { xsd:QName }
66nameNCName = attribute name { xsd:NCName }
67href = attribute href { xsd:anyURI }
68type = attribute type { xsd:NCName }
69
70common = commonAttributes, foreignElement*
71
72commonAttributes =
73 attribute ns { xsd:string }?,
74 attribute datatypeLibrary { xsd:anyURI }?,
75 foreignAttribute*
76
77foreignElement = element * - rng:* { (anyAttribute | text | anyElement)* }
78foreignAttribute = attribute * - (rng:*|local:*) { text }
79anyElement = element * { (anyAttribute | text | anyElement)* }
80anyAttribute = attribute * { text }