XSL override dita2html5.xsl
Having trouble installing Oxygen XML WebHelp? Got a bug to report? Post it all here.
-
TopSolid
- Posts: 13
- Joined: Tue Jun 27, 2023 11:00 am
XSL override dita2html5.xsl
Hi!
AFAIK, when transforming from DITA to WebHelp, the 2 first steps are:
https://www.oxygenxml.com/doc/versions/ ... uyr_b1y_bx
I have in my dita source
I want final result in HTML5
But the first step dita2html5 that generates <area href="..." shape="rect"> looses my class and next step dita2webhelp is too late.
So, is there a way to override dita2html5 endpoint inside an opt with WebHelp engine? Example:
Thanks for help
AFAIK, when transforming from DITA to WebHelp, the 2 first steps are:
- dita2html5 = generic engine DITA-OT
- dita2webhelp = UI Oxygen
https://www.oxygenxml.com/doc/versions/ ... uyr_b1y_bx
I have in my dita source
Code: Select all
<area>
<xref outputclass="popup-link"/>
</area>Code: Select all
<area href="..." shape="rect" class="popup-link">So, is there a way to override dita2html5 endpoint inside an opt with WebHelp engine? Example:
Code: Select all
<xslt>
<extension file="resources/xsl/imagemap-override.xsl" id="com.oxygenxml.webhelp.xsl.dita2webhelp"/>
<extension file="resources/xsl/imagemap-override.xsl" id="com.oxygenxml.webhelp.xsl.dita2html5"/>
<extension file="resources/xsl/imagemap-override.xsl" id="org.dita.html5.xsl.dita2html5"/>
</xslt>
-
julien_lacour
- Posts: 818
- Joined: Wed Oct 16, 2019 3:47 pm
Re: XSL override dita2html5.xsl
Post by julien_lacour »
Hello,
Not exactly. As you correctly identified, the main processing step is dita2webhelp, and can be extended using the com.oxygenxml.webhelp.xsl.dita2webhelp extension point.
WebHelp Responsive pipeline leverages parts of the standard DITA-OT HTML5 plugin, and those processing stages can also be customized or overridden through the same extension point, so you can perfectly declare:
And add the following template in imagemap-override.xsl:
And you will get <area class="popup-link" href="..." shape="rect"> in the output.
Regards,
Julien
Not exactly. As you correctly identified, the main processing step is dita2webhelp, and can be extended using the com.oxygenxml.webhelp.xsl.dita2webhelp extension point.
WebHelp Responsive pipeline leverages parts of the standard DITA-OT HTML5 plugin, and those processing stages can also be customized or overridden through the same extension point, so you can perfectly declare:
Code: Select all
<xslt>
<extension file="resources/xsl/imagemap-override.xsl" id="com.oxygenxml.webhelp.xsl.dita2webhelp"/>
</xslt>
Code: Select all
<!-- Copied from org.dita.html5/xsl/ut-d.xsl -->
<xsl:template match="*[contains(@class, ' topic/xref ')]" mode="imagemap-xref">
<xsl:attribute name="href"><xsl:call-template name="href"/></xsl:attribute>
<xsl:if test="@outputclass">
<xsl:attribute name="class" select="@outputclass"/>
</xsl:if>
<xsl:if test="@scope='external' or @type='external' or ((@format='PDF' or @format='pdf') and not(@scope='local'))">
<xsl:apply-templates select="." mode="external-link"/>
</xsl:if>
</xsl:template>
Regards,
Julien
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