我想创建基于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 Bugs列表中添加一个错误。 –
此行导致错误[beetle.dita#L23](https://github.com/doctales/org.doctales.terminology/blob/0b7384483956473a7d019091baf7d60f331547ac/samples/beetle.dita#L23)。 –
两种变体都不起作用: - <!ATTLIST hyponym%global-atts; class CDATA“ - topic/link”>' - '<!ATTLIST hyponym%global-atts; class CDATA“ - topic/link termentry/hypernym”>' –