Skip to content

Commit

Permalink
handle features under t-style, translate to proper CSS classes, also …
Browse files Browse the repository at this point in the history
…handle empty classes #26
  • Loading branch information
proycon committed Jan 27, 2021
1 parent 11b1408 commit 9944c87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion foliatools/folia2html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,14 @@
<em><xsl:apply-templates /></em>
</xsl:when>
<xsl:otherwise>
<span class="style_{@class}"><xsl:apply-templates /></span>
<span><xsl:attribute name="class">style_<xsl:choose><xsl:when test="@class"><xsl:value-of select="@class" /></xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose><xsl:for-each select="folia:feat"><xsl:text> style_</xsl:text><xsl:value-of select="@subset" />_<xsl:value-of select="translate(normalize-space(@class), ' .{}[]#+=\@/,', '')" /></xsl:for-each></xsl:attribute><xsl:apply-templates /></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>




<xsl:template match="folia:t-str">
<xsl:choose>
<xsl:when test="@xlink:href">
Expand Down

0 comments on commit 9944c87

Please sign in to comment.