Responsive Webhelp: include bookmap xml:lang value to footer of main page

steinbacherGE
Posts: 10
Joined: Tue Mar 13, 2018 6:07 pm

Responsive Webhelp: include bookmap xml:lang value to footer of main page

Post by steinbacherGE » Fri Jul 26, 2019 9:59 pm

How can I add the bookmap xml:lang value to footer of a Responsive Webhelp main page (index.html)?

I'm working in this file ..\xsl\mainFiles\customFooter.xsl

This value shows up correctly in all of my topic footers, but not the main index.html page.

<xsl:value-of select="document($windows_inputMap)/bookmap/@xml:lang"/>

Any suggestions?

Thanks,

Leroy

alin
Site Admin
Posts: 140
Joined: Thu Dec 24, 2009 11:21 am

Re: Responsive Webhelp: include bookmap xml:lang value to footer of main page

Post by alin » Wed Jul 31, 2019 4:32 pm

Hello,

You can add custom HTML content in the WebHelp Responsive output by inserting it in a well-formed XML file that will be referenced in the transformation (either from an Oxygen Publishing Template or using one of the HTML fragment parameters).
The XML file can use WebHelp macros, which are variables that will be expanded when the content of the HTML fragment file will be copied in the final output.
In your case, you can use the map-xpath macro to retrieve the value of the xml:lang attribute from the map root element.
For example the content of the XML file can look like this:

Code: Select all

<div  xmlns:whc="http://www.oxygenxml.com/webhelp/components">
    Publication Language: <b><whc:macro value="${map-xpath(/*/@*:lang)}"/></b>
</div>
In order to include the above content in your publication footer section you should reference the path of the file using the webhelp.fragment.footer transformation parameter.
You can find more details here: https://www.oxygenxml.com/doc/versions/ ... -html.html

Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply