References Tab
Use the
References tab in the
Explore side view to see the files that reference a file and the files
it references.
The
References tab,
available in the Explore side view of the Personal Workspace, displays a tree of the
references between the file selected in the tab and other files in the project. For
information about how the tab finds references, see How Content Fusion Finds DITA References.
References tab is experimental, and it is disabled
by default. To enable it, open your Profile page, and in the
Preferences section, select Show the DITA References tab
in the Explore side view. The tab is available in projects that define
publications.The Web of DITA References
The files in a DITA project reference one another. A map includes topics, a topic reuses a warning from another topic, and a topic links to other topics. Think of each file as a dot and each reference as an arrow from the file that contains the reference to the file it points to. Together, the dots and arrows form a web. The tab shows the part of that web surrounding one file.
In addition to files, an arrow can point to a key, an alias, or a web address. For example:
-
The replacing-a-failed-disk.dita topic links to the
raid-levelskey, and a map defines that key as raid-levels.dita. The key is a dot of its own between the two files. The map that defines the key also has an arrow pointing to it. -
The admin-guide.ditamap map includes warnings.dita with
copy-to="warnings-admin.dita", so the publication receives a copy of the topic under a new name. The warnings-admin.dita alias is a dot that references the topic it copies: warnings.dita. -
The connecting-power.dita topic links to the https://www.example.com/power-cords web page.
The rest of the manual usually refers to files as having references between them. However, the same conclusion usually applies to keys, aliases, and web addresses.
Opening the Tab
You can open the tab from these UI locations:
- The Explore side view
- Click the
References tab icon. It starts on the root map of the active
publication. - The Files side view
- Choose Show references from the menu of a file.
- The editor
- Right-click inside an element and choose Show References. The tab highlights references to the element at the caret or to its closest ancestor that has an ID.
- The Publications side view
- Choose Show References from the contextual menu of an element in the tree editor.
Each option selects the file in the tab and displays it in the Referenced by direction.
Toolbar
- Back, Forward
- Move through the files that you selected in the tab.
- Refresh
- Rereads the files in the workspace. The tab does not update as you edit files, so click this button after changing files.
- Open in editor
- Opens the selected file in the editor. When the selected file is a web address, the button is Open URL and opens the address in a new browser tab.
- Use the context publication as scope
- Limits the scope to the files included in the context publication. The tab then resolves keys and applies profiling in the same way as the publication. Click it again to return to the whole project. The browser remembers your choice.
Choosing a File
The field below the toolbar shows the selected file. To select another file, click the field and enter part of a file name or path. Separate multiple words with spaces (a file must match all of them). Files whose names start with the entered text appear first, followed by files whose names or paths contain it. When no text is entered, the list displays the most frequently referenced files first.
Each file in the list shows its number of references (for example, 3 in · 2 out. The tabs above the list filter files by type and show the number of files of each type: All, Keys, Topics, Aliases, Maps, Resources, URLs, DITAVAL, and Problems. A tab appears only when the project contains files of that type. Problems lists files that are referenced but do not exist or cannot be read, as well as undefined keys.
Direction
The two buttons below the field determine what the tree displays:
- Referenced by - Displays the files that reference the selected file.
- References - Displays the files that the selected file references.
A file referenced only by the project file, such as a root map, starts in References. All other files start in Referenced by.
Reading the Tree
Each tree item is a file, key, alias, or web address (see The Web of DITA References). Expand a file to view the next level in the same direction. Hover over a file to view its full path.
- Files show the icon of their type. Keys and aliases show a key icon, and web addresses a link icon.
- A red error icon marks a file that does not exist or that cannot be read.
- [def] marks the maps that define a key. They come first.
- [alias] marks a copy of a topic made with the
@copy-toattribute. - [source] marks the relation opposite to [alias].
- When other files reference two or more elements of the selected file, the Referenced by files are grouped by element, under Element id="..." or Root element.
- A loop icon marks a file already shown higher in the same tree branch. It cannot be expanded, preventing the tree from running in circles.
Files are sorted by kind: keys, topics, aliases, maps, resources, web addresses, DITAVAL files, and then missing and unreadable files. Files of the same kind retain the order of the references in the document.
Several References Between Two Files
When a file references another file more than once, the tree displays the number of references next to the file. Click the number to list the references. Each reference shows its kind, and its tooltip identifies the line and file where it occurs.
Actions in the Tree
- Click a file
- Opens the referencing file in the editor, with the caret in the element that contains the reference. If there is no reference to show, clicking opens the file itself. A file that the editor cannot open, such as a key, becomes the selected file instead. Clicking an element group opens the selected file at that element.
- Open
- Available in the contextual menu of a file (right-click or click the vertical ellipsis when hovering). Opens the file in the editor, or the web address in a new browser tab.
- Show references
- Available in the contextual menu of a file (right-click or click the vertical ellipsis when hovering). Selects that file in the References tab. Use Back to return.
Resources
For a full tour of the tab, watch our video tutorial: