Contextual Menu Actions in Text Mode
When editing XML documents in Text mode, Oxygen XML Editor 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 from the current editor to the clipboard.
- Toggle Comment (Ctrl + Shift + Comma (Command + Shift + M on OS X))
- 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 (Ctrl + Shift + G)
- Moves the cursor to the end tag that matches the start tag, or vice versa.
- Go after Next Tag (Ctrl + CloseBracket (Command + CloseBracket on OS X))
- Moves the cursor to the end of the next tag.
- Go after Previous Tag (Ctrl + OpenBracket (Command + OpenBracket on OS X))
- 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 (Tab)
- Shifts the currently selected block to the right.
- Shift Left (Shift + Tab)
- Shifts the currently selected block to the left.
- Indent selection (Ctrl + I (Command + I on OS X))
- 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 (Ctrl + Shift + I (Command + Shift + I on OS X))
- Pretty prints the element that surrounds the current cursor position.
- To Upper Case
- Converts the content selection to upper case characters.
- To Lower Case
- Converts the content selection to lower case characters.
- 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.
- Convert Hexadecimal Sequence to Character (Ctrl + Shift + X (Command + Shift + X on OS X))
-
Converts a sequence of hexadecimal characters to the corresponding Unicode character. The action can be invoked if there is a selection containing a valid hexadecimal sequence or if the cursor is placed at the right side of a valid hexadecimal sequence. A valid hexadecimal sequence can be composed of 2 to 4 hexadecimal characters and may or may not be preceded by the
0x
or0X
prefix. Examples of valid sequences:0x0045
,0X0125
,1253
,265
,43
. - Base64 Encode/Decode submenu
- This submenu include the following actions for encoding or decoding
base64 schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, 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.
- Base32 Encode/Decode submenu
- This submenu include the following actions for encoding or decoding
base32 schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, 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.
- Hex Encode/Decode submenu
- This submenu include the following actions for encoding or decoding
hex schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection. By default, a dialog box is displayed that allows you to select the encoding to use. There is an option to choose to not show this dialog box in the future. In this case, the encoding that is specified in the Encoding for Base64, Base32, Hex conversions option in the Encoding preferences page will be used. Likewise, the same is true if the Show the dialog box for choosing the encoding for Base64, Base 32, Hex conversions option is disabled in the Messages preference page.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, 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.
- Join and Normalize Lines (Ctrl + J (Command + J on OS X))
- 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 (Ctrl + Alt + Enter (Command + Alt + Enter on OS X))
- 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
andchapter2.xml
inserts the following section in the DOCTYPE:<!ENTITY chapter1 SYSTEM "chapter1.xml"> <!ENTITY chapter2 SYSTEM "chapter2.xml">
- 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.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, 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.
- Show Definition (Ctrl + Shift + Enter)
- Moves the cursor 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. - Refactoring submenu
- This submenu includes the following actions:
- Rename Element
- The element from the cursor position, and any elements with the same name, can be renamed according with the options from the Rename dialog box.
- Rename Prefix (Alt + Shift + P (Command + Shift + P on OS X))
- The prefix of the element from the cursor position, and any elements with the same
prefix, can be renamed according with the options from the Rename
dialog box.
- If you select the Rename current element prefix option, the
application will recursively traverse the current element and all its children.
For example, to change the
xmlns:p1="ns1"
association in the current element toxmlns:p5="ns1"
, if thexmlns:p1="ns1"
association is applied on the parent element, then Oxygen XML Editor will introducexmlns:p5="ns1"
as a new declaration in the current element and will change the prefix fromp1
top5
. Ifp5
is already associated with another namespace in the current element, then the conflict will be displayed in a dialog box. By pressing OK, the prefix is modified fromp1
top5
without inserting a new declaration. - If you select the Rename current prefix in all document option, the application will apply the change on the entire document.
- To also apply the action inside attribute values, check the Rename also attribute values that start with the same prefix checkbox.
- If you select the Rename current element prefix option, the
application will recursively traverse the current element and all its children.
For example, to change the
- Surround with submenu
- Presents a drop-down menu that allows you to choose a tag to surround a selected portion of content.
- Surround with Tags (Ctrl + E (Command + E on OS X) )
- Allows you to choose a tag that encloses a selected portion of content. If there is
no
selection, the start and end tags are inserted at the cursor position.
- If the Position cursor between tags option is enabled in the Content Completion preferences page, the cursor is placed between the start and end tag.
- If the Position cursor between tags option is disabled in the Content Completion preferences page, the cursor is placed at the end of the start tag, in an insert-attribute position.
- Surround with '[tag]' (Ctrl + ForwardSlash (Command + ForwardSlash on OS X))
- Surround the selected content with the last tag used.
- Delete element tags (Alt + Shift + X (Command + Alt + X on OS X))
- Deletes the start and end tag of the current element.
- Split element (Alt + Shift + D (Ctrl + Alt + D on OS X))
- Split the element from the cursor position into two identical elements. The cursor must be inside the element.
- Join elements (Alt + Shift + J (Command + Alt + J on OS X))
- Joins the left and right elements relative to the current cursor position. The elements must have the same name, attributes, and attributes values.
- Attributes submenu
- Contains predefined XML refactoring operations that pertain to attributes with some
of
the information preconfigured based upon the current context.
- Add/Change attribute
- Allows you to change the value of an attribute or insert a new one.
- Delete attribute
- Allows you to remove one or more attributes.
- Rename attribute
- Allows you to rename an attribute.
- Replace in attribute value
- Allows you to search for a text fragment inside an attribute value and change the fragment to a new value.
- Comments submenu
- Contains predefined XML refactoring operations that pertain to comments with some
of
the information preconfigured based upon the current context.
- Delete comments
- Allows you to delete comments found inside one or more elements.
- DITA submenu
- Contains predefined XML refactoring operations that pertain to DITA documents with
some of the information preconfigured based upon the current context.
- Change topic ID to file name
- Changes the ID of a topic to be the same as its file name.
- Convert simple tables to CALS tables
- Converts all DITA simple tables to CALS tables in the specified scope.
- Elements submenu
- Contains predefined XML refactoring operations that pertain to elements with some
of
the information preconfigured based upon the current context.
- Delete element
- Allows you to delete elements.
- Delete element content
- Allows you to delete the content of elements.
- Insert element
- Allows you to insert new elements.
- Rename element
- Allows you to rename elements.
- Unwrap element
- Allows you to remove the surrounding tags of elements, while keeping the content unchanged.
- Wrap element
- Allows you to surround elements with element tags.
- Wrap element content
- Allows you to surround the content of elements with element tags.
- Fragments submenu
- Contains predefined XML refactoring operations that pertain to XML fragments with
some
of the information preconfigured based upon the current context.
- Insert XML fragment
- Allows you to insert an XML fragment.
- Replace element content with XML fragment
- Allows you to replace the content of elements with an XML fragment.
- Replace element with XML fragment
- Allows you to replace elements with an XML fragment.
- JATSKit submenu
- Contains predefined XML refactoring operations that pertain to JATS documents with
some of the information preconfigured based upon the current context.
- Add BITS DOCTYPE - NLM/NCBI Book Interchange 2.0
- Adds an NLM 'BITS' 2.0 DOCTYPE declaration.
- Add Blue DOCTYPE - NISO JATS Publishing 1.1
- Adds a JATS 'Blue' 1.1 DOCTYPE declaration.
- Normalize IDs
- Assigned IDs are normalized and IDs are assigned to some elements that are missing them.
- Manage IDs submenu
- This submenu is available for XML documents that have an associated DTD, XML Schema,
or Relax NG schema. It includes the following actions:
- Rename in
- Renames the ID and all its occurrences. Selecting this action opens the Rename XML ID dialog box. This dialog box lets you insert the new ID value and choose the scope of the rename operation. For a preview of the changes you are about to make, click Preview. This opens the Preview dialog box, which presents a list with the files that contain changes and a preview zone of these changes.
- Rename in File
- Renames the ID you are editing and all its occurrences from the current file.
- Search References
- Searches for the references of the ID. By default, the scope of this action is the current project. If you configure a scope using the Select the scope for the Search and Refactor operations dialog box, this scope will be used instead.
- 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
- Searches for the declaration of the ID reference. By default, the scope of this action is the current project. If you configure a scope using the Select the scope for the Search and Refactor operations dialog box, this scope will be used instead.
- 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.
- Quick Assist (Alt + 1 (Command + Alt + 1 on OS X))
- Available when the cursor is inside an ID or IDREF, this action opens the Quick Assist window that allows you to select some search and refactoring actions for the selected ID or IDREF.
- Open submenu
- The following actions are available in this submenu:
- Open File at Cursor
- Opens the file at the cursor position in a new panel. If the file path represents a directory path, it will be opened in system file browser. If the file at the specified location does not exist, an error dialog box is displayed and it includes a Create new file button that starts the New document wizard. This allows you to choose the type or the template for the file. If the action succeeds, the file is created with the referenced location and name and is opened in a new editor panel.
- Open File at Cursor in System Application
- Opens the file (identified by its link) or web page (identified by a web link) found at cursor position. The target is opened in the default system application associated with that file type.
- Compare
- Opens the current file in the Compare Files tool.
- Resource Hierarchy
- Opens the Resource Hierarchy/Dependencies view that allows you to see the resource hierarchy for an XML document.
- Resource Dependencies
- Opens the Resource Hierarchy/Dependencies view that allows you to see the resource dependencies for an XML document.