我想基于链接元素创建新元素。这对作者来说会比使用role
andotherrole
属性来指定链接角色更舒服。
不幸的是DITA-OT 2.2.1
,这条消息失败了:
Required item type of result of template related-links:link.
is element(Q{}link); supplied value has item type
element(Q{}myelement)
这是一种有效的方法,还是我应该坚持otherrole
?
更新1:
错误发生在related-links.xsl
:
<!-- Ungrouped links have the default-mode
template applied to them. (Can be overridden.) -->
<xsl:template match="*[contains(@class, ' topic/link ')]"
mode="related-links:link"
name="related-links:link."
as="element(link)">
<xsl:sequence select="."/> <!--- error points to this line -->
</xsl:template>