Hi,
We use a lot of variables for product names. The variable values contain the trademark symbols by default. However, the trademark symbol should not be used after the first occurrence. For example, if product A occurs twice, the second occurrence should not have the symbol in the output. Is there a way to discard it from the second occurrence when transformation is run?
Dynamically discard registered trademark symbol
-
- Posts: 30
- Joined: Sat May 04, 2019 5:55 pm
Re: Dynamically discard registered trademark symbol
Hi,
Could you please specify what kind of framework do you use as source file (DITA)? Also, what type of output do you try to obtain(WebHelp Responsive, PDF, etc) and which transformation do you run in oXygen XML?
Regards,
Ionela
Could you please specify what kind of framework do you use as source file (DITA)? Also, what type of output do you try to obtain(WebHelp Responsive, PDF, etc) and which transformation do you run in oXygen XML?
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 30
- Joined: Sat May 04, 2019 5:55 pm
Re: Dynamically discard registered trademark symbol
Hi,
Thank you for the response.
Framework is a custom framework based on the default DITA framework.
Outputs = PDF, Webhelp, CHM
We are planning to modify the PDF and webhelp output using CSS customization features.
Thank you for the response.
Framework is a custom framework based on the default DITA framework.
Outputs = PDF, Webhelp, CHM
We are planning to modify the PDF and webhelp output using CSS customization features.
Re: Dynamically discard registered trademark symbol
Hi,
The XSLT stylesheet which outputs the HTML content for the DITA <tm> is located in:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl
There is an XSLT template which matches the <tm> element:
and maybe you can create an HTML customization XSLT which overrides this stylesheet and avoids outputting the trademark symbol if in the same file there has been a previous trademark.
Regards,
Radu
The XSLT stylesheet which outputs the HTML content for the DITA <tm> is located in:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl
There is an XSLT template which matches the <tm> element:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/tm ')]" name="topic.tm">
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Sat May 04, 2019 5:55 pm
Re: Dynamically discard registered trademark symbol
Hi Radu,Radu wrote: ↑Fri Sep 20, 2019 10:53 amHi,
The XSLT stylesheet which outputs the HTML content for the DITA <tm> is located in:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x/plugins/org.dita.html5/xsl/topic.xsl
There is an XSLT template which matches the <tm> element:
and maybe you can create an HTML customization XSLT which overrides this stylesheet and avoids outputting the trademark symbol if in the same file there has been a previous trademark.Code: Select all
<xsl:template match="*[contains(@class, ' topic/tm ')]" name="topic.tm">
Regards,
Radu
Thanks for directing me to that xsl file. I could find a solution by overriding the <xsl:template match="*[contains(@class, ' topic/tm ')]" name="topic.tm">.
Code: Select all
<xsl:variable name="usebody">
<xsl:choose>
<!-- ANTONY TERRENCE custom start-->
<xsl:when test="parent::*[contains(@class,'topic/ph')]/text()=preceding::*[contains(@class, ' topic/ph ')][not(parent::*[contains(@class, 'topic/title')])]/text()" >skip</xsl:when>
<!-- ANTONY TERRENCE custom end-->
Regards,
Antony Terrence
Re: Dynamically discard registered trademark symbol
Hi Antony,
Thanks for posting the solution.
Regards,
Radu
Thanks for posting the solution.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com