forked from cjkvi/cjkvi-dict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swjz.rnc
96 lines (77 loc) · 1.86 KB
/
swjz.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
# 説文解字注 Schema
# $Id: swjz.rnc,v 1.3 2011/05/23 13:59:05 kawabata Exp $
start = element book {volumes, attribute title {text}}
volumes = element volumes {
preface,
element catalogs {
element catalogtitle {text},
(element volume_num {text},
element chaptertitle {attribute href {text}, text}+)+,
element endcatalogtitle {text_note}
},
chapter+,
chapter2+,
preface
}
preface = element preface {
(element prefacetitle {text},
element content {text_note} )+
}
# for volume 1-14
chapter = element chapter {
element chaptertitle {attribute id {xsd:ID}, text_note},
author,
(shuowen+, part_wordnum?)+,
element volume_wordnum {text_note}?,
endchapter
}
# for volume 15
chapter2 = element chapter {
element chaptertitle {attribute id {xsd:ID}, text_note},
author,
shuowen2,
endchapter
}
shuowen2 = element shuowen2 {
text_note2,
element section {
element section_num {text},
element part_word {
element wordhead {pict_text},
text_note?
}+
}*
}
pict_text = (
text |
element img {attribute src {text}, text}
)
shuowen = element shuowen {
(element wordhead {
attribute id {text}?,
attribute img {text}?,
pict_text
},
text_note2?)+
}
part_wordnum = element part_wordnum {
text_note
}
endchapter = (
author* &
element endchapter {text_note}? &
element addenda {
element addenda_title {text}?,
text_note2
}? &
element publishdate {text}?
)
author = element author {text_note}
text_note = mixed {duan_note*}
text_note2 = ( (duan_note, (explanation, duan_note)*, explanation?)
| (explanation, (duan_note, explanation)*, duan_note?))
explanation = element explanation {common_text}
duan_note = element duan_note {mixed {common_text, note*}}
note = element note {common_text}
common_text = mixed {seal_script*}
seal_script = element seal_script {text}