Adding javascript just before closing body tag

Here should go questions about transforming XML with XSLT and FOP.
kmank
Posts: 81

Adding javascript just before closing body tag

Tue Nov 24, 2015 11:20 pm

Hi,
Using O17.1, I'm trying to add a script just before the closing body tag of all webhelp topics. Searching the forum, I cannot locate the file in which to place the code.
Any help is greatly appreciated!
bogdan_cercelaru
Posts: 203

Re: Adding javascript just before closing body tag

Wed Nov 25, 2015 12:47 pm

Hello,

I've logged your request on our issue tracking tool to be analyzed.
Until it is implemented you can use the webhelp.footer.file parameter as a workaround.
The content of the file referred by this parameter should look like:

Code: Select all

<script type="text/javascript">
    /* Your code goes here */
</script>


Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
kmank
Posts: 81

Re: Adding javascript just before closing body tag

Wed Nov 25, 2015 7:36 pm

thank you Bogdan - this certainly could be a resolution. However, this morning I located where it needed to be:

dita2webhelp.xsl needed to be modified in <xsl:template match="/|node()|@*" mode="gen-user-footer"> .
Simply placing the javascript code before </xsl:template> allowed the script to appear immediately before the output </body> tag.

This allows for the end result without needing to deliver another file to the authors.

Thanks again for your direction.

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 2 guests