188.8.131.52 Conref overview
@conaction attributes provide mechanisms for reusing content within DITA topics
or maps. These mechanisms can be used both to pull and push content.
- Pulling content to the referencing element
@conkeyrefattribute is used alone, the referencing element acts as a placeholder for the referenced element, and the content of the referenced element is rendered in place of the referencing element.
The combination of the
@conrefendattribute with either
@conkeyrefspecifies a range of elements that is rendered in place of the referencing element. Although the start and end elements must be of the same type as the referencing element (or specialized from that element type), the elements inside the range can be any type.
- Pushing content from the referencing element
@conactionattribute reverses the direction of reuse from pull to push. With a push, the referencing element is rendered before, after, or in place of the referenced element. The location (before, after, or in place of) is determined by the value of the
@conactionattribute. Because the
@conrefendattributes cannot both be used within the same referencing element, it is not possible to push a range of elements.
A fragment of DITA content, such as an XML document that contains only a single paragraph without a topic ancestor, does not contain enough information for the conref processor to be able to determine the validity of a reference to it. Consequently, the value of a conref must specify one of the following items:
- A referenced element within a DITA map
- A referenced element within a DITA topic
- An entire DITA map
- An entire DITA topic