The rules matching inline elements, for example the one matching "rtf:inline[@italics][@bold]" put the element's content into an emphasis element if it's in italics.
However, they are matched for each element that has these attributes set, even if the attributes' values are "false", in which case the rule produces nothing, introducing empty paragraphs in some of my documents (the xml source of which _was_ created by rtf2xml 1.32).
These rules should get rewritten to either not get chosen or to continue default processing if the conditions for <emphasis> are not met, e.g. my fix is:
<xsl:template match = "rtf:inline[@italics][@bold]" priority="6">
<xsl:when test = "@italics = 'true'">
<emphasis role = "italics-bold">
<xsl:when test = "../../@italics='true'">
<emphasis role = "paragraph-emphasis-off">
<!-- allow further processing -->
Log in to post a comment.