Syntax #
keyref((name=\name)(ID=id.file extension)
Where name is a key name
ID is the ID of the target element, if applicable
Purpose #
Keyrefs are used to identify and preserve variables in a document. Applying a keyref annotation converts plain text into a reference in the XML output. This allows the replication and preservation of variables. Maintaining keyrefs ensures easy propagation of changes throughout all single-sourced content.
Examples #
The following is an example of a time where you might want to use the keyref annotation:
Note: In this example, variables are marked with a green box
The following is an example of a rule that will apply keyrefs:
The following is an example of the DITA output you would get from this annotation.
prereq>
<p>OmniMark Concurrent Processing Engine runs programs written in the <keyword keyref="Prodname"/> programming language.</p>
<p>To run <keyword keyref="Prodname"/> programs from source in OmniMark Concurrent Processing Engine:</p>
</prereq>
The following is the DITA XML output for the sample text without assigning keyrefs:
<prereq>
<p>OmniMark Concurrent Processing Engine runs programs written in the OmniMark programming language.</p>
<p>To run OmniMark programs from source in OmniMark Concurrent Processing Engine:</p>
</prereq>