首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >可以引用DITA <topichead>元素吗?

可以引用DITA <topichead>元素吗?
EN

Stack Overflow用户
提问于 2018-09-24 16:19:37
回答 1查看 397关注 0票数 2

我的目标是提供一个指向文档主要部分开始的链接,该部分以<topichead>元素作为节标题开始。

我想不出有什么办法可以通过conref实现这一点。在主映射文件sequence.ditamap中,<topichead>元素编写如下:

代码语言:javascript
复制
<topichead id="th_adding_usrs">
    <topicmeta>
        <navtitle>Adding a new user to the team</navtitle>
    </topicmeta>
    <topicref href="tasks/requests.dita"/>
    <topicref href="tasks/db_sets.dita"/>
    <topicref href="tasks/user_support.dita"/>
</topichead>
<topicref href="concepts/integration.dita"/>

<topichead> th_adding_usrs的引用出现在主题integration.dita中。

integration.dita中,我尝试将conref="sequencing.ditamap#th_adding_usrs"放入<p>元素,然后是<ph>元素,但这两种方法仍然给了我一个错误(我正在使用OxygenXML编辑器,v20.1),报告说Conref没有展开,因为它找不到conref="sequence.ditamap#th_adding_usrs"的目标。

我还在上面的<p>元素中尝试了一个<p>元素,其中的conref属性也和上面一样,但是得到了相同的错误。

甚至可以交叉引用(或者提供一个可点击的链接)到<topichead>元素吗?

而且,更广泛地说,使用<topichead>元素是否比只有标题而没有内容的实际<topicref>更有优势?我正在遵守公司内使用的惯例,但我没有必要这样做。因此,如果<topichead>没有任何优势,我将避免使用它们来支持只有标题的<topicref>

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-24 18:53:40

向主题头和主题参考添加键允许在xref元素中使用keyref属性来链接到主题头。

因此,添加了一个键的<topichead id="th_adding_usrs"><topichead keys=”adding_usrs” id="th_adding_usrs">,带有键的主题integration.dita是。

integration.dita中,正确使用xref (如:<p>Refer to <xref keyref=”adding_usrs”/></p>链接)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52483500

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档