我想創建基於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」>' –