From: nisikimi Date: Thu, 19 Mar 2009 07:53:42 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: XML-BEFORE-XEX~33 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b03d40849754b133350c30ed627e34e04e99b01c;p=m17n%2Fm17n-db.git *** empty log message *** --- diff --git a/FORMATS/IM-xml.txt b/FORMATS/IM-xml.txt new file mode 100644 index 0000000..644cfb1 --- /dev/null +++ b/FORMATS/IM-xml.txt @@ -0,0 +1,1311 @@ +/* Copyright (C) 2003, 2004, 2005 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H15PRO112 + See the end for copying conditions. */ + +/***en + +@page mdbIM Input Method + +@section im-description DESCRIPTION + +The m17n library provides a driver for input methods that are +dynamically loadable from the m17n database (see @ref m17nInputMethod +@latexonly (P.\pageref{group__m17nInputMethod}) @endlatexonly). + +This section describes the data format that defines those input +methods. + +@section im-format SYNTAX and SEMANTICS + +The following defines a schema for an input method, written in RelaxNG. +The driver loads a definition from a file, a stream, etc. The definition +is converted into the form of plist in the driver. + +@verbatim + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t + [a-z]{2,3} + + + + + + + + + nil + + + + + + + [^n][^i][^l] + .{1,2} + ....+ + + + + + + + + + + + + [0-9]+\.[0-9]+\.[0-9]+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + string + + + + + symbol + + + + + integer + + + + + + + + + + + + + + + string + + + + symbol + + + + integer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + command-.* + + + + + + + + + + + + + + + + + + + module-.* + + + + + + + function-.* + + + + + + + + + + + + + + + + macro-.* + + + + + + + + + + + + + + + + + map-.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [0-9]{1,7} + [0#]x[0-9A-F]{1,6} + \?. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @[0-9] + + + @first + @current + @last + @previous + @next + @previous_candidate_list + @next_candidate_list + + + + + + + + [^@].* + + + + + + + + + + + + + + + + + + + + + + + + @[0-9] + + + @first + @current + @last + @previous + @next + @previous_candidate_list + @next_candidate_list + + + + + + + predefined + + + handled-keys + predefined-surround-text-flag + @.+ + + + + + + + + + + + + + + + + \?. + [0#]x[0-9A-F]{1,6} + [0-9]{1,7} + + + + variable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + variable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + string + + + + integer + + \?. + [0#]x[0-9A-F]{1,6} + [0-9]{1,7} + + + + plist + + + + symbol + + + + + + + + + + + + + + + + + + + + + + [0#]x[0-9A-F]{1,6} + \?. + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + * + / + | + & + ! + = + < + > + <= + >= + + + + + + + + + = + < + > + <= + >= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + state-.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + string + + + + symbol + + + + integer + + \?. + [0#]x[0-9A-F]{1,6} + [0-9]{1,7} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@endverbatim + +@ifnot FOR-MAN + +@section im-example1 EXAMPLE 1 + +This is a very simple example for inputting Latin characters with +diacritical marks (acute and cedilla). For instance, when you type: +@verbatim + Comme'die-Franc,aise, chic,, +@endverbatim +you will get this: +@if FOR-HTML +@verbatim + Commédie-Française, chic, +@endverbatim +@endif +@if FOR-LATEX +@latexonly +\hskip5mm\texttt{\footnotesize Comm\'{e}die-Fran\c{c}aise, chic,} +@endlatexonly +@endif + +The definition of the input method is very simple as below, and it is +quite straight forward to extend it to cover all Latin characters. + +@if FOR-HTML +@verbatim + + + + t + latn-post + + latin-postfix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@endverbatim +@endif +@if FOR-LATEX +@latexonly +\texttt{\footnotesize +\hskip2mm(title "latin-postfix")\\ +\hskip2mm(map\\ +\hskip4mm (trans\\ +\hskip6mm ("a'" ?\'{a}) ("e'" ?\'{e}) ("i'" ?\'{i}) ("o'" ?\'{o}) +("u'" ?\'{u}) ("c," ?\c{c})\\ +\hskip6mm ("A'" ?\'{A}) ("E'" ?\'{E}) ("I'" ?\'{I}) ("O'" ?\'{O}) +("U'" ?\'{U}) ("C," ?\c{C})\\ +\hskip6mm ("a''" "a'") ("e''" "e'") ("i''" "i'") ("o''" "o'") ("u''" "u'")\\ +\hskip6mm ("c,," "c,")\\ +\hskip6mm ("A''" "A'") ("E''" "E'") ("I''" "I'") ("O''" "O'") ("U''" "U'")\\ +\hskip6mm ("C,," "C,")))\\ +\hskip2mm(state\\ +\hskip4mm (init\\ +\hskip6mm (trans)))} +@endlatexonly +@endif + +@section im-example2 EXAMPLE 2 + +This example is for inputting Unicode characters by typing C-u +(Control-u) followed by four hexadecimal digits. For instance, when +you type ("^u" means Control-u): +@verbatim + ^u2190^u2191^u2192^u2193 +@endverbatim +you will get this (Unicode arrow symbols): +@if FOR-LATEX +@verbatim + $\leftarrow \uparrow \rightarrow \downarrow +@endverbatim +@endif +@if FOR-HTML +@verbatim + ←↑→↓ +@endverbatim +@endif + +The definition utilizes and as below: +@verbatim + + + + t + unicode + + UNICODE + + + C-U + + + + + : : + + + + : : + + + + + + + 0 + 0 + + + + + + + + + + + 65 + + 48 + + + 1 + 55 + + + + + + +p 16 + + + + + + + + 1 + + + + + + + 4 + + + + + + + + + + + + + +@endverbatim + +@section im-example3 EXAMPLE 3 + +This example is for inputting Chinese characters by typing PinYin key +sequence. +@if FOR-HTML +For instance, when you type: +@verbatim + nihaobei2jing2 +@endverbatim +you will get: +@verbatim + 你好北京 +@endverbatim + +The definition utilizes and + +