Search and Rename Actions for IDs in DITA
Oxygen XML Author allows you to search references to ID attributes (either direct
references using the @href
and @conref
attributes or indirect
references using @keyref
or @conkeyref
attributes) or to
rename the id attribute in all the declared and referenced locations. The main benefit of this
feature is the fact that it allows you to rename @id
attributes (or search for
their references) in the scope of the entire project. It also works for IDs defined inside
DITA maps and then referenced in maps and topics.
In Author mode, these operations are available for DITA documents in
the contextual menu (grouped in the Manage IDs submenu). In
Text mode, these actions are also available in the Quick
Assist menu. To access it, place the cursor inside the value of an
@id
attribute and click the yellow light bulb icon.
- Rename in
- Renames the ID and all of its occurrences. Selecting this action opens a dialog box where 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 (Available in the Text mode only)
- Renames the ID you are editing and all its occurrences in the current file.
- Search References
- Searches for the references of the ID. By default, the scope of this action is the current project.
- Search References in
- Searches for the references of the ID and you can choose the scope of the operation or configure working sets to use for the scope.
- Search Declarations (Available in the Text mode only)
- Searches for the declaration of the ID reference. By default, the scope of this action is the current project.
- Search Declarations in (Available in the Text mode only)
- Searches for the declaration of the ID reference and you can choose the scope of the operation or configure working sets to use for the scope.
- Search Occurrences in file
- Searches for the declaration and references of the ID in the current document and presents the results in the message panel at the bottom of the application.
- Change scope (Available in the Quick Assist menu in Text mode only)
- Opens a dialog box where you can choose the scope of the operation or configure working sets to use for the scope.
Selecting an ID that you use for search or refactor operations differs between the Text and Author modes. In the Text mode, you position the cursor inside the declaration or reference of an ID. In the Author mode, Oxygen XML Author collects all the IDs by analyzing each element from the path to the root. If more IDs are available, you are prompted to choose one of them.