| Home | TOC | Index |
| Add | Delete | Delete All | Cut, Copy and Paste | Bubble | Sort | Sticker |
These functions are invoked in pairs, either: (a) Cut-and-Paste; or (b) Copy-and-Paste. There are two situses to be identified first before the compound operations are executed. One item in the tree is chosen and selected as the site of the cut or copy operation. This item is called the origin situs.
The two target enhancers of the Delete function are also applicable with the cut or copy function. Hence, depending upon the choices, either: only the origin situs is cut or copied; or only its descendants are cut or copied, or all of them are cut or copied, or none even because the cut and copy operations are locked with the delete function.
In a cut operation where only the situs is transferred, the descendants are promoted in the same manner as described in the delete function. Note, however, that no actual cut or copy operation takes place until the paste operation.
With respect to the paste operation, an item is chosen and selected as the site of the paste operation. This item is referred to as the destination situs.
The relation and position enhancers of the Add function are also applicable. Being so, the transferred items are inserted as sibling or child items of the situs. They are either positioned first or last in the list, or distributed based on their respective sort order. As siblings, they are also either inserted before or after the dstination situs. If the new items are inserted as parent of the destination situs, the following guides the result:
If the transfer is singular at the top or includes the origin situs (or just the copy of it for the Copy function), the origin situs is inserted to the parent node of the destination situs, and the destination situs is attached to the origin situs.
If the transfer is non-singular at the top, only descendants, the destination situs is attached to the first item of the descendants.
Otherwise, the manner described in the Add function is also followed.
Note that these are just general rules; specific rules are enforced by particular types of document. For instance, the page template document enforces the content model of xhtml to its tree. Hence, items could not be transferred to another location when this violates the content model.
More particularly, the <html> element can not contain a <form> element as a child item. If the transfer of the <form> element is attempted either directly or by promotion into the <html> element, such an operation will not succeed.
4/13/2006, 1:24:02 PM
| Home | TOC | Index |