Keyref to nested topic elements not working
Posted: Wed Jan 22, 2025 2:02 pm
Hello,
we have recently changed most of our xref href references to keyref references. Now we realize that we cannot address the same elements of a topic. It seems that a an href recognizes all IDs within a topic, whereas a keyref is limited to the top level element only.
Example:
I cannot address any ids that are outside the top level task element, meaning the nested task at the bottom is not recognized, the task and title elements cannot be found:
"Referenced ID path "c_agents_overview/task_czk_s2v_c2c" not found."
Why is that happening and how can I solve it? We want to keep addressing sub-contents (nested tasks, concepts or section elements) within a topic to be more precise in our referencing.
Thanks for the help!
we have recently changed most of our xref href references to keyref references. Now we realize that we cannot address the same elements of a topic. It seems that a an href recognizes all IDs within a topic, whereas a keyref is limited to the top level element only.
Example:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA General Task//EN" "generalTask.dtd">
<task id="c_agents_overview">
<title id="tests">Agents overview</title>
<shortdesc/>
<taskbody>
<context id="context_flk_vlw_psb">
<note id="note_m2v_tpz_lcc" type="attention">.</note>
</context>
</taskbody>
<task id="task_czk_s2v_c2c">
<title id="title_hbz_s2v_c2c">Test</title>
</task>
</task>
Code: Select all
<xref keyref="keyscope.fileName/task_czk_s2v_c2c"/>
Why is that happening and how can I solve it? We want to keep addressing sub-contents (nested tasks, concepts or section elements) within a topic to be more precise in our referencing.
Thanks for the help!