Understanding keep rules
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Understanding keep rules
I am having some trouble understanding how to keep certain things together when generating a PDF. For example, in my document, the "Hardware Installation" is the fourth topic in my map. It starts out like this:
However, in my PDF output, it displays as:
Hardware Installation
Warning: These instructions should only be used by:
--- Page Break ---
* Customers who are installing the product near an outlet
* Professional electricians who are installing the product to a hardwired electrical connection
How can I modify my custom dita plugin files to make these stay together?
Code: Select all
<taskbody>
<prereq id="prereq_k3t_gvb_cdb">
<note type="warning"><b>These instructions should only be used by:</b><ul
id="ul_q34_jxb_cdb">
<li>Customers who are installing the product near an outlet</li>
<li>Professional electricians who are installing the product to a hardwired
electrical connection</li>
</ul></note>
</prereq>
Hardware Installation
Warning: These instructions should only be used by:
--- Page Break ---
* Customers who are installing the product near an outlet
* Professional electricians who are installing the product to a hardwired electrical connection
How can I modify my custom dita plugin files to make these stay together?
-
- Posts: 9444
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Understanding keep rules
Hi,
The default XSL template which matches <b> is located in OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.pdf2\xsl\fo\hi-domain.xsl and looks like this:
maybe in your PDF customization stylesheets you could override it like this:
Regards,
Radu
The default XSL template which matches <b> is located in OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.pdf2\xsl\fo\hi-domain.xsl and looks like this:
Code: Select all
<xsl:template match="*[contains(@class,' hi-d/b ')]">
<fo:inline xsl:use-attribute-sets="b">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
Code: Select all
<xsl:template match="*[contains(@class,' topic/note ')]/*[contains(@class,' hi-d/b ')][count(preceding-sibling::*) = 0]">
<fo:inline xsl:use-attribute-sets="b" keep-with-next="always">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.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)
- ↳ 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