Normalizing spaces in glossary hovertip text (webhelp)

Post here questions and problems related to editing and publishing DITA content.
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Normalizing spaces in glossary hovertip text (webhelp)

Post by Rodrik »

The hovertip text that is created for glossary entries in the webhelp output includes extraneous spaces and returns. I looked in the dita2htmlImpl.xsl file but in spite of finding the template

Code: Select all

<xsl:template match="*[contains(@class, ' topic/term ')]" name="topic.term">
I couldn't figure out where there might be a missing normalize-space.

I'd appreciate your help.

Regards

Rodrik
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Normalizing spaces in glossary hovertip text (webhelp)

Post by sorin_ristache »

Hi Rodrik,

In order to remove the spaces from the tooltip text of glossary terms you should add a normalize-space() call on the line 1429 where the XHTML link to the glossary term is created, which means you should replace the line:

Code: Select all

<a href="{$updatedTarget}" title="{$hovertext}">
with the line:

Code: Select all

<a href="{$updatedTarget}" title="{normalize-space($hovertext)}">
Regards,
Sorin

<oXygen/> XML Editor Support
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Re: Normalizing spaces in glossary hovertip text (webhelp)

Post by Rodrik »

Perfect. Thank you very much.
Post Reply