Contextual Menu Actions in Text Mode
When editing XML documents in Text mode, Oxygen XML provides the following actions in the contextual menu (many of them also appear in the submenus of the Document menu):
Cut,
Copy,
Paste
- Executes the typical editing actions on the currently selected content.
- Copy XPath
- Copies the XPath expression of the current element or attribute (or property for JSON documents) to the clipboard.
- Toggle Line Wrap ()
- Enables or disables line wrapping. When enabled, if text exceeds the width of the displayed editor, content is wrapped so that you do not have to scroll horizontally.
Toggle Comment ()
- Comments the current selection of the current editor. If the selection already contains a comment the action removes the comment from around the selection. If there is no selection in the current editor and the cursor is not positioned inside a comment, the current line is commented. If the cursor is positioned inside a comment, then the commented text is uncommented.
- Go to submenu
-
This submenu includes the following actions:
Go to Matching Tag ()
- Moves the cursor to the end tag that matches the start tag, or vice versa.
- Go after Next Tag ()
- Moves the cursor to the end of the next tag.
- Go after Previous Tag ()
- Moves the cursor to the end of the previous tag.
- Select submenu
-
This submenu allows you to select the following:
- Element
- Selects the entire element at the current cursor position.
- Content
- Selects the entire content of the element at the current cursor position, excluding the start and end tag. Performing this action repeatedly will result in the selection of the content of the ancestor of the currently selected element content.
- Attributes
- Selects all the attributes of the element at the current cursor position.
- Parent
- Selects the parent element at the current cursor position.
- Source submenu
-
This submenu includes the following actions:
Shift Right ()
- Shifts the currently selected block to the right.
Shift Left ()
- Shifts the currently selected block to the left.
Indent selection ()
- Corrects the indentation of the selected block of lines if it does not follow the current indenting preferences.
Escape Selection
- Escapes a range of characters by replacing them with the corresponding character entities.
Unescape Selection
- Replaces the character entities with the corresponding characters.
Format and Indent Element ()
- Pretty-prints the element that surrounds the current cursor position.
- To Upper Case
- Converts the selected content to upper case characters. This works with contiguous and multiple selections.
- To Lower Case
- Converts the content selection to lower case characters. This works with contiguous and multiple selections.
- Capitalize Lines
- It capitalizes the first letter found on every new line that is selected. Only the first letter is affected, the rest of the line remains the same. If the first character on the new line is not a letter then no changes are made.
- Base64 Encode/Decode submenu
-
This submenu include the following actions for encoding or decoding base 64 schemes:
- Base32 Encode/Decode submenu
-
This submenu include the following actions for encoding or decoding base32 schemes:
- Hex Encode/Decode submenu
-
This submenu include the following actions for encoding or decoding hex schemes:
- Join and Normalize Lines ()
- For the current selection, this action joins the lines by replacing the line separator with a single space character. It also normalizes the whitespaces by replacing a sequence of such characters with a single space.
- Insert new line after ()
- This action has the same result as moving the cursor to the end of the current line and pressing the ENTER key.
Insert XInclude
- Displays a dialog box that allows you to browse and select the content to be
included and automatically generates the corresponding XInclude instruction.
Note:In the Author mode, this dialog box presents a preview of the inserted document as an author page in the Preview tab and as a text page in the Source tab. In the Text mode, the Source tab is presented.
Import entities list
- Displays a dialog box that allows you to select a list of files as sources for
external DTD entities. The internal subset of the DOCTYPE declaration of your
document will be updated with the chosen entities. For instance, choosing the
files chapter1.xml and chapter2.xml
inserts the following section in the DOCTYPE:
<!ENTITY chapter1 SYSTEM "chapter1.xml"> <!ENTITY chapter2 SYSTEM "chapter2.xml">
Lock / Unlock the XML Tags
- Disables or enables the ability to edit XML tags.
- Canonicalize
- Opens the Canonicalize dialog box that allows you to select a canonicalization algorithm to standardize the format of the document.
- Sign
- Opens the Sign dialog box that allows you to configure a digital signature for the document.
- Verify Signature
- Allows you to specify the location of a file to verify its digital signature.
- Manage Highlighted Content submenu
-
This submenu is available from the contextual menu when it is invoked from a highlight after you perform a search operation or apply an XPath expression that highlights more than one result. The following options are available in this submenu:
- Modify All
- Allows you to modify (in-place) all the occurrences of the selected content. A thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
- Surround All
- Surround the highlighted content with a specific tag. This option opens the Tag dialog box. The Specify the tag drop-down menu presents all the available elements that you can choose from.
- Remove All
- Removes all the highlighted content.
Go to Definition ()
- Navigates to the definition of the current element or attribute in the schema (DTD,
XML Schema, Relax NG schema) associated with the edited XML document. If the current
attribute is a
type
belonging to thehttp://www.w3.org/2001/XMLSchema-instance
namespace, the cursor is moved in the XML schema to the definition of the type referenced in the value of the attribute. For JSON documents, it navigates to the definition of the current JSON property in the associated JSON Schema. - Refactoring submenu
-
This submenu includes the following actions:
- Manage IDs submenu
-
This submenu is available for XML documents that have an associated DTD, XML Schema, or Relax NG schema (not available for DITA). It includes the following actions:
- Search References in
- Searches for the references of the ID. Selecting this action opens the Select the scope for the Search and Refactor operations.
- Search Declarations in
- Searches for the declaration of the ID reference. Selecting this action opens the Select the scope for the Search and Refactor operations.
Search Occurrences in file
- Searches for the declaration and references of the ID in the current document.
- Quick Fix/Assist ())
- When the cursor is inside the value of an
@id
or@idref
attribute, this action opens the Quick Fix/Assist window with some search and refactoring actions available for the ID or IDREF. When the contextual menu is invoked on an error where Oxygen XML can provide a Quick Fix, this action open the Quick Fix/Assist window with a list of quick fix suggestions to choose from. - Apply all default quick fix proposals
-
This action is available when invoking the contextual menu (right-click) on a document that has one or more quick fix proposals detected for reported validation errors. If multiple quick fixes are available for the same validation error, the default quick fix defined in the Schematron validation schema using the
sqf:default-fix
attribute is automatically selected to be applied. If no default quick fix is explicitly specified, the first quick fix proposal in the list is considered. All quick fix proposals are then automatically executed in bulk, one after the other.Important Notes to Consider:- To maintain the accuracy of the initially calculated error validation ranges, the quick fix proposals are applied in the reverse order of their selection.
- If two or more quick fixes act on the same "area" within the document, only one is applied (no changes can be made to changes already made).
- Quick fixes that involve "user-entered values" that normally present a dialog box to facilitate data entry will not be executed (the automatic process of applying all selected quick fixes cannot be interrupted by the presence of the respective dialog boxes).
Once the analysis of the impact of applying the quick fixes on the content is complete, a preview dialog box is presented that provides an overview of the content changes that will be made, according to the quick fixes that will be applied. If you agree with the changes presented, click Apply to trigger the quick fixes and update the content.
Tip:This action is also available in the contextual menu when right-clicking the status bar at the bottom of the editor (if the currently highlighted validation issue has at least one detected quick fix suggestion available). Specific quick fix suggestions that are defined for the particular validation issue are also available in this menu. - Open submenu
-
The following actions are available in this submenu:
- Show referenced resources
- Opens the Referenced/Dependent Resources view that allows you to see the referenced resource hierarchy for an XML document.
- Show dependent resources
- Opens the Referenced/Dependent Resources view that allows you to see the resource dependencies for an XML document.