Select specific elements by context
Select a specific instance of an element based on its location within the structure.
Say you want to ensure that pages never break leaving a single list item stranded at the bottom of the page (a widow). You want to make sure that there are always at least two list items together at the bottom of a page, and if there is not sufficient space, the entire list flows to the following page.
To do this, you either need two attribute sets—one for the first
<li> in an
<sl>—and another for the remaining
or you need to conditionalize the existing attribute sets.
- If you do not already have a lists-attr.xsl file in your plugin, create it.
- In DITA-OT/plugins/org.dita.pdf2/cfg/fo/attrs/ ...