Glossary
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Tue Nov 28, 2023 8:21 pm
Glossary
Post by dcjohn_maria »
When the user hovers over a glossary term, a short definition (content from <glossSurfaceForm>) should appear in the bubble. A more detailed definition should be present in the actual glossary section. How do we achieve this?
I tried embedding the longer definition within the text tag and used display:none in the CSS. It didn't work.
Sample igmp_gloss.dita file
I tried embedding the longer definition within the text tag and used display:none in the CSS. It didn't work.
Sample igmp_gloss.dita file
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary Entry//EN" "glossaryentry.dtd">
<glossentry id="gloss_igmp">
<glossterm>Internet Group Management Protocol</glossterm>
<glossdef>Internet Group Management Protocol </glossdef>
<glossBody>
<glossSurfaceForm>Internet Group Management Protocol (IGMP)</glossSurfaceForm>
<glossAlt id="glossAlt_xcf_24m_d2c">
<glossAcronym>IGMP <text> is a network protocol that allows devices to share an IP
address and receive the same messages. It's used to set up multicasting on IPv4
networks. </text></glossAcronym>
</glossAlt>
</glossBody>
</glossentry>
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Glossary
Post by julien_lacour »
Hello,
In HTML-based scenarios, like DITA Map HTML5 or DITA Map WebHelp Responsive, the tooltip that appears when hovering the <term> or <abbreviated-form> element referring the glossentry shows the content of the <glossdef>.
As explained in the DITA specification:
In your example, you should better set the glossentry like this:
And when you will hover the terms, you should get a tooltip containing: "Internet Group Management Protocol is a network protocol that allows devices to share an IP address and receive the same messages. It's used to set up multicasting on IPv4 networks."
Regards,
Julien
In HTML-based scenarios, like DITA Map HTML5 or DITA Map WebHelp Responsive, the tooltip that appears when hovering the <term> or <abbreviated-form> element referring the glossentry shows the content of the <glossdef>.
As explained in the DITA specification:
- The <glossdef> contains the term definition.
- The <glossSurfaceForm> usually bears both the term and its acronym.
- The <glossAcronym> only contains the acronym generally used for the defined term.
In your example, you should better set the glossentry like this:
Code: Select all
<glossentry id="gloss_igmp">
<glossterm>Internet Group Management Protocol</glossterm>
<glossdef>Internet Group Management Protocol is a network protocol that allows devices to share an IP address and receive the same messages. It's used to set up multicasting on IPv4 networks.</glossdef>
<glossBody>
<glossSurfaceForm>Internet Group Management Protocol (IGMP)</glossSurfaceForm>
<glossAlt id="glossAlt_xcf_24m_d2c">
<glossAcronym>IGMP</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>
Regards,
Julien
-
- Posts: 6
- Joined: Tue Nov 28, 2023 8:21 pm
Re: Glossary
Post by dcjohn_maria »
Hi Julien,
Thanks for the response.
Our requirement is that when the user hovers over the term, only a portion of the gloss definition must be displayed. In this case, it should be just "Internet Group Management Protocol," and the rest should be suppressed.
I see that during 2021, already a request was submitted for this feature. Please check the following link.
post74868.html?hilit=glossary#p74868
Regards,
Diana
Thanks for the response.
Our requirement is that when the user hovers over the term, only a portion of the gloss definition must be displayed. In this case, it should be just "Internet Group Management Protocol," and the rest should be suppressed.
I see that during 2021, already a request was submitted for this feature. Please check the following link.
post74868.html?hilit=glossary#p74868
Regards,
Diana
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Glossary
Post by julien_lacour »
Hello,
Currently the WebHelp Responsive output is compliant with the DITA specification, that mentions:
A solution could be to use an XSLT stylesheet that extends the com.oxygenxml.webhelp.xsl.dita2webhelp extension point and which overrides the @title attribute of the link so that when you hover it, only this portion of text is displayed.
There's an example of how to use such extension point in our user guide.
Regards,
Julien
Currently the WebHelp Responsive output is compliant with the DITA specification, that mentions:
The problem in this situation is that how can we evaluate "a portion of the gloss definition", as the result may differ depending on the requirement of each output.One possible implementation of a glossary in online processing is to associate a hotspot for mentions of terms in <term> elements and display the definition on hover or click.
A solution could be to use an XSLT stylesheet that extends the com.oxygenxml.webhelp.xsl.dita2webhelp extension point and which overrides the @title attribute of the link so that when you hover it, only this portion of text is displayed.
There's an example of how to use such extension point in our user guide.
Regards,
Julien
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