Can organizations define their own custom link types in DITA?

Organizations can indeed define their own custom link types in DITA, allowing for flexibility in creating specialized links tailored to their specific documentation needs. Custom link types can be useful when standard hyperlink or cross-reference elements don’t adequately represent the relationships between topics or resources. Here’s how custom link types can be defined and used in DITA XML:

1. Define Custom Link Types: To create custom link types, organizations need to define specialized elements in their DITA specialization. These new elements represent the custom link types and can include attributes to capture additional information. For example, you can create a custom link type called <mylink> with a custom attribute customtype to describe the link’s purpose.


Here’s an example of a custom link type definition in DITA XML:

<element name="mylink" id="mylink" specialization="href" customtype="description" />

2. Use Custom Link Types: After defining custom link types, you can use them within your DITA content. These custom link elements work similarly to standard hyperlink or cross-reference elements but offer additional context and meaning specific to your organization’s needs. You can set the customtype attribute with a description of the link’s purpose or type.


Here’s an example of using a custom link type in DITA XML:

<mylink href="related-topic.dita" customtype="See More Details" />

This example illustrates how organizations can define and utilize custom link types in DITA to enhance the structure and semantics of their documentation.