Check Completeness
You can perform a completeness check on a document and optionally on all subcomponents of a document, such as file entities. Arbortext Editor checks to make sure that all components required by the document type are present. As you create and edit a document, Arbortext Editor constantly checks the context of your intended changes or additions and provides feedback to ensure you are creating a valid SGML or XML document. Certain required elements, however, may still be missing when you try to save and exit your document because Arbortext Editor does not require a complete document. If any required elements are missing, a listing of problems is reported.
During this check,
Arbortext Editor also looks for various problems with ID references, cross references, empty elements, and missing required attributes, and checks the validity of graphic entities. For
DITA documents,
Arbortext Editor does an additional enhanced completeness check after the regular complete check has completed. This enhanced completeness checking covers several additional areas that are specific to DITA documents. For further information, see
Using check completeness with DITA documents.
Performing a Completeness Check
To find completeness errors in your document:
Use the check_completeness command with the -full option to include entities.
If the document is complete, a message displays in the status bar verifying that no errors were found. If INC is highlighted in the status bar at the bottom of the Edit window, your document is incomplete and the Completeness Check Log window opens displaying the errors.
2. Double-click on the link beside the first error listed in the Completeness Check Log window.
This moves the cursor to the location of the error in your document.
3. If necessary, fix the error.
4. Repeat for each error in the window.
The Completeness Check Log Window
Completeness check messages are displayed in the Completeness Check Log window. The messages are divided into the following categories:
• Completeness Errors — Context checking errors such as elements out of context and missing required elements
• Markup Errors — Various errors where the markup is incorrect such as undeclared tags or attributes, duplicate attributes, invalid attribute values, missing required attributes, invalid PI name, unresolved file entities, empty elements, and so forth
• Entity Reference Errors — References to undeclared entities and notations
• ID and ID Reference Errors — Reports the number of missing ID references and any IDs defined multiple times
• Schema Errors — Any identity constraints for XML Schema document types
• Table Markup Errors — Incorrect table markup that prevents Arbortext Editor from recognizing the markup as a table, such as a row with no cell tags
• Table Markup Warnings — Incorrect table markup that might cause issues with the table but do not keep Arbortext Editor from recognizing the markup as a table
• Schematron Warnings — Warnings reported by the document type’s default schematron
Note that DITA documents have additional categories.
The Completeness Check Log window has two menus and a shortcut menu.
The File menu has the following options:
• Save — Saves the contents of the message window to an .xml file. If this is the first save since the window has displayed, you are asked to select an output file name.
• Save As — Saves the content to an output with a different name.
• Save as HTML — Saves the content to an .htm file.
• Print — Prints a published version of the message window. This printout will display the information currently set to be displayed by the View menu.
• Close — Closes the message window.
The View menu has the following options:
• Display — Determines the type of content to display in the message window:
◦ Messages — Displays all information (messages, warnings, and errors).
◦ Warnings — Displays only warnings and errors. This is the default setting.
◦ Errors — Displays only errors.
• Font Size — Provides two options for changing the font size in the message window:
◦ Increase — Increases the display font size.
◦ Decrease — Decreases the display font size.
The shortcut menu appears when you click the right mouse button inside the message window. It has the following options:
• Copy — Copies the selected region to the clipboard. This option is available only when you click inside a selected region.
• Follow Link — If you right-click on a LINK in the message window and select this option, the linked document displays with the cursor positioned at the appropriate location in the source document. This option has no effect if there are no links in the message window.
• Collapse/Expand — Collapses or expands the current entry.
Possible Completeness Check Issues
You should take note of the following potential issues when using the check completeness feature:
• If you have defined the optional
filename attribute for
graphics support in your
document type configuration (
.dcf) file,
Arbortext Editor will report a completeness error when that attribute does not have a value.
• If you have applied an
alias map to your document, the element names in the panel will be aliases.
• You may see a parser error when using the
Equation Editor for an equation that appears to be correct. This may happen because when the math document type fragment was incorporated into another document type, the target document type may have a content model that allows empty content. For further information, see
Integrating the Equation Editor in a Document Type.
• If your SGML document includes file entities not created in Arbortext Editor or entities edited elsewhere, they will not be normalized when the document is saved. Normalizing adds omitted tags so tag pairs are complete. The failure to normalize file entities can cause context or completeness errors when trying to edit file entities within your document. To ensure that a document is normalized and complete, choose the Read as option: Import SGML when opening the document from the Open dialog box.
Related information