Page 1 of 1

any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 9:58 am
by balajinrs
any idea on how to include tool tip in xml file so that I can display some useful informaiton

Re: any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 10:08 am
by Radu
Hi,

Please give us more details. What type of XML file? Is it a DITA XML file or some other type of XML file? Where do you want to see the tooltip? In the published HTML output or extract the tooltip from the XML and display it in an application?

Regards,
Radu

Re: any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 10:49 am
by balajinrs
It is DITA xml file
Where do you want to see the tooltip?
I need to display tool tip text when I hover the mouse on a text once I render/load xml file in browser.

What I am trying to do is
I am trying to create CHM file using OxygenXML with HTMLHelp as a plugin.
input : DITAMAP of DITA files
output: CHM file
Challenge Facing : Since I am not able to include JavaScript in XML I am not able to display the content of a page(DITA file) as Tool Tip like window,
Which is possible in RoboHelp.

Re: any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 11:46 am
by Radu
Hi,

I'm not familiar with Robohelp's features. Did you generate a CHM also in Robohelp or was it something else?
Do you need to include Javacript libraries in the HTML content which gets generated inside the CHM? Do you know what Javascript libraries to include?

Regards,
Radu

Re: any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 12:57 pm
by balajinrs
Did you generate a CHM also in Robohelp or was it something else?
yes I was able to generate CHM file in RoboHelp. But here I am using OxygenXML Editor to generate CHM file. When I transform I am getting errors if I try to include Javascript in xml as shown below
<script src="../ehlpdhtm.js" type="text/javascript" language="JavaScript1.2">

<a href="javascript:BSSCPopup('Select_OD_Drop-Down_List_Box_Popup.htm');" id="A1">Select OD drop-down list box</a>

Re: any idea on how to include tool tip in xml file so that I can display some useful informaiton

Posted: Mon Nov 28, 2022 1:43 pm
by Radu
Hi,

If you edit DITA XML files you can only add content valid according to the DITA XML vocabulary.
You can embed welll-formed HTML content inside a DITA XML topic with this approach:
https://www.oxygenxml.com/doc/versions/ ... -html.html
The HTML needs to be well-formed, you need to also specify the end tag for the script element:

Code: Select all

<script src="../ehlpdhtm.js" type="text/javascript" language="JavaScript1.2"></script>
but this will not add the referenced javascript file inside the CHM, you probably need to customize the publish engine to copy the Javascript file inside the CHM at publishing time.

Regards,
Radu