Skip to content

Commit

Permalink
do not produce a semivolon-only attribute
Browse files Browse the repository at this point in the history
Cf. #29
  • Loading branch information
dariok committed Apr 16, 2019
1 parent c7efe97 commit 2db4dd1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t0.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@
<xsl:template match="w:p">
<p>
<xsl:attribute name="style">
<xsl:apply-templates select="w:pPr/w:pStyle/@w:val || '; '" />
<xsl:apply-templates select="w:pPr/w:pStyle/@w:val" />
<xsl:apply-templates select="w:pPr/w:rPr/*" />
</xsl:attribute>
<xsl:apply-templates select="w:r | w:hyperlink" />
</p>
</xsl:template>
<xsl:template match="w:pPr/w:pStyle/@w:val">

<xsl:value-of select="."/>
<xsl:if test="parent::w:pStyle/following-sibling::w:rPr">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:template>

<xsl:template match="w:r[w:t or w:sym]">
Expand Down

0 comments on commit 2db4dd1

Please sign in to comment.