Keyref to nested topic elements not working
Post here questions and problems related to editing and publishing DITA content.
Keyref to nested topic elements not working
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!
Re: Keyref to nested topic elements not working
Hi,
This is correct, according to the DITA 1.3 specification a key is defined to point to a topic and can refer sub elements from that topic, not from inner topics inside that topic. The DITA OT publishing engine may be more relaxed and not follow the specification on this but the Oxygen validation and editing does.
So for inner topics you would need to define separate keydefs like:
and then use those keys which point directly to the inner topic.
Regards,
Radu
This is correct, according to the DITA 1.3 specification a key is defined to point to a topic and can refer sub elements from that topic, not from inner topics inside that topic. The DITA OT publishing engine may be more relaxed and not follow the specification on this but the Oxygen validation and editing does.
So for inner topics you would need to define separate keydefs like:
Code: Select all
<keydef keys="inner" href="path/to/fileName.dita#INNER_TOPIC_ID"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service