Right-clicking on some selected document content or node pops up a context menu with commands relevant to the selection or cursor location.
The figure below shows the Insert submenu, which is a list of all elements that can be inserted at that current cursor location. The Insert Before submenu lists all elements that can be inserted before the current element. The Insert After submenu lists all elements that can be inserted after the current element. In the figure below, the current element is the para element. The bold and italic elements can be inserted within the current para element.
As can be seen below, the para and Office elements can be inserted before the current para element.
The node insertion, replacement (Apply), and markup removal (Clear) commands that are available in the context menu are also available in the Authentic View entry helpers and are fully described in that section.
Positioning the cursor over the Insert Entity command rolls out a submenu containing a list of all declared entities. Clicking an entity inserts it at the selection. See Define Entities for a description of how to define entities for the document.
This command is enabled when the cursor is placed within text. Clicking it inserts a CDATA section at the cursor insertion point. The CDATA section is delimited by start and end tags; to see these tags you should switch on large or small markup. Within CDATA sections, XML markup and parsing is ignored. XML markup characters (the ampersand, apostrophe, greater than, less than, and quote characters) are not treated as markup, but as literals. So CDATA sections are useful for text such as program code listings, which have XML markup characters.
Positioning the mouse cursor over the Remove command pops up a menu list consisting of the selected node and all its removable ancestors (those that would not invalidate the document) up to the document element. Click the element to be removed. This is a quick way to delete an element or any removable ancestor. Note that clicking an ancestor element will remove all its descendants, including the selected element.
The Clear command clears the element markup from around the selection. If the entire node is selected, then the element markup is cleared for the entire node. If a text segment is selected, then the element markup is cleared from around that text segment only.
The Apply command applies a selected element to your selection in the main Window. For more details, see Authentic View entry helpers.
These are the standard Windows commands. Note, however, that the Paste command pastes copied text either as XML or as Text, depending on what the designer of the stylesheet has specified for the SPS as a whole. For information about how the Copy as XML and Copy as Text commands work, see the description of the Paste As command immediately below.
The Paste As command offers the option of pasting as XML or as text an Authentic View XML fragment (which was copied to the clipboard). If the copied fragment is pasted as XML it is pasted together with its XML markup. If it is pasted as text, then only the text content of the copied fragment is pasted (not the XML markup, if any). The following situations are possible:
•An entire node together with its markup tags is highlighted in Authentic View and copied to the clipboard. (i) The node can be pasted as XML to any location where this node may validly be placed. It will not be pasted to an invalid location. (ii) If the node is pasted as text, then only the node's text content will be pasted (not the markup); the text content can be pasted to any location in the XML document where text may be pasted.
•A text fragment is highlighted in Authentic View and copied to the clipboard. (i) If this fragment is pasted as XML, then the XML markup tags of the text—even though these were not explicitly copied with the text fragment—will be pasted along with the text, but only if the XML node is valid at the location where the fragment is pasted. (ii) If the fragment is pasted as text, then it can be pasted to any location in the XML document where text may be pasted.
|Note:||Text will be copied to nodes where text is allowed, so it is up to you to ensure that the copied text does not invalidate the document. The copied text should therefore be: (i) lexically valid in the new location (for example, non-numeric characters in a numeric node would be invalid), and (ii) not otherwise invalidate the node (for example, four digits in a node that accepts only three-digit numbers would invalidate the node).|
|Note:||If the pasted text does in any way invalidate the document, this will be indicated by the text being displayed in red.|
The Delete command removes the selected node and its contents. A node is considered to be selected for this purpose by placing the cursor within the node or by clicking either the start or end tag of the node.