@cindex message
@cindex root-entity
-MIME message \e$B$O\e(B entity \e$B$rC10L$H$9$kLZ9=B$$K$J$C$F$$$^$9!#\e(B@refill
+Structure of a MIME message is tree.@refill
-\e$B$3$NLZ$K$*$$$F:,$H$J$k@a$O\e(B message \e$BA4BN$rI=$9\e(B entity \e$B$G$9!#$3$3$G$O!"$3\e(B
-\e$B$l$r\e(B @strong{root-entity} \e$B$b$7$/$O\e(B@strong{message} \e$B$H8F$S$^$9!#\e(B@refill
+In the tree, root node is the entity indicates all of the message. In
+this document, it is called @strong{root-entity} or @strong{message}.
+In FLIM, it is indicated by buffer local variable
+@code{mime-message-structure}.@refill
-root-entity \e$B0J30$N\e(B entity \e$B$O?F$r;}$A$^$9!#$^$?!"\e(Bentity \e$B$O;R6!$r;}$D$+$b\e(B
-\e$BCN$l$^$;$s!#$3$N?F;R4X78$r9M$($k$3$H$G\e(B entity \e$B$NAjBP4X78$r07$&$3$H$,$G$-\e(B
-\e$B$^$9!#\e(B@refill
+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.@refill
-\e$B0lJ}!"\e(Bentity \e$B$N\e(B message \e$B$K$*$1$k0LCV$r9M$($k$3$H$b$G$-$^$9!#\e(B@refill
+In addition, we can indicate an entity by absolute position of the
+message.@refill
-entity \e$B$O$3$NLZ$K$*$1$k@a$H$J$j$^$9$,!"$3$NLZ$K$O?<$5$HF1$8?<$5$NCf$N\e(B
-\e$B=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"\e(B
+Each entity, which is a node of the tree, can be numbered by
+depth and left-to-right order of the depth.
@example
- \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
+ +-------+
+ | nil |
+ +---+---+
+ +-------------------+-------------------+
+ +-+-+ +-+-+ +-+-+
+ | 0 | | 1 | | 2 |
+ +-+-+ +-+-+ +-+-+
+ | +---------+---------+ |
+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
+ | 0.0 | | 1.0 | | 1.1 | | 1.2 | | 2.0 |
+ +-----+ +-----+ +-----+ +-----+ +-----+
@end example
-@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 @strong{entity-number} \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)} \e$B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#\e(B
-
-mime-entity \e$B$G$O!"$3$l$HF1MM$N\e(B @strong{node-id} \e$B$rMQ$$$^$9!#\e(Bnode-id \e$B$O$A$g\e(B
-\e$B$&$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)} \e$B$G$9!#\e(B@refill
+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
+@strong{entity-number}. An entity-number is represented by list of
+integer, like @code{(1 2 3)}.@refill
-\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} \e$B$K3JG<$9$k$3$H$K$7$^$9!#\e(B@refill
+mime-entity has also @strong{node-id}. 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)}.@refill
-@code{mime-message-structure} \e$B$r5/E@$K\e(B entity-number \e$B$d\e(B node-id
-\e$B$G<($5$l$k\e(B entity \e$B$r<h$j=P$9$3$H$,$G$-$^$9!#\e(B
+Each entity can be indicated by entity-number or node-id in
+@code{mime-message-structure}.
@defvar mime-message-structure