WEB Help customization problem - ${webhelp.fragment.after.body}
Posted: Tue Oct 04, 2016 6:53 am
Hi,
I have a request from users to customize WEB help to add back to top button in all of the generated HTML files. I examined how to solve this effectively seeing the WEB Help stylesheet.
In the examination process I found the ant parameter ${webhelp.fragment.after.body}. It seems very useful because I can directly insert the intended HTML fragment into the target HTML.
plugin_commons.xml
But the relevant XSLT stylesheet has following codes:
commonComponentsExpander.xsl line 651 or near
This code copies body element to the target HTML. As a result nested body/body element are generated. It is meaningless. The child nodes of the body should be inserted before the end of the body element.
So I think this portion should be following:
Could you kindly give me your opinion?
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
I have a request from users to customize WEB help to add back to top button in all of the generated HTML files. I examined how to solve this effectively seeing the WEB Help stylesheet.
In the examination process I found the ant parameter ${webhelp.fragment.after.body}. It seems very useful because I can directly insert the intended HTML fragment into the target HTML.
plugin_commons.xml
Code: Select all
<param name="webhelp.fragment.after.body"
desc="Specifies the path to the HTML file that contains the content to be included at the end of the html 'body' element of the WebHelp pages. It can also be an XML fragment."
type="file">
<val default="true"></val>
</param>
commonComponentsExpander.xsl line 651 or near
Code: Select all
<xsl:variable name="toIncludeSequence">
<xsl:choose>
<xsl:when test="$toIncludeDoc/*:html/*:body">
<xsl:copy-of select="$toIncludeDoc/*:html/*:body[1]"/>
</xsl:when>
<xsl:when test="$toIncludeDoc//*:body">
<xsl:copy-of select="$toIncludeDoc//*:body[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$toIncludeDoc"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
So I think this portion should be following:
Code: Select all
<xsl:variable name="toIncludeSequence">
<xsl:choose>
<xsl:when test="$toIncludeDoc/*:html/*:body">
<xsl:copy-of select="$toIncludeDoc/*:html/*:body[1]/node()"/>
</xsl:when>
<xsl:when test="$toIncludeDoc//*:body">
<xsl:copy-of select="$toIncludeDoc//*:body[1]/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$toIncludeDoc"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/