-
Notifications
You must be signed in to change notification settings - Fork 35
/
sbgy.rnc
116 lines (105 loc) · 2.12 KB
/
sbgy.rnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# 校正宋本廣韻 Schema
# $Id: sbgy.rnc,v 1.1 2009/05/05 01:50:52 kawabata Exp $
# Book Structure
start = element book {
attribute title {text},
preface+,
old_preface,
volume+, # five volumes
appendix,
element postscript {text}
}
preface = element preface {
element preface_title {text},
element content {text}
}
old_preface = element old_preface {
element preface_file {text},
element sect {
mixed {
element word_head {
word,
element fanqie {text}
}*
}}+
}
volume = element volume {
attribute id {xsd:ID},
element volume_title {text},
element catalog {
element rhythmic_entry {
element fanqie {text},
text,
element note {text}?
}+
},
element rhyme {
attribute id {xsd:ID}?,
element rhyme_num {text},
element voice_part {
attribute id {xsd:ID}?,
attribute ipa {text},
attribute onyomi {text},
word_head, (word_head | added_word)*
}+
}+,
element end_volume {text},
accession?
}
accession = element accession {
element accession_title {text},
element word_head {
word,
element fanqie {text2}
}+
}
appendix = element appendix {
(
element appendix_title {text},
element content {
mixed {element note {text2}*}
}+
)+,
element debate {
element debate_title {text},
element four_tone {
element qingzhuo {
element qingzhuo_title {
text,
element note {text}?
},
(word_head | added_word)+
}+
}+
}
}
# Text Structure
# `fanqie' can appear either outside or inside of original_text section.
text2 = mixed {
element fanqie {mixed {text2}}? &
(
element added_text {text} |
element original_text {
text2,
( element rewrite_text {text2} |
element check_note {text})
}
)*
}
word = mixed {
element original_word {
text,
( element rewrite_word {text} |
element headnote {text} )
}?
}
word_head = element word_head {
attribute id {xsd:ID}?,
word,
element note {text2}
}
added_word = element added_word {
attribute id {xsd:ID}?,
word,
element added_note {text2}
}