Catch remaining elements
diff --git a/xslt/epub2i5.xsl b/xslt/epub2i5.xsl
index c5f5c95..0c92944 100644
--- a/xslt/epub2i5.xsl
+++ b/xslt/epub2i5.xsl
@@ -336,26 +336,25 @@
</head>
</xsl:template>
+ <xsl:template match="xhtml:em">
+ <emph>
+ <xsl:apply-templates/>
+ </emph>
+ </xsl:template>
- <xsl:template match="xhtml:span[@class='italic']">
- <hi rend="italic">
+ <xsl:template match="xhtml:span[matches(@class, '(bold|italic|big| )+')]">
+ <hi rend="{@class}">
<xsl:apply-templates/>
</hi>
</xsl:template>
- <xsl:template match="xhtml:span[@class='bold']">
- <hi rend="bold">
- <xsl:apply-templates/>
- </hi>
- </xsl:template>
-
- <xsl:template match="xhtml:span[@class='sub']">
+ <xsl:template match="xhtml:sub|xhtml:span[@class='sub']">
<hi rend="sub">
<xsl:apply-templates/>
</hi>
</xsl:template>
- <xsl:template match="xhtml:span[@class='sup']">
+ <xsl:template match="xhtml:sup|xhtml:span[@class='sup']">
<hi rend="sup">
<xsl:apply-templates/>
</hi>
@@ -377,6 +376,14 @@
<!-- <gap reason="image"/> -->
</xsl:template>
+ <xsl:template match="xhtml:a">
+ <ref target="{@href}">
+ <xsl:apply-templates />
+ </ref>
+ </xsl:template>
+
+ <xsl:template match="xhtml:br"/>
+
<xsl:template match="xhtml:*">
<xsl:message>
<xsl:text>unhandled element: </xsl:text><xsl:value-of select="concat(name(), ' ', string-join(./@*[normalize-space(.) != '']/concat(name(), ':', ., ' '), '_'))"/>