The conrefend attribute is used when referencing a range of elements with the conref mechanism. The conref or conkeyref attribute points to the first element in the range, while conrefend points to the last element in the range. Although the start and end elements must be of the same type as the referencing element (or specialized from that element), the intermediary, contiguous nodes in the middle of the range do not have to be the same.
<topic id="x"> ... <body> <ol> <li id="apple">A</li> <li id="bear">B</li> <li id="cat">C</li> <li id="dog">D</li> <li id="eel">E</li> </ol> </body> </topic>
<topic id="y"> ... <body> <ol> <li>My own first item</li> <li conref="topic.dita#x/bear" conrefend="topic.dita#x/dog"/> <li>And a different final item</li> </ol> </body> </topic>
<topic id="y"> ... <body> <ol> <li>My own first item</li> <li>B</li> <li id="cat">C</li> <li>D</li> <li>And a different final item</li> </ol> </body> </topic>
<topic id="x">
...
<body>
<p id="p1">First para</p>
<ol id="mylist">
<li id="apple">A</li>
<li id="bear">B</li>
<li id="cat">C</li>
<li id="dog">D</li>
<li id="eel">E</li>
</ol>
<p id="p2">Second para</p>
</body>
</topic>
<topic id="y"> ... <body> <p conref="topic.dita#x/p1" conrefend="topic.dita#x/p2"/> </body> </topic>
<topic id="y">
...
<body>
<p>First para</p>
<ol id="mylist">
<li id="apple">A</li>
<li id="bear">B</li>
<li id="cat">C</li>
<li id="dog">D</li>
<li id="eel">E</li>
</ol>
<p>Second para</p>
</body>
</topic>
<map>
<!-- ... -->
<keydef keys="xmp" href="examples.dita"/>
<!-- ... -->
</map>
examples.dita:
<topic id="examples">
<title>These are examples</title>
<body>
<ul>
<li id="first">A first example</li>
<li>Another trivial example</li>
<li id="last">Final example</li>
</ul>
</body>
</topic>
<li conkeyref="xmp/first"
conrefend="default.dita#default/last"/>default.dita#default)
is replaced with the object represented by the key (the first topic
in examples.dita), resulting in a range that ends with the object
examples.dita#examples/last.
<li conkeyref="thisconfig/start"
conref="standardconfig.dita#config/start"
conrefend="standardconfig.dita#config/end"/>mySpecialConfig.dita#myconfig,
then the range will go from the list item with id="start" to the list
item with id="end" in the topic mySpecialConfig.dita#myconfig.
myConfig.dita,
then the range will go from the list item with id="start" to the list
item with id="end" within the first topic in myConfig.dita.
standardconfig.dita#config.
| Condition or Issue | Result |
|---|---|
| The conref attribute cannot be resolved in the target document (the target element may have been removed or its ids has changed). | The conref is ignored. |
| The conrefend attribute cannot be resolved in the target document (the target element may have been removed or its id has changed). | Range cannot be resolved, optional recovery processes the result as a simple conref. |
| Start and end elements are not siblings in the target document. | If the start element exists, optional recovery processes the result as a simple conref. |
| End element occurs before the start element in the target document. | If the start element exists, optional recovery processes the result as a simple conref. |
| An element has a conrefend attribute but is missing the conref | No result. |
‣ Parent topic: Section 4.2. Complex attribute definitions
‣ Previous topic: Section 4.2.5. The conaction attribute