Hovertext implementation in html output

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Hovertext implementation in html output

Post by eloralon » Fri Jun 07, 2013 5:45 pm

Hello,

I am trying to implement hovertext effect for my glossary term definition using the following documents, but I have not been able to achieve that at the moment.

What I need is be able to show when we mouse over the content of <glossdef>some text..</glossdef>. I might be doing something wrong. Here are my source files:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glossgroup PUBLIC "-//OASIS//DTD DITA Glossary Group//EN" "glossgroup.dtd">
<glossgroup id="glossgroup_dsp_hgg_kk">
<title>ABS</title>

<glossentry id="abs">
<glossterm>Anti-lock Braking System</glossterm>
<glossdef>ABS or Anti-lock Braking System is ...</glossdef>
<glossBody>
<glossSurfaceForm>Anti-lock Braking System (ABS)</glossSurfaceForm>
<glossAlt>
<glossAcronym>ABS</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>

<glossentry id="abs1">
<glossterm>Anti-lock Braking System</glossterm>
<glossdef>ABS or Anti-lock Braking System is ...</glossdef>
<glossBody>
<glossSurfaceForm>Anti-lock Braking System (ABS)</glossSurfaceForm>
<glossAlt>
<glossAcronym>ABS-BIS</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>

</glossgroup>
The map

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA 1.2 Map//EN" "map.dtd">
<map>
<title>KeyrefMasterMap</title>
<topicref href="glossary1.dita"/>

<glossref keys="abs" href="glossary1.dita"/>
<glossref keys="abs1" href="glossary1.dita"/>


</map>
And the example dita file for the hovertext effect

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_qhd_fs5_kk">
<title>Glossary terms demo</title>
<body>
<p>This is simply a demo for glossary term inside another topic. The <term keyref="abs"/></p>
<p>This is a test keyref <term keyref="abs1" /></p>
<p><xref href="myterm.dita">My Term<desc>My term means...</desc></xref></p>
</body>
</topic>
I also followed the explanations here http://www.oxygenxml.com/forum/topic6726.html but still the expected result does not show.

Thanks for your help.

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: Hovertext implementation in html output

Post by eloralon » Tue Jun 11, 2013 4:31 pm

Please oXygen support Team,

Don't ignore my request as I really need to get this working.

Thanks

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

Re: Hovertext implementation in html output

Post by sorin_ristache » Tue Jun 11, 2013 4:37 pm

Hi,

We received your request posted here on the forum, we will look into it and we will get back to you, we just have some other pending user requests now that we released Oxygen 15.0.


Regards,
Sorin

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: Hovertext implementation in html output

Post by eloralon » Tue Jun 11, 2013 4:45 pm

Thanks Sorin,

I have already installed v15.0 and I am very impressed with the additional features on DITA XML.

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

Re: Hovertext implementation in html output

Post by sorin_ristache » Wed Jun 12, 2013 10:40 am

Hi eloralon,
eloralon wrote:I am trying to implement hovertext effect for my glossary term definition using the following documents, but I have not been able to achieve that at the moment.

What I need is be able to show when we mouse over the content of <glossdef>some text..</glossdef>. I might be doing something wrong. Here are my source files:
I tested an example similar to yours and I get the text from glossdef on mouse hover. When you generate the Webhelp output with Oxygen 14.2 or 15.0 in your topic Glossary terms demo the element <term keyref="abs"/> is be replaced in the HTML output page with the text from glossSurfaceForm, which is Anti-lock Braking System (ABS), and the text from the mouse hover popup is the text from the glossdef element.

What text is displayed in the mouse hover popup in your Webhelp output? What Oxygen version do you use? I tried with Oxygen 14.2 build number 2013040919. If the text from glossdef is not displayed on the mouse hover popup for your DITA map please send us a small set of sample files for reproducing the problem (a sample DITA map, the included topics, glossary terms, etc).


Regards,
Sorin

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: Hovertext implementation in html output

Post by eloralon » Wed Jun 12, 2013 8:50 pm

Hello Sorin and thanks for your reply,

I have sent the sample documents as recommended.

Thanks.

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

Re: Hovertext implementation in html output

Post by sorin_ristache » Fri Jun 14, 2013 5:33 pm

Hi,

Thank you for sending your example files. I just sent you by email the modified example. If you run the DITA Webhelp transformation on the included DITA map you can see the content of the <glossdef> element when you hover the mouse over the glossterm.


Regards,
Sorin

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: Hovertext implementation in html output

Post by eloralon » Fri Jun 14, 2013 6:19 pm

Thanks Sorin,

The feature is now working as expected after your adjustment.

lostiniceland
Posts: 14
Joined: Tue Nov 12, 2013 4:26 pm

Re: Hovertext implementation in html output

Post by lostiniceland » Tue Nov 12, 2013 4:28 pm

eloralon wrote:Thanks Sorin,

The feature is now working as expected after your adjustment.
Would you mind posting the solution? I am very interested in the adjustments to the intial XML that made it work.
Thanks

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

Re: Hovertext implementation in html output

Post by sorin_ristache » Wed Nov 13, 2013 4:44 pm

Hi,

Sure, please see below. The glossary terms are defined for example in a DITA topic called glossary.dita:

Code: Select all

<glossgroup id="glossary_id">
<title>ABS</title>

<glossentry id="abs">
<glossterm>Anti-lock Braking System</glossterm>
<glossdef>THIS IS THE TEXT THAT WILL SHOW UP ON MOUSE OVER FOR abs</glossdef>
<glossBody>
<glossSurfaceForm>Anti-lock Braking System (ABS)</glossSurfaceForm>
<glossAlt>
<glossAcronym>ABS</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>

</glossgroup>
The reference to the term is inserted in a topic called for example glossexample.dita that contains:

Code: Select all

<p> ... the <term keyref="abs">ABS system</term> ... </p>
Both the glossary.dita and glossexample.dita must be included in the same map, for example:

Code: Select all

  <topicref href="glossexample.dita"/>
<glossref keys="abs" href="glossary.dita"/>

Regards,
Sorin

Post Reply