(mm-backend): Translate.
[elisp/flim.git] / mime-en.sgml
index 8d0c86e..a8e0e42 100644 (file)
@@ -1,6 +1,6 @@
 <!doctype sinfo system>
 <head>
-<title>FLIM 1.8 Manual about MIME Features
+<title>FLIM 1.9 Manual about MIME Features
 <author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail>
 <date>1998/07/01
 
@@ -42,46 +42,13 @@ a message or one of the parts in the body of a multipart entity.'  In
 this document, the term <concept>entity</concept> indicates all of
 header fields and body.
 <p>
-The definition of RFC 2045 indicates that a MIME message is a tree.
-An message is a tree, each node is an entity, like following figure.
-Namely MIME extends message to tree structure.
+The definition of RFC 2045 indicates that a MIME message is a tree,
+and each node of the tree is an entity.  Namely MIME extends message
+to tree structure.
 <p>
 FLIM uses <concept>mime-entity</concept> structure to represent
 information of entity.  In this document, it is called simply
 `mime-entity'.
-<p>
-\e$BA0=R$N$h$&$K!"\e(Bmessage \e$BCf$N3F\e(B entity \e$B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O\e(B
-\e$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"\e(B
-<verb>
-
-                              \e$B(#(!(!(!($\e(B
-                              \e$B("\e(B  nil \e$B("\e(B
-                              \e$B(&(!(((!(%\e(B
-              \e$B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($\e(B
-            \e$B(#(*($\e(B              \e$B(#(*($\e(B              \e$B(#(*($\e(B
-            \e$B("#0("\e(B              \e$B("#1("\e(B              \e$B("#2("\e(B
-            \e$B(&(((%\e(B              \e$B(&(((%\e(B              \e$B(&(((%\e(B
-              \e$B("\e(B        \e$B(#(!(!(!(!(+(!(!(!(!($\e(B        \e$B("\e(B
-          \e$B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($\e(B
-          \e$B("\e(B \e$B#0\e(B.\e$B#0("("\e(B \e$B#1\e(B.\e$B#0("("\e(B \e$B#1\e(B.\e$B#1("("\e(B \e$B#1\e(B.\e$B#2("("\e(B \e$B#2\e(B.\e$B#0("\e(B
-          \e$B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%\e(B
-
-</verb>
-<p>
-<noindent>\e$B$N$h$&$K?<$5\e(B n \e$B$N@a$K$OD9$5\e(B n \e$B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l\e(B
-\e$B$r\e(B <concept>entity-number</concept> \e$B$H8F$S$^$9!#\e(Bentity-number \e$B$O\e(B S \e$B<0$H\e(B
-\e$B$7$F$O\e(B <code>(1 2 3)</code> \e$B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#\e(B
-<p>
-mime-entity \e$B$G$O!"$3$l$HF1MM$N\e(B <concept>node-id</concept> \e$B$rMQ$$$^$9!#\e(B
-node-id \e$B$O$A$g$&$I\e(B entity-number \e$B$r5U$K$7$?%j%9%H$G!"\e(Bentity-number
-1.2.3 \e$B$KBP1~$9$k\e(B node-id \e$B$O\e(B <code>(3 2 1)</code> \e$B$G$9!#\e(B
-<p>
-\e$BA0=R$N$h$&$K!"\e(BMIME message \e$B$O\e(B entity \e$B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"\e(B
-\e$B$3$N:,$G$"$k\e(B message \e$BA4BN$b\e(B mime-entity \e$B$GI=8=$9$k$3$H$,$G$-!"\e(Bbuffer
-local \e$BJQ?t\e(B <code>mime-message-structure</code> \e$B$K3JG<$9$k$3$H$K$7$^$9!#\e(B
-\e$B$=$7$F!"\e(Bentity-number \e$B$d\e(B node-id \e$B$rMQ$$$k$3$H$G\e(B 
-<code>mime-message-structure</code> \e$B$K$*$1$k\e(B entity \e$B$NAjBPE*$J0LCV4X78$r\e(B
-\e$B07$&$3$H$,$G$-$^$9!#\e(B
 
 
 <h2> Functions to create mime-entity
@@ -98,26 +65,67 @@ Open an entity and return it.
 depended on representation-type.
 </defun>
 
-<defun name="mime-parse-message">
-         <opts> default-ctl node-id
-<p>
-Parse current buffer as message, and return the result as mime-entity.
-</defun>
-
 <defun name="mime-parse-buffer">
-         <opts> buffer
+         <opts> buffer type
 <p>
 Parse <var>buffer</var> as message, and set the result to buffer local
 variable <code>mime-message-structure</code> of <var>buffer</var> as
 mime-entity.
 <p>
 If <var>buffer</var> is omitted, current buffer is used.
+<p>
+<var>type</var> is representation-type of created mime-entity. <cf
+node="mm-backend"> Default value is <var>buffer</var>.
 </defun>
 
 
 <h2> Features about message tree
 <node> Entity hierarchy
 <p>
+Structure of a MIME message is tree.
+<p>
+In the tree, root node is the entity indicates all of the message.  In
+this document, it is called <concept>root-entity</concept> or
+<concept>message</concept>.  In FLIM, it is indicated by buffer local
+variable <code>mime-message-structure</code>.
+<p>
+Each entity except root-entity has a parent.  An entity may have
+children.  We can indicate an entity by relative position from a base
+entity, based on the parent-child relationship.
+<p>
+In addition, we can indicate an entity by absolute position of the
+message.
+<p>
+Each entity, which is a node of the tree, can be numbered by
+depth and left-to-right order of the depth.
+<verb>
+
+                              +-------+
+                              |  nil  |
+                              +---+---+
+              +-------------------+-------------------+
+            +-+-+               +-+-+               +-+-+
+            | 0 |               | 1 |               | 2 |
+            +-+-+               +-+-+               +-+-+
+              |         +---------+---------+         |
+           +--+--+   +--+--+   +--+--+   +--+--+   +--+--+
+           | 0.0 |   | 1.0 |   | 1.1 |   | 1.2 |   | 2.0 |
+           +-----+   +-----+   +-----+   +-----+   +-----+
+
+</verb>
+<p>
+Namely, if depth of a node is n, the node has a node-number, which is
+consists of n integers.  In this document, it is called
+<concept>entity-number</concept>.  An entity-number is represented by
+list of integer, like <code>(1 2 3)</code>.
+<p>
+mime-entity has also <concept>node-id</concept>.  A node-id is
+represented by reversed list of entity-number.  For example, node-id
+corresponding with 1.2.3 is <code>(3 2 1)</code>.
+<p>
+Each entity can be indicated by entity-number or node-id in
+<code>mime-message-structure</code>.
+
 <defvar name="mime-message-structure">
 <p>
 Buffer local variable to store mime-entity structure of message.
@@ -354,25 +362,22 @@ contains <var>entity</var>.
 <h2> Entity representations and implementations
 <node> mm-backend
 <p>
-Entity \e$B$OCj>]2=$5$l$?%G!<%?I=8=$G!"<B:]$N%G!<%?I=8=$H$7$F$OMQES$K1~$8$F\e(B
-\e$B$5$^$6$^$J$b$N$,MxMQ$G$-$k$h$&$K@_7W$5$l$F$$$^$9!#\e(B
+Entity is an abstraction.  It is designed to use various data
+representations for their purposes.
 <p>
-\e$B$3$3$G!"\e(Bentity \e$B$,$I$&$$$&<oN`$NI=8=$r9T$C$F$$$k$+$r<($9$N$,\e(B
-<concept>representation-type</concept> \e$B$G!"\e(Bentity \e$B$r@8@.$9$k;~$K$O$3$l$r\e(B
-\e$B;XDj$7$^$9!#\e(B<cf node="Entity Creation">
+Each entity has <concept>representation-type</concept>.  It must be
+specified when an entity is created. <cf node="Entity Creation">
 <p>
-\e$BA0@a$^$G$K=R$Y$FMh$?\e(B entity \e$B$KBP$9$k=hM}$O!"\e(Bentity \e$B$KBP$7$F$=$N=hM}$r0M\e(B
-\e$BMj$9$k$3$H$K$h$C$F<B8=$5$l$F$$$^$9!#\e(BEntity \e$B$O<+J,$N\e(B 
-representation-type \e$B$rCN$C$F$*$j!"$=$N\e(B representation-type \e$B$K1~$8$F<B:]\e(B
-\e$B$N=hM}$r9T$&4X?t$r8F$S=P$7$^$9!#$3$N$h$&$J4X?t$r\e(B <concept>entity \e$B=hM}\e(B
-method</concept> \e$B$H8F$S$^$9!#$^$?!"\e(Brepresentation-type \e$BKh$K$3$N$h$&$J4X\e(B
-\e$B?t$r$^$H$a$?$b$N$r\e(B <concept>mm-backend</concept> \e$B$H8F$S$^$9!#\e(B
+Functions about entity are implemented by request processing to the
+entity.  Each entity knows its representation-type.  Each entity calls
+processing function corresponding with the representation-type.  Such
+kind of function is called <concept>entity processing
+method</concept>.  A module, consists of them corresponding with a
+representation-type, is called <concept>mm-backend</concept>.
 <p>
-mm-backend \e$B$O\e(B representation-type \e$B$NL>A0$N@hF,$K\e(B <code>mm</code> \e$B$H$$$&\e(B
-\e$B@\F,<-$rIU$1$?4X?tL>$+$i$J$k\e(B module \e$B$G!"$=$N\e(B module \e$BL>$OF1MM$K\e(B
-representation-type \e$B$NL>A0$N@hF,$K\e(B <code>mm</code> \e$B$rIU$1$?$b$N$K$J$C$F\e(B
-\e$B$$$^$9!#$3$N\e(B module \e$B$O\e(B representation-type \e$B$N\e(B entity \e$B$,:G=i$K@8@.$5$l$k\e(B
-\e$B;~$K<+F0E*$K\e(B require \e$B$5$l$^$9!#\e(B
+Module name of each mm-backend consists of the prefix <code>mm</code>
+and its representation-type.  The module is required automatically
+when its entity is created at first.
 
 
 <h3> Message-passing for entity
@@ -381,18 +386,19 @@ representation-type \e$B$NL>A0$N@hF,$K\e(B <code>mm</code> \e$B$rIU$1$?$b$N$K$J$C$F
 <defun name="mime-entity-send">
              <args> entity message <rest> args
 <p>
-<var>entity</var> \e$B$K\e(B <var>message</var> \e$B$rAw$k!#\e(B
+Send <var>message</var> to <var>entity</var> with <var>args</var>, and
+return the result.
 <p>
-<var>args</var> \e$B$O\e(B <var>message</var> \e$B$N0z?t$G$"$k!#\e(B
+<var>args</var> is arguments of the <var>message</var>.
 </defun>
 
 
 <h3> How to make mm-backend
 <node> mm-backend module
 <p>
-\e$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9\e(B (^_^;\e$B!K\e(B
+(It is not written yet, sorry. (^_^;)
 <p>
-\e$B!J$H$j$"$($:!"\e(Bmm*.el \e$B$r;29M$K$7$F$/$@$5$$!K\e(B
+(Please read mm*.el)
 
 
 <h1> Information of Content-Type field