Display shortdesc of target topic in imagemap
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 24
- Joined: Wed Dec 05, 2018 2:48 pm
Display shortdesc of target topic in imagemap
Hi,
I found a similar topic dated back to 2015:
post33485.html?hilit=imagemap%20shortdesc#p33485
Is there an easier solution in 2019?
Thanks,
Anne
I found a similar topic dated back to 2015:
post33485.html?hilit=imagemap%20shortdesc#p33485
Is there an easier solution in 2019?
Thanks,
Anne
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display shortdesc of target topic in imagemap
Hi Anne,
Sorry but as this is not a common request we do not have a parameter to enable such behavior. So an XSLT customization would indeed be needed for this.
Regards,
Radu
Sorry but as this is not a common request we do not have a parameter to enable such behavior. So an XSLT customization would indeed be needed for this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Wed Dec 05, 2018 2:48 pm
Re: Display shortdesc of target topic in imagemap
Hi Radu,
As suggested in the mentioned post, I modified the file ut-d.xsl with the following:
<xsl:variable name="alttext"><xsl:apply-templates select="*[contains(@class, ' topic/xref ')]/*[contains(@class, ' topic/desc ')]" mode="text-only"/></xsl:variable>
however this didn't seem to work. Is anything else needed?
Thanks,
Anne
As suggested in the mentioned post, I modified the file ut-d.xsl with the following:
<xsl:variable name="alttext"><xsl:apply-templates select="*[contains(@class, ' topic/xref ')]/*[contains(@class, ' topic/desc ')]" mode="text-only"/></xsl:variable>
however this didn't seem to work. Is anything else needed?
Thanks,
Anne
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display shortdesc of target topic in imagemap
Hi Ann,
On that older forum post my suggestion was about making changes to the XSLTs in the "org.dita.xhtml" plugin.
About 1-2 years ago our WebHelp started to be based on the "org.dita.html5" plugin which has similar XSLT stylesheets.
So you would either need to make a change in the stylesheets for the html5 plugin or create a new DITA OT plugin which adds an extension for the HTML5 publishing overriding that base XSLT template.
If you will not be able to make this work I can try to look again at the code, and maybe come up with such a plugin in a couple of days.
Regards,
Radu
On that older forum post my suggestion was about making changes to the XSLTs in the "org.dita.xhtml" plugin.
About 1-2 years ago our WebHelp started to be based on the "org.dita.html5" plugin which has similar XSLT stylesheets.
So you would either need to make a change in the stylesheets for the html5 plugin or create a new DITA OT plugin which adds an extension for the HTML5 publishing overriding that base XSLT template.
If you will not be able to make this work I can try to look again at the code, and maybe come up with such a plugin in a couple of days.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Wed Dec 05, 2018 2:48 pm
Re: Display shortdesc of target topic in imagemap
I made the same change to the file ut-d.xsl under the "org.dita.html5" plugin, namely \dita-ot\plugins\org.dita.html5\xsl\ut-d.xsl , and ran a DITA Map Webhelp responsive transform. Alas, the same result. Is this the right file?
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display shortdesc of target topic in imagemap
Hello Anne,
I created a DITA Open Toolkit plugin which should do what you want:
https://github.com/oxygenxml/dita-html- ... desc-links
Regards,
Radu
I created a DITA Open Toolkit plugin which should do what you want:
https://github.com/oxygenxml/dita-html- ... desc-links
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Wed Dec 05, 2018 2:48 pm
Re: Display shortdesc of target topic in imagemap
Hi Radu,
First, thank you very much for taking time to create this plugin. Unfortunately, it didn't work for me.
Here's what I did:
1. Downloaded the project as ZIP.
2. Extracted the folder com.oxygenxml.shortdesc.imagemap to the \Oxygen\docs-dita-tools\dita-ot\plugins folder.
3. In Oxygen, ran the Run DITA-OT integrator. The build was successful.
4. Restarted Oxygen.
5. Ran a standard DITA Map Webhelp Responsive transform on my bookmap that includes a topic with an imagemap.
6. Checked the results: the tooltips on the image map still display the topic names rather than their shortdescs.
Did I do anything wrong?
Thanks and regards,
Anne
First, thank you very much for taking time to create this plugin. Unfortunately, it didn't work for me.
Here's what I did:
1. Downloaded the project as ZIP.
2. Extracted the folder com.oxygenxml.shortdesc.imagemap to the \Oxygen\docs-dita-tools\dita-ot\plugins folder.
3. In Oxygen, ran the Run DITA-OT integrator. The build was successful.
4. Restarted Oxygen.
5. Ran a standard DITA Map Webhelp Responsive transform on my bookmap that includes a topic with an imagemap.
6. Checked the results: the tooltips on the image map still display the topic names rather than their shortdescs.

Did I do anything wrong?
Thanks and regards,
Anne
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display shortdesc of target topic in imagemap
Hi Anne,
You seem to be doing all the right things.
I just tested the plugin again with the DITA OT 3.x bundled with Oxygen 21.1 and it works for me. I'm testing with a very basic image map which looks like this:
Do those target topics actually have the shortdesc added to them?
Do you produce WebHelp responsive using the same DITA OT to which you made changes? Is that custom DITA-OT set as the default used DITA-OT in the Oxygen Preferences->DITA page?
Can you maybe debug the "DITA-OT3.x\plugins\com.oxygenxml.shortdesc.imagemap\xhtml.xsl" stylesheet on your side? Add an xsl:message inside the xsl:template, then in the Preferences->"DITA / Logging" page check the "Show console output->Always" radio button, run the transformation and see if in the DITA OT console view at the bottom of the application your message appears...
Regards,
Radu
You seem to be doing all the right things.
I just tested the plugin again with the DITA OT 3.x bundled with Oxygen 21.1 and it works for me. I'm testing with a very basic image map which looks like this:
Code: Select all
<imagemap>
<image href="../../images/Iris_sanguinea.jpg" scale="50"/>
<area>
<shape>rect</shape>
<coords>50, 50, 100, 100</coords>
<xref href="../care.dita"/>
</area>
</imagemap>
Do you produce WebHelp responsive using the same DITA OT to which you made changes? Is that custom DITA-OT set as the default used DITA-OT in the Oxygen Preferences->DITA page?
Can you maybe debug the "DITA-OT3.x\plugins\com.oxygenxml.shortdesc.imagemap\xhtml.xsl" stylesheet on your side? Add an xsl:message inside the xsl:template, then in the Preferences->"DITA / Logging" page check the "Show console output->Always" radio button, run the transformation and see if in the DITA OT console view at the bottom of the application your message appears...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Wed Dec 05, 2018 2:48 pm
Re: Display shortdesc of target topic in imagemap
Hi Radu,
I found that in my Oxygen Preferences->DITA page DITA-OT was selected as built-in. Once I switched it to the actual custom location and ran a transform, all the shortdescs appeared in tooltips.
Thanks again for your help and persistence!
All the best,
Anne
I found that in my Oxygen Preferences->DITA page DITA-OT was selected as built-in. Once I switched it to the actual custom location and ran a transform, all the shortdescs appeared in tooltips.
Thanks again for your help and persistence!
All the best,
Anne
Return to “General XML Questions”
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