intsubset2.xml.sax2 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. SAX.setDocumentLocator()
  2. SAX.startDocument()
  3. SAX.internalSubset(kanjidic2, , )
  4. SAX.comment( Version 1.3
  5. This is the DTD of the XML-format kanji file combining information from
  6. the KANJIDIC and KANJD212 files. It is intended to be largely self-
  7. documenting, with each field being accompanied by an explanatory
  8. comment.
  9. The file covers the following kanji:
  10. (a) the 6,355 kanji from JIS X 0208;
  11. (b) the 5,801 kanji from JIS X 0212;
  12. (c) the 3,625 kanji from JIS X 0213 as follows:
  13. (i) the 2,741 kanji which are also in JIS X 0212 have
  14. JIS X 0213 code-points (kuten) added to the existing entry;
  15. (ii) the 884 "new" kanji have new entries.
  16. At the end of the explanation for a number of fields there is a tag
  17. with the format [N]. This indicates the leading letter(s) of the
  18. equivalent field in the KANJIDIC and KANJD212 files.
  19. The KANJIDIC documentation should also be read for additional
  20. information about the information in the file.
  21. )
  22. SAX.elementDecl(kanjidic2, 4, ...)
  23. SAX.elementDecl(header, 4, ...)
  24. SAX.comment(
  25. The single header element will contain identification information
  26. about the version of the file
  27. )
  28. SAX.elementDecl(file_version, 3, ...)
  29. SAX.comment(
  30. This field denotes the version of kanjidic2 structure, as more
  31. than one version may exist.
  32. )
  33. SAX.elementDecl(database_version, 3, ...)
  34. SAX.comment(
  35. The version of the file, in the format YYYY-NN, where NN will be
  36. a number starting with 01 for the first version released in a
  37. calendar year, then increasing for each version in that year.
  38. )
  39. SAX.elementDecl(date_of_creation, 3, ...)
  40. SAX.comment(
  41. The date the file was created in international format (YYYY-MM-DD).
  42. )
  43. SAX.elementDecl(character, 4, ...)
  44. SAX.elementDecl(literal, 3, ...)
  45. SAX.comment(
  46. The character itself in UTF8 coding.
  47. )
  48. SAX.elementDecl(codepoint, 4, ...)
  49. SAX.comment(
  50. The codepoint element states the code of the character in the various
  51. character set standards.
  52. )
  53. SAX.elementDecl(cp_value, 3, ...)
  54. SAX.comment(
  55. The cp_value contains the codepoint of the character in a particular
  56. standard. The standard will be identified in the cp_type attribute.
  57. )
  58. SAX.attributeDecl(cp_value, cp_type, 1, 2, NULL, ...)
  59. SAX.comment(
  60. The cp_type attribute states the coding standard applying to the
  61. element. The values assigned so far are:
  62. jis208 - JIS X 0208-1997 - kuten coding (nn-nn)
  63. jis212 - JIS X 0212-1990 - kuten coding (nn-nn)
  64. jis213 - JIS X 0213-2000 - kuten coding (p-nn-nn)
  65. ucs - Unicode 4.0 - hex coding (4 or 5 hexadecimal digits)
  66. )
  67. SAX.elementDecl(radical, 4, ...)
  68. SAX.elementDecl(rad_value, 3, ...)
  69. SAX.comment(
  70. The radical number, in the range 1 to 214. The particular
  71. classification type is stated in the rad_type attribute.
  72. )
  73. SAX.attributeDecl(rad_value, rad_type, 1, 2, NULL, ...)
  74. SAX.comment(
  75. The rad_type attribute states the type of radical classification.
  76. classical - as recorded in the KangXi Zidian.
  77. nelson - as used in the Nelson "Modern Japanese-English
  78. Character Dictionary" (i.e. the Classic, not the New Nelson).
  79. This will only be used where Nelson reclassified the kanji.
  80. )
  81. SAX.elementDecl(misc, 4, ...)
  82. SAX.elementDecl(grade, 3, ...)
  83. SAX.comment(
  84. The Jouyou Kanji grade level. 1 through 6 indicate the grade in which
  85. the kanji is taught in Japanese schools. 8 indicates it is one of the
  86. remaining Jouyou Kanji to be learned in junior high school, and 9
  87. indicates it is a Jinmeiyou (for use in names) kanji. [G]
  88. )
  89. SAX.elementDecl(stroke_count, 3, ...)
  90. SAX.comment(
  91. The stroke count of the kanji, including the radical. If more than
  92. one, the first is considered the accepted count, while subsequent ones
  93. are common miscounts. (See Appendix E. of the KANJIDIC documentation
  94. for some of the rules applied when counting strokes in some of the
  95. radicals.) [S]
  96. )
  97. SAX.elementDecl(variant, 3, ...)
  98. SAX.comment(
  99. A cross-reference code to another kanji, usually regarded as a variant.
  100. The type of cross-reference is given in the var_type attribute.
  101. )
  102. SAX.attributeDecl(variant, var_type, 1, 2, NULL, ...)
  103. SAX.comment(
  104. The var_type attribute indicates the type of variant code. The current
  105. values are:
  106. jis208 - in JIS X 0208 - kuten coding
  107. jis212 - in JIS X 0212 - kuten coding
  108. jis213 - in JIS X 0213 - kuten coding
  109. deroo - De Roo number - numeric
  110. njecd - Halpern NJECD index number - numeric
  111. s_h - The Kanji Dictionary (Spahn & Hadamitzky) - descriptor
  112. nelson - "Classic" Nelson - numeric
  113. oneill - Japanese Names (O'Neill) - numeric
  114. )
  115. SAX.elementDecl(freq, 3, ...)
  116. SAX.comment(
  117. A frequency-of-use ranking. The 2,500 most-used characters have a
  118. ranking; those characters that lack this field are not ranked. The
  119. frequency is a number from 1 to 2,500 that expresses the relative
  120. frequency of occurrence of a character in modern Japanese. This is
  121. based on a survey in newspapers, so it is biassed towards kanji
  122. used in newspaper articles. The discrimination between the less
  123. frequently used kanji is not strong.
  124. )
  125. SAX.elementDecl(rad_name, 3, ...)
  126. SAX.comment(
  127. When the kanji is itself a radical and has a name, this element
  128. contains the name (in hiragana.) [T2]
  129. )
  130. SAX.elementDecl(dic_number, 4, ...)
  131. SAX.comment(
  132. This element contains the index numbers and similar unstructured
  133. information such as page numbers in a number of published dictionaries,
  134. and instructional books on kanji.
  135. )
  136. SAX.elementDecl(dic_ref, 3, ...)
  137. SAX.comment(
  138. Each dic_ref contains an index number. The particular dictionary,
  139. etc. is defined by the dr_type attribute.
  140. )
  141. SAX.attributeDecl(dic_ref, dr_type, 1, 2, NULL, ...)
  142. SAX.comment(
  143. The dr_type defines the dictionary or reference book, etc. to which
  144. dic_ref element applies. The initial allocation is:
  145. nelson_c - "Modern Reader's Japanese-English Character Dictionary",
  146. edited by Andrew Nelson (now published as the "Classic"
  147. Nelson).
  148. nelson_n - "The New Nelson Japanese-English Character Dictionary",
  149. edited by John Haig.
  150. halpern_njecd - "New Japanese-English Character Dictionary",
  151. edited by Jack Halpern.
  152. halpern_kkld - "Kanji Learners Dictionary" (Kodansha) edited by
  153. Jack Halpern.
  154. heisig - "Remembering The Kanji" by James Heisig.
  155. gakken - "A New Dictionary of Kanji Usage" (Gakken)
  156. oneill_names - "Japanese Names", by P.G. O'Neill.
  157. oneill_kk - "Essential Kanji" by P.G. O'Neill.
  158. moro - "Daikanwajiten" compiled by Morohashi. For some kanji two
  159. additional attributes are used: m_vol: the volume of the
  160. dictionary in which the kanji is found, and m_page: the page
  161. number in the volume.
  162. henshall - "A Guide To Remembering Japanese Characters" by
  163. Kenneth G. Henshall.
  164. sh_kk - "Kanji and Kana" by Spahn and Hadamitzky.
  165. sakade - "A Guide To Reading and Writing Japanese" edited by
  166. Florence Sakade.
  167. henshall3 - "A Guide To Reading and Writing Japanese" 3rd
  168. edition, edited by Henshall, Seeley and De Groot.
  169. tutt_cards - Tuttle Kanji Cards, compiled by Alexander Kask.
  170. crowley - "The Kanji Way to Japanese Language Power" by
  171. Dale Crowley.
  172. kanji_in_context - "Kanji in Context" by Nishiguchi and Kono.
  173. busy_people - "Japanese For Busy People" vols I-III, published
  174. by the AJLT. The codes are the volume.chapter.
  175. kodansha_compact - the "Kodansha Compact Kanji Guide".
  176. )
  177. SAX.attributeDecl(dic_ref, m_vol, 1, 3, NULL, ...)
  178. SAX.comment(
  179. See above under "moro".
  180. )
  181. SAX.attributeDecl(dic_ref, m_page, 1, 3, NULL, ...)
  182. SAX.comment(
  183. See above under "moro".
  184. )
  185. SAX.elementDecl(query_code, 4, ...)
  186. SAX.comment(
  187. These codes contain information relating to the glyph, and can be used
  188. for finding a required kanji. The type of code is defined by the
  189. qc_type attribute.
  190. )
  191. SAX.elementDecl(q_code, 3, ...)
  192. SAX.comment(
  193. The q_code contains the actual query-code value, according to the
  194. qc_type attribute.
  195. )
  196. SAX.attributeDecl(q_code, qc_type, 1, 2, NULL, ...)
  197. SAX.comment(
  198. The q_code attribute defines the type of query code. The current values
  199. are:
  200. skip - Halpern's SKIP (System of Kanji Indexing by Patterns)
  201. code. The format is n-nn-nn. See the KANJIDIC documentation
  202. for a description of the code and restrictions on the
  203. commercial use of this data. [P]
  204. sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle
  205. 1996) by Spahn and Hadamitzky. They are in the form nxnn.n,
  206. e.g. 3k11.2, where the kanji has 3 strokes in the
  207. identifying radical, it is radical "k" in the SH
  208. classification system, there are 11 other strokes, and it is
  209. the 2nd kanji in the 3k11 sequence. (I am very grateful to
  210. Mark Spahn for providing the list of these descriptor codes
  211. for the kanji in this file.) [I]
  212. four_corner - the "Four Corner" code for the kanji. This is a code
  213. invented by Wang Chen in 1928. See the KANJIDIC documentation
  214. for an overview of the Four Corner System. [Q]
  215. deroo - the codes developed by the late Father Joseph De Roo, and
  216. published in his book "2001 Kanji" (Bojinsha). Fr De Roo
  217. gave his permission for these codes to be included. [DR]
  218. misclass - a possible misclassification of the kanji according
  219. to one of the code types. (See the "Z" codes in the KANJIDIC
  220. documentation for more details.)
  221. )
  222. SAX.elementDecl(reading_meaning, 4, ...)
  223. SAX.comment(
  224. The readings for the kanji in several languages, and the meanings, also
  225. in several languages. The readings and meanings are grouped to enable
  226. the handling of the situation where the meaning is differentiated by
  227. reading. [T1]
  228. )
  229. SAX.elementDecl(nanori, 3, ...)
  230. SAX.comment(
  231. Japanese readings that are now only associated with names.
  232. )
  233. SAX.elementDecl(rmgroup, 4, ...)
  234. SAX.elementDecl(reading, 3, ...)
  235. SAX.comment(
  236. The reading element contains the reading or pronunciation
  237. of the kanji.
  238. )
  239. SAX.attributeDecl(reading, r_type, 1, 2, NULL, ...)
  240. SAX.comment(
  241. The r_type attribute defines the type of reading in the reading
  242. element. The current values are:
  243. pinyin - the modern PinYin romanization of the Chinese reading
  244. of the kanji. The tones are represented by a concluding
  245. digit. [Y]
  246. korean_r - the romanized form of the Korean reading(s) of the
  247. kanji. The readings are in the (Republic of Korea) Ministry
  248. of Education style of romanization. [W]
  249. korean_h - the Korean reading(s) of the kanji in hangul.
  250. ja_on - the "on" Japanese reading of the kanji, in katakana. A
  251. second attribute r_status, if present, will indicate with
  252. a value of "jy" whether the reading is approved for a
  253. "Jouyou kanji".
  254. ja_kun - the "kun" Japanese reading of the kanji, in hiragana.
  255. Where relevant the okurigana is also included separated by a
  256. ".". Readings associated with prefixes and suffixes are
  257. marked with a "-". A second attribute r_status, if present,
  258. will indicate with a value of "jy" whether the reading is
  259. approved for a "Jouyou kanji".
  260. )
  261. SAX.attributeDecl(reading, r_status, 1, 3, NULL, ...)
  262. SAX.comment(
  263. See under ja_on and ja_kun above.
  264. )
  265. SAX.elementDecl(meaning, 3, ...)
  266. SAX.comment(
  267. The meaning associated with the kanji.
  268. )
  269. SAX.attributeDecl(meaning, m_lang, 1, 3, NULL, ...)
  270. SAX.comment(
  271. The m_lang attribute defines the target language of the meaning. It
  272. will be coded using the two-letter language code from the ISO 639
  273. standard. When absent, the value "en" (i.e. English) is implied. [{}]
  274. )
  275. SAX.externalSubset(kanjidic2, , )
  276. SAX.startElementNs(kanjidic2, NULL, NULL, 0, 0, 0)
  277. SAX.characters(
  278. , 1)
  279. SAX.endElementNs(kanjidic2, NULL, NULL)
  280. SAX.endDocument()