WebHelp: How to achieve one-page glossary with term tooltips?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 19
- Joined: Sat Jun 24, 2023 7:35 pm
WebHelp: How to achieve one-page glossary with term tooltips?
Hello.
I'd like to achieve the following result using the WebHelp transformation for the glossary:
- One resultant web page with all glossary terms
- Tooltips when the term is mentioned in other topics
I've tried many methods and I failed, ultimately I decided to seek help here...
At the moment, I had to resort to the following soluition:
Each glossary term is seen on separate page
Tooltips are displayed correctly when using <term keyref="term"/>
I achieved this by doing the following:
- Each glossary term is a separate file with a separate <glossentry> topic. For example (simplified):
topic1.dita:
<glossentry id="term1">
<glossterm>Term 1</glossterm>
<glossdef>Definition of term 1.</glossdef>
</glossentry>
glossary.ditamap
<topicref href="topic1.dita" keys="term1"/>
<topicref href="topic2.dita" keys="term2"/>
(...)
Of course, glossary.ditamap is imported into the main ditamap:
<topichead>
<topicmeta><navtitle>Glossary</navtitle></topicmeta>
<topicref href="glossary.ditamap" format="ditamap"/>
</topichead>
I tried using a single glossary definition file using <glossgroup>. However, the result was that while there was one page in the resultant HTML with all glossary terms, whenever a term was displayed, the tooltip contained the <glossdef> from the first term in the <glossgroup>. I tried doing all I can, creating keys, following the tips in this topic: dita-editing-and-publishing-dita-conten ... 15542.html -- nothing seem to have worked.
Could please someone be so kind as to explain to me very simply how do I do this? If I need to use the keys, how do I define them and import them? The simplest possible way, could be keys in main ditamap directly, one glossgroup file, and what I need to reference in the <term> elements in other topics please...
Thank you in advance!
I'd like to achieve the following result using the WebHelp transformation for the glossary:
- One resultant web page with all glossary terms
- Tooltips when the term is mentioned in other topics
I've tried many methods and I failed, ultimately I decided to seek help here...
At the moment, I had to resort to the following soluition:
Each glossary term is seen on separate page
Tooltips are displayed correctly when using <term keyref="term"/>
I achieved this by doing the following:
- Each glossary term is a separate file with a separate <glossentry> topic. For example (simplified):
topic1.dita:
<glossentry id="term1">
<glossterm>Term 1</glossterm>
<glossdef>Definition of term 1.</glossdef>
</glossentry>
glossary.ditamap
<topicref href="topic1.dita" keys="term1"/>
<topicref href="topic2.dita" keys="term2"/>
(...)
Of course, glossary.ditamap is imported into the main ditamap:
<topichead>
<topicmeta><navtitle>Glossary</navtitle></topicmeta>
<topicref href="glossary.ditamap" format="ditamap"/>
</topichead>
I tried using a single glossary definition file using <glossgroup>. However, the result was that while there was one page in the resultant HTML with all glossary terms, whenever a term was displayed, the tooltip contained the <glossdef> from the first term in the <glossgroup>. I tried doing all I can, creating keys, following the tips in this topic: dita-editing-and-publishing-dita-conten ... 15542.html -- nothing seem to have worked.
Could please someone be so kind as to explain to me very simply how do I do this? If I need to use the keys, how do I define them and import them? The simplest possible way, could be keys in main ditamap directly, one glossgroup file, and what I need to reference in the <term> elements in other topics please...
Thank you in advance!
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: WebHelp: How to achieve one-page glossary with term tooltips?
Hi,
Thank you for your feedback and all the details you have provided.
If possible, could you please send us a minimal sample file that we can use to reproduce this behavior on our side?
You can attach the sample either to this email thread or by email to support AT oxygenxml DOT com.
Regards,
Ionela
Thank you for your feedback and all the details you have provided.
If possible, could you please send us a minimal sample file that we can use to reproduce this behavior on our side?
You can attach the sample either to this email thread or by email to support AT oxygenxml DOT com.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 19
- Joined: Sat Jun 24, 2023 7:35 pm
Re: WebHelp: How to achieve one-page glossary with term tooltips?
test1.zip
test2.zip
Two projects attached. You need to generate WebHelp cause otherwise the file was too big to be attached.1. Tooltips are correct but each glossary term is a separate page.
2. Tooltips are incorrect (both tooltips show Term1) but all terms are on a single page.
What I want to achieve is: correct tooltips and all terms on a single page. When clicking on a term that has a tooltip, the glossary should also scroll to the term (anchor).
Thank you in advance!
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: WebHelp: How to achieve one-page glossary with term tooltips?
Hello,
To achieve the desired result (i.e. all glossary terms listed on a single page) you can set the @chunk="to-content" attribute on the Gloassary <topichead> in the first example (test1).
In this case the glossary terms are all listed on the same HTML page, and the links and tooltips are generated correctly.
As for the second case, I am not sure that way you have referenced the terms is correct because the DITA specification is not very clear in this case:
Regards,
Alin
To achieve the desired result (i.e. all glossary terms listed on a single page) you can set the @chunk="to-content" attribute on the Gloassary <topichead> in the first example (test1).
Code: Select all
<topichead chunk="to-content">
<topicmeta>
<navtitle>Glossary</navtitle>
</topicmeta>
<topicref href="glossary.ditamap" format="ditamap"/>
</topichead>
As for the second case, I am not sure that way you have referenced the terms is correct because the DITA specification is not very clear in this case:
See: You have associated two keys with the same glossgroup topic, but there is no clear mapping between the two terms in the glossgroup and the two keys:The @keyref attribute can be used to associate a term with a resource, typically a definition of the term. The @keyref attribute can also be used to supply the text content for <term> using standard @keyref processing for variable text.
If you consider that this approach is correct you can file an issue on the DITA-OT project: https://github.com/dita-ot/dita-ot/issuesCode: Select all
<topicref keys="term1 term2" href="glossary.dita"/>
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
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