Mercurial > emacs
annotate etc/schema/relaxng.rnc @ 102422:82f82b92314e
(CODING_ISO_CMP_STATUS): New macro.
(CODING_ISO_EXTSEGMENT_LEN, CODING_ISO_EMBEDDED_UTF_8): New macros.
(MAX_ANNOTATION_LENGTH): Defined to 5.
(ADD_COMPOSITION_DATA): New arg nbytes.
(emacs_mule_char): New arg cmp_status.
(DECODE_EMACS_MULE_COMPOSITION_CHAR): Delete it.
(DECODE_EMACS_MULE_COMPOSITION_RULE_20): New arg c.
(DECODE_EMACS_MULE_COMPOSITION_RULE_21): New arg c.
(DECODE_EMACS_MULE_21_COMPOSITION): Delete the arg c.
(DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_COMPOSITION_START): New macro.
(EMACS_MULE_COMPOSITION_END): New macro.
(emacs_mule_finish_composition): New function.
(EMACS_MULE_MAYBE_FINISH_COMPOSITION): New macro.
(decode_coding_emacs_mule): Avoid long looking ahead while
handling composition.
(DECODE_COMPOSITION_RULE): Argument changed to rule and nbytes.
(ENCODE_COMPOSITION_RULE): New macro.
(finish_composition): New function.
(MAYBE_FINISH_COMPOSITION): Call finish_composition.
(DECODE_COMPOSITION_START): New implementation.
(DECODE_COMPOSITION_END): Likewise.
(STORE_COMPOSITION_RULE): New macro.
(decode_coding_iso_2022): Avoid long looking ahead while handling
composition, CTEXT extended segment, and embedded UTF-8.
(setup_coding_system): For a coding of type iso-2022, reset
CODING_ISO_EXTSEGMENT_LEN (coding) and
CODING_ISO_EMBEDDED_UTF_8 (coding).
(get_translation): Delete arguments last_block, from_nchars,
to_nchars. Callers changed.
(produce_chars): Don't modify charbuf. Adjusted for the change of
get_translation.
(produce_composition): Adjusted for the new annotation sequence.
(handle_composition_annotation): Likewise.
(consume_chars): Adjusted for the change of get_translation.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 06 Mar 2009 07:51:52 +0000 |
parents | c90853557b90 |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
86361 | 1 # RELAX NG XML syntax expressed in RELAX NG Compact syntax. |
2 | |
100972 | 3 # Copyright (C) 2003, 2004, 2007, 2008, 2009 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 | 20 default namespace rng = "http://relaxng.org/ns/structure/1.0" |
21 namespace local = "" | |
22 datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" | |
23 | |
24 start = pattern | |
25 | |
26 pattern = | |
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 | |
38 param = element param { commonAttributes, nameNCName, xsd:string } | |
39 | |
40 exceptPattern = element except { common & pattern+ } | |
41 | |
42 grammarContent = | |
43 definition | |
44 | element div { common & grammarContent* } | |
45 | element include { href, (common & includeContent*) } | |
46 | |
47 includeContent = | |
48 definition | |
49 | element div { common & includeContent* } | |
50 | |
51 definition = | |
52 element start { combine?, (common & pattern+) } | |
53 | element define { nameNCName, combine?, (common & pattern+) } | |
54 | |
55 combine = attribute combine { "choice" | "interleave" } | |
56 | |
57 nameClass = | |
58 element name { commonAttributes, xsd:QName } | |
59 | element anyName { common & exceptNameClass? } | |
60 | element nsName { common & exceptNameClass? } | |
61 | element choice { common & nameClass+ } | |
62 | |
63 exceptNameClass = element except { common & nameClass+ } | |
64 | |
65 nameQName = attribute name { xsd:QName } | |
66 nameNCName = attribute name { xsd:NCName } | |
67 href = attribute href { xsd:anyURI } | |
68 type = attribute type { xsd:NCName } | |
69 | |
70 common = commonAttributes, foreignElement* | |
71 | |
72 commonAttributes = | |
73 attribute ns { xsd:string }?, | |
74 attribute datatypeLibrary { xsd:anyURI }?, | |
75 foreignAttribute* | |
76 | |
77 foreignElement = element * - rng:* { (anyAttribute | text | anyElement)* } | |
78 foreignAttribute = attribute * - (rng:*|local:*) { text } | |
79 anyElement = element * { (anyAttribute | text | anyElement)* } | |
80 anyAttribute = attribute * { text } |