annotate etc/schema/relaxng.rnc @ 112180:a48c0a71829b

* NEWS: Add new function dbus-register-service.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 10 Jan 2011 10:40:20 +0100
parents 1d1d5d9bd884
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86361
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
1 # RELAX NG XML syntax expressed in RELAX NG Compact syntax.
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100972
diff changeset
3 # Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
99471
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
4
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
5 # This file is part of GNU Emacs.
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
6
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
7 # GNU Emacs is free software: you can redistribute it and/or modify
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
8 # it under the terms of the GNU General Public License as published by
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
9 # the Free Software Foundation, either version 3 of the License, or
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
10 # (at your option) any later version.
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
11
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
12 # GNU Emacs is distributed in the hope that it will be useful,
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
15 # GNU General Public License for more details.
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
16
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
17 # You should have received a copy of the GNU General Public License
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
ef31eb276c4b Add standard Emacs copyright notice, treating this file as part of
Chong Yidong <cyd@stupidchicken.com>
parents: 86361
diff changeset
19
86361
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
20 default namespace rng = "http://relaxng.org/ns/structure/1.0"
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
21 namespace local = ""
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
22 datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
23
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
24 start = pattern
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
25
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
26 pattern =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
27 element element { (nameQName | nameClass), (common & pattern+) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
28 | element attribute { (nameQName | nameClass), (common & pattern?) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
29 | element group|interleave|choice|optional
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
30 |zeroOrMore|oneOrMore|list|mixed { common & pattern+ }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
31 | element ref|parentRef { nameNCName, common }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
32 | element empty|notAllowed|text { common }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
33 | element data { type, param*, (common & exceptPattern?) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
34 | element value { commonAttributes, type?, xsd:string }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
35 | element externalRef { href, common }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
36 | element grammar { common & grammarContent* }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
37
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
38 param = element param { commonAttributes, nameNCName, xsd:string }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
39
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
40 exceptPattern = element except { common & pattern+ }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
41
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
42 grammarContent =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
43 definition
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
44 | element div { common & grammarContent* }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
45 | element include { href, (common & includeContent*) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
46
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
47 includeContent =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
48 definition
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
49 | element div { common & includeContent* }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
50
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
51 definition =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
52 element start { combine?, (common & pattern+) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
53 | element define { nameNCName, combine?, (common & pattern+) }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
54
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
55 combine = attribute combine { "choice" | "interleave" }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
56
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
57 nameClass =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
58 element name { commonAttributes, xsd:QName }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
59 | element anyName { common & exceptNameClass? }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
60 | element nsName { common & exceptNameClass? }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
61 | element choice { common & nameClass+ }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
62
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
63 exceptNameClass = element except { common & nameClass+ }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
64
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
65 nameQName = attribute name { xsd:QName }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
66 nameNCName = attribute name { xsd:NCName }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
67 href = attribute href { xsd:anyURI }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
68 type = attribute type { xsd:NCName }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
69
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
70 common = commonAttributes, foreignElement*
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
71
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
72 commonAttributes =
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
73 attribute ns { xsd:string }?,
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
74 attribute datatypeLibrary { xsd:anyURI }?,
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
75 foreignAttribute*
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
76
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
77 foreignElement = element * - rng:* { (anyAttribute | text | anyElement)* }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
78 foreignAttribute = attribute * - (rng:*|local:*) { text }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
79 anyElement = element * { (anyAttribute | text | anyElement)* }
38f93f3d00a2 Initial merge of nxml
Mark A. Hershberger <mah@everybody.org>
parents:
diff changeset
80 anyAttribute = attribute * { text }