- Conref overview
The DITA @conref
, @conkeyref
, @conrefend
, and @conaction
attributes provide mechanisms for reusing content within DITA topics or maps. These mechanisms can be used both to pull and push content.
- The conref attribute
The @conref
attribute is used to reference content that can be reused. It allows reuse of DITA elements, including topic or map level elements.
- The conkeyref attribute
The @conkeyref
attribute provides an indirect content reference to topic elements, map elements, or elements within maps or topics. It allows the referencing element to use a key in place of a file name when referencing another topic or map.
- The conrefend attribute
The @conrefend
attribute is used when referencing a range of elements with the conref mechanism. The @conref
or @conkeyref
attribute references the first element in the range, while @conrefend
references the last element in the range.
- The conaction attribute
The @conaction
attribute allows users to push content from one location into another. It causes the @conref
attribute to work in reverse, so that content is pushed from the referencing element into another location, rather than pulled from another location to replace the referencing element.
- Using the -dita-use-conref-target value
The value -dita-use-conref-target is available on enumerated attributes and can also be specified on other attributes. When an element uses @conref
to pull in content, for any of its attributes assigned a value of -dita-use-conref-target, the resulting value for those attributes is also pulled in from the referenced element.
- Processing conrefs
When processing content references, DITA processors compare the restrictions of each context to ensure that the conrefed content is valid in its new context.
- Processing attributes when resolving conrefs
When resolving conrefs, processors need to combine the attributes that are specified on the referencing and referenced element.
- Processing xrefs and conrefs within a conref
When referenced content contains a content reference or cross reference, the effective target of the reference depends on the form of address that is used in the referenced content. It also might depend on the map context, especially when key scopes are present.
- Examples of conref
This section contains examples and scenarios that illustrate the use and processing of @conref
and related content-referencing attributes.