How to delete the colon after Optional tag
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 35
- Joined: Thu Aug 15, 2019 5:31 pm
How to delete the colon after Optional tag
We don't want to have colon after "Optional" tag, how can we get this done?
The xml is as below:
When transforming the doc to HTML5 format, we can see "Optional: " in HTML file. How can we make this as "Optional" without the colon?
Thanks a lot.
The xml is as below:
Code: Select all
<step importance="optional" >
<cmd>test</cmd>
<info>test</info>
</step>
Thanks a lot.
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: How to delete the colon after Optional tag
Hi,
Unfortunately, there is no easy out of the box way to remove the colon after the "Optional" tag. You can achieve this by developing a customization using XSLT extension points (this requires XSLT knowledge):
How to Use XSLT Extension Points from a Publishing Template
You can try to add and XSLT extension point on com.oxygenxml.webhelp.xsl.dita2webhelp:
XSLT-Import Extension Points
As a hint. using XSLT extension points you should override the standard functionality that inserts the colon from [DITA_OT_DIR]\plugins\org.dita.html5\xsl\task.xsl:
I hope this helps.
Regards,
Ionela
Unfortunately, there is no easy out of the box way to remove the colon after the "Optional" tag. You can achieve this by developing a customization using XSLT extension points (this requires XSLT knowledge):
How to Use XSLT Extension Points from a Publishing Template
You can try to add and XSLT extension point on com.oxygenxml.webhelp.xsl.dita2webhelp:
XSLT-Import Extension Points
As a hint. using XSLT extension points you should override the standard functionality that inserts the colon from [DITA_OT_DIR]\plugins\org.dita.html5\xsl\task.xsl:
Code: Select all
<xsl:template match="*" mode="add-step-importance-flag">
<xsl:choose>
<xsl:when test="@importance='optional'">
<strong>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'Optional'"/>
</xsl:call-template>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'ColonSymbol'"/>
</xsl:call-template><xsl:text> </xsl:text>
</strong>
</xsl:when>
<xsl:when test="@importance='required'">
<strong>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'Required'"/>
</xsl:call-template>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'ColonSymbol'"/>
</xsl:call-template><xsl:text> </xsl:text>
</strong>
</xsl:when>
</xsl:choose>
</xsl:template>
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
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)
- ↳ 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