【发布时间】:2016-04-18 09:51:24
【问题描述】:
我想基于link 元素创建新元素。这对作者来说会比使用role 和otherrole 属性来指定链接角色更舒服。
不幸的是,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>
【问题讨论】:
-
能否也贴出XSLT模板+出现问题的行?如果问题一致,也许您可以在 DITA OT 错误列表中添加错误。
-
此行导致错误beetle.dita#L23。
-
两种变体都不起作用:-
<!ATTLIST hyponym %global-atts; class CDATA "- topic/link ">-<!ATTLIST hyponym %global-atts; class CDATA "- topic/link termentry/hypernym">