Reference Validation in DITA Documents

Serna helps you keep all references valid:
  1. Validation in DITA dialogs

    Using DITA dialogs ensures you make valid references:
    • In a DITA dialog, you select the target from the offered list of available targets.

    • If you are entering a path manually in a DITA dialog, it is validated. In the case of typing an invalid link, the Files list, Targets list, File type filter and Show types filter get disabled.

      Figure 1. Invalid path in the Insert External Xref dialog. Widgets are disabled.



  2. Validation by the stylesheet

    Stylesheets validate existing references. Your document may contain invalid references in the following cases:

    If there is an inaccessible path, the broken reference is shown in red.

    Figure 2. Invalid path is validated by the stylesheet.



  3. Validation by the Schema

    Serna reports invalid local references in the following cases:
    1. When you try to insert an invalid local reference

      When you try to insert an invalid local reference through the Attributes dialog, Serna behaves the following ways depending on the current validation mode:
      • Strict Validation

        The error message appears and the operation is cancelled.

        Figure 3. Message: Operation not valid in context.



      • Validation On

        The invalid reference is inserted but a message reporting the not found target appears. You should correct the reference.

        Figure 4. Serna reports an invalid local reference.



      • Validation Off

        The invalid reference is inserted without any messages.

    2. When you open a document with invalid local references

      Your document may contain invalid references in the following cases:

      If there is an inaccessible path to a target within the current document, validation mode switches from Strict to On, and, in addition to the broken local reference in red, a message reporting the not found target appears.

      Figure 5. Serna reports an invalid local reference.



Related concepts
Xref
Related Link
Conref
Topicref
Operations with References in DITA Documents
Reference Navigation in DITA Documents