|Content re-use / Re-use practices|
When using a conref in a topic to transclude text from another topic, the referencing element must be valid DITA XML.
Conref transclusions involve two elements: the referencing element and the referenced element. The referencing element is the element that will be re-using the content in the referenced element (the source of the re-usable content).
When the element being transcluded requires particular attributes or child elements, then these attributes and elements must also be included in the referencing element code.
For example, a step element must contain at least one cmd element. Therefore, the following mark-up would be invalid DITA because the cmd element is missing.
<step conref="t_starting.dita#t120/sec_code" />
Instead, a "dummy" cmd element must be included for the mark-up to be valid, as shown in the following.
<step conref="t_starting.dita#t120/sec_code"><cmd /></step>
If an attribute is mandatory in a transcluded element, such at the tmtype attribute in the trademark (tm) element, the referencing element must include the attribute. However, a special attribute value of -dita-use-conref-target can be used to maintain the validity of the element, and specify that the referenced source element's attributes be used in the transclusion.
<tm conref="conref_source.dita#names12/var_suparu" tmtype="-dita-use-conref-target" />
If you are using constraints, a feature introduced in DITA 1.2, you must take care to avoid conreffing elements from an unconstrained topic to a constrained topic. (In general, referencing an unconstrained source topic element from a constrained topic will only work if the constraint type is marked as weak, not strict.)