DITA webhelp output - how to change hovertext for <term> element?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4
- Joined: Fri Jan 20, 2012 2:29 am
DITA webhelp output - how to change hovertext for <term> element?
Post by dariahutch »
In the DITA webhelp output, an xref link shows the shortdesc of the target topic when you hover over it. I want to have the same behavior for <term keyref> links to glossary entry topics. Right now it shows the topic title in the hover text instead of the shortdesc in the hover text. How can I change that?
Re: DITA webhelp output - how to change hovertext for <term> element?
Hi,
If you look in this XSL:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/xslhtml/dita2htmlImpl.xsl
it contains a template called:
That template contains 2 variables called:
which is the link text and:
which is the tooltip which appears on such a link.
The "hovertext" seems to look mostly at glossSurfaceForm so if your glossentry has a content like:
Then the hovertext tooltip will be computed to be THE SURFACE FORM.
http://docs.oasis-open.org/dita/v1.2/os ... urfaceForm
But the "displaytext" variable also prefers the surface form if the term keyref is the first keyref in the topic.
The idea would be that on the first encounter the surface form is displayed on a link and then on previous references to the key the acronym (<glossterm>) is used instead.
I think that you can make some modifications in the "displaytext" to only show the acronym.
The general idea behind the behavior of acronyms in DITA is explained here:
http://www.oasis-open.org/committees/do ... cronym.pdf
but not everything is implemented properly in the DITA Open Toolkit so you should also check how publishing works in PDF for example.
Regards,
Radu
If you look in this XSL:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/xslhtml/dita2htmlImpl.xsl
it contains a template called:
Code: Select all
<xsl:template match="*[contains(@class,' topic/term ')]" name="topic.term">....
Code: Select all
<xsl:variable name="displaytext">....
Code: Select all
<xsl:variable name="hovertext">....
The "hovertext" seems to look mostly at glossSurfaceForm so if your glossentry has a content like:
Code: Select all
<glossentry id="glossentry_5ym_llv_4f">
<glossterm>Data Definition Language</glossterm>
<glossBody>
<glossSurfaceForm>THE SURFACE FORM</glossSurfaceForm>
</glossBody>
</glossentry>
http://docs.oasis-open.org/dita/v1.2/os ... urfaceForm
But the "displaytext" variable also prefers the surface form if the term keyref is the first keyref in the topic.
The idea would be that on the first encounter the surface form is displayed on a link and then on previous references to the key the acronym (<glossterm>) is used instead.
I think that you can make some modifications in the "displaytext" to only show the acronym.
The general idea behind the behavior of acronyms in DITA is explained here:
http://www.oasis-open.org/committees/do ... cronym.pdf
but not everything is implemented properly in the DITA Open Toolkit so you should also check how publishing works in PDF for example.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: DITA webhelp output - how to change hovertext for <term> element?
Hi Radu:
I'm wondering if the file path has changed for this. I don't see it in my current install (24.1) and I'm using HTML5 output.
Basically, I'd like the hovertext/tooltip seen in webhelp output to be a truncated version of the glossary definition you find if you click on the term. Right now, they output as the same text, which is a little lengthy for the hovertext. (So, the first <p> inside the <glossdef>.)
Thanks
I'm wondering if the file path has changed for this. I don't see it in my current install (24.1) and I'm using HTML5 output.
Basically, I'd like the hovertext/tooltip seen in webhelp output to be a truncated version of the glossary definition you find if you click on the term. Right now, they output as the same text, which is a little lengthy for the hovertext. (So, the first <p> inside the <glossdef>.)
Thanks
Last edited by Stacey on Mon Mar 14, 2022 7:15 pm, edited 3 times in total.
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service