Open raducoravu opened 3 years ago
@raducoravu See https://github.com/dita-ot/dita-ot/issues/2065 for related discussion.
@infotexture so according to what was done in #2065, the inconsistency between HTML and PDF still exists, in HTML the second tm is usually ignored, but before the fix for #2065 for certain languages the tm was always ignored for HTML output.
👍 https://www.oxygenxml.com/forum/viewtopic.php?p=70576#p70576
Is there a setting which will allow us to display the trademark symbol only to the first occurrence of the product name in each topic in the documentation?
In the "org.dita.pdf2/xsl/fo/topic.xsl" this template always returns true:
<xsl:template match="node() | @*" mode="tm-scope" as="xs:boolean" priority="-10">
<xsl:sequence select="true()"/>
</xsl:template>
The HTML algorithm which attempts to avoid outputting consecutive tm symbols in a topic seems to have problems as well for example here "org.dita.html5/xsl/topic.xsl"
<xsl:when test="preceding::*[contains(@class, ' topic/tm ')][@trademark = $tmvalue][ancestor::*[contains(@class, ' topic/body ') or contains(@class, ' topic/shortdesc ')]]">skip</xsl:when>
If in my topic I have something like this, the preceding:* will not find any other tm elements as they are in different paragraphs.
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="introduction">
<title>Introduction</title>
<body>
<p><tm tmtype="tm">Merative</tm></p>
<p><tm tmtype="tm">Merative</tm></p>
<p><tm tmtype="tm">Merative</tm></p>
</body>
</topic>
TestTMElement.zip
Feedback from one of our end users:
For example in cases like this:
in the HTML based outputs the second trademark symbol is skipped although it applies to a different text. For PDF both are taken into account.
Looking at how the XSLT stylesheets for HTML5 publishing interpret the element
dita-ot/plugins/org.dita.html5/xsl/topic.xsl
in the template:it seems to mimic a behavior in which subsequent trademark symbols are not output. For PDF output all trademark symbols are output. Our client expects the HTML output to behave in the same way.
The DITA 1.3 specification says nothing about how trademark symbols should be interpreted in the published output.