WEB Help customization problem - ${webhelp.fragment.after.body}
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
WEB Help customization problem - ${webhelp.fragment.after.body}
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/
--------------------------------------------------*/
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: WEB Help customization problem - ${webhelp.fragment.after.body}
Post by radu_pisoi »
Hi,
Thank you for reporting this issue.
Yes, you are right. You have discovered an issue in the XSLT code used to inject external code in the WebHelp output. This problem was already solved in our development code and a fix will be included in the next oXygen version.
Thank you for reporting this issue.
Yes, you are right. You have discovered an issue in the XSLT code used to inject external code in the WebHelp output. This problem was already solved in our development code and a fix will be included in the next oXygen version.
Meanwhile, the single solution that you have is to modify the WebHelp stylesheets because latest released WebHelp does not support extensions to override the XSLT code. The next WebHelp version will include an extension mechanism allowing you to override XSLT stylesheets too.Could you kindly give me your opinion?
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Re: WEB Help customization problem - ${webhelp.fragment.after.body}
Hi Radu,
Thank you for your quick reply.
Regards,
Thank you for your quick reply.
It's great! I will wait for the next version.The next WebHelp version will include an extension mechanism allowing you to override XSLT stylesheets too.
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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