Editing XML Markup in Author Mode
Oxygen XML Editor includes some useful actions that allow you to easily edit XML markup in Author mode. Most of these actions are available in the contextual menu and some of them have simple keyboard shortcuts.
Selecting XML Markup in Author Mode
Selecting XML tags in Oxygen XML Editor is very simple with several methods for selecting entire elements:
- Breadcrumb - Click the element (XML tag) on the breadcrumb displayed at the top of the editing window.
- Outline View - Click the element name in the Outline view.
- Full Tags Mode - While editing in Full Tags mode, click the start or end tag of the element in the editor.
- Mouse Selection - While editing in Full Tags mode, click before the start tag of the element, drag the selection, and release the mouse button after the end tag.
- Shift + Arrow Keys - While editing in Full Tags mode, place the cursor before the start tag of the element, press and hold Shift, and use the arrow keys to make the selection (including the end tag).
Note
Using the Breadcrumb in Author Mode
A breadcrumb on the top stripe indicates the path from document root to the current element. It can also be used as a helpful tool to insert and edit specific elements in the document structure.
Breadcrumb in Author Mode
The last element listed in the breadcrumb is the element at the current cursor position. The last element is also highlighted by a thin light blue bar for easier identification. Clicking an element from the breadcrumb selects the entire element in the editor area and each element provides a contextual menu with access to the following actions:
- Edit Attributes
- Opens the in-place attributes editor that allows you to easily edit the attributes of an element.
- Edit Profiling Attributes
- Allows you to select the profiling attributes that apply to a certain element.
- Append child
- Opens a content completion list that allows you to select an element to be inserted as a child of the selected element.
- Insert before
- Opens a content completion list that allows you to select an element to be inserted (as a sibling) before the selected element.
- Insert after
- Opens a content completion list that allows you to select an element to be inserted (as a sibling) after the selected element.
- Cut
- Removes the selected element and copies it to the clipboard, while preserving the styles of the content.
- Copy
- Copies the selected element to the clipboard, while preserving the styles of the copied content.
- Paste
- Pastes a well-formed element from the clipboard at currently selected position in the breadcrumb.
- Paste before
- Insert a well-formed element (from the clipboard) before the currently selected element.
- Paste after
- Insert a well-formed element (from the clipboard) after the currently selected element.
- Paste as XML
- Inserts clipboard content that is considered to be well-formed XML content, preserving its XML structure.
- Delete
- Deletes the currently selected element.
- Toggle Comment
- Encloses the currently selected element in an XML comment, if the element is not commented, or removes the comment if it is commented.
- Rename Element
- Opens the Rename dialog box that allows you to rename the currently selected element and other elements with the same name.
Tip
AuthorBreadCrumbCustomizer
API. See the Oxygen
SDK for more details.
Move Nodes
You can move XML nodes in the current document by using the following actions in the Refactoring submenu of the contextual menu (or from the : menu)
- Move Up (Alt + UpArrow)
- Moves the current node or selected nodes in front of the previous node.
- Move Down (Alt + DownArrow)
- Moves the current node or selected nodes after the subsequent node.
Tip
Promote/Demote List Item Nodes
You can easily promote or demote selected list item nodes within ordered lists or unordered lists by using the following keyboard shortcuts:
- Promote (Shift + Tab)
- Promotes an entirely selected list item node to be a sibling of its parent node (the list item is moved to the left). It also works for selections of multiple list item nodes as long as all the selected nodes are siblings (on the same hierarchical level).
- Demote (Tab)
- Demotes an entirely selected list item node (the list item is moved to the right). It also works for selections of multiple list item nodes as long as all the selected nodes are siblings (on the same hierarchical level).
Join or Split Elements
You can join or split elements in the current document by using the following actions in the Refactoring submenu of the contextual menu (or from the : menu)
- Join Elements
- Joins two adjacent block elements that have the same name. The action is available only when the cursor position is between the two adjacent block elements. Also, joining two block elements can be done by pressing the Delete or Backspace keys and the cursor is positioned between the boundaries of these two elements.
Tip
- The cursor is located before the end position of the first element and (Delete) key is pressed.
- The cursor is located after the end position of the first element and (Backspace) key is pressed.
- The cursor is located before the start position of the second element and (Delete) key is pressed.
- The cursor is located after the start position of the second element and (Backspace) key is pressed.
Rename Elements
You can rename elements by using the following action in the Refactoring submenu of the contextual menu (or from the : menu)
Surround Content with Tags (Wrap)
You can surround a selection of content with tags (wrap the content) by using the following action in the Refactoring submenu of the contextual menu (or from the : menu)
- Surround with Tags (Ctrl + E (Command + E on OS X) )
- Allows you to choose a tag to enclose 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.
Unwrap the Content of Elements
You can unwrap the content of an element by using the following action in the Refactoring submenu of the contextual menu (or from the : menu)
- Delete Element Tags
- Deletes the tags of the closest element that contains the position of the cursor. This operation is also executed if the start or end tags of an element are deleted by pressing the Delete or Backspace keys.
Tip
- The cursor is located before the start position of the element and (Delete) key is pressed.
- The cursor is located after the start position of the element and (Backspace) key is pressed.
- The cursor is located before the end position of the element and (Delete) key is pressed.
- The cursor is located after the end position of the element and (Backspace) key is pressed.
Remove Markup from Blocks of Content
You can remove the markup from the current element by highlighting the appropriate block of content and using the following action in the Refactoring submenu of the contextual menu (or from the : menu)
- Remove All Markup
- Removes all the XML markup inside the selected block of content and keeps only the text content.
Tip
Remove Text from Selected Markup
You can remove the text from elements by highlighting the appropriate block of content and using the following action in the Refactoring submenu of the contextual menu (or from the : menu)
Other Refactoring Actions
You can also manage the structure of the markup by using the other specific XML refactoring actions that are available in the Refactoring submenu of the contextual menu:
- 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.