summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-10-23 13:37:18 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-10-23 13:47:04 +0200
commit79901116aaa26ad24d7d0d157d3e72bedcfe0834 (patch)
tree293b8a4ac4dfd46892d983e17f4ce6383fe4292e
parentd46f39d85d4fa06c33f91ef1241a17fbd1f4fe8c (diff)
downloadbible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.tar.gz
bible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.tar.bz2
bible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.zip
convert: Parse strong tags
-rwxr-xr-xconvert.sed3
-rw-r--r--convert.xsl12
2 files changed, 13 insertions, 2 deletions
diff --git a/convert.sed b/convert.sed
index 797abb6..bb21341 100755
--- a/convert.sed
+++ b/convert.sed
@@ -23,4 +23,7 @@ s/&lt;\/span&gt;/<\/span>/g
s/\&lt;em\&gt;/<em>/g
s/\&lt;\/em\&gt;/<\/em>/g
+s/\&lt;strong\&gt;/<strong>/g
+s/\&lt;\/strong\&gt;/<\/strong>/g
+
s:.*:<p>&</p>:
diff --git a/convert.xsl b/convert.xsl
index 89f0d42..a2f7d2d 100644
--- a/convert.xsl
+++ b/convert.xsl
@@ -30,6 +30,8 @@
<xsl:template match="text()" mode="copy-with-notes">
<xsl:if test="string-length(normalize-space(.)) > 0">
+ <!-- FIXME: missing space between style tags -->
+ <!--<xsl:if test="string-length(normalize-space(.)) > 0 or (not(parent/child::*[1]=.) and not(parent/child::*[last()]=.))">-->
<xsl:value-of select="." />
</xsl:if>
</xsl:template>
@@ -40,6 +42,12 @@
</style>
</xsl:template>
+ <xsl:template match="strong" mode="copy-with-notes">
+ <style fs="bold">
+ <xsl:value-of select="." />
+ </style>
+ </xsl:template>
+
<xsl:template match="br" mode="copy-with-notes">
<br art="x-nl" />
</xsl:template>
@@ -70,7 +78,7 @@
<xsl:apply-templates select="following-sibling::*[1]" mode="copy-until-next-verse" />
</xsl:template>
<xsl:template name="copy-with-notes">
- <xsl:apply-templates select="text()|span[@class='fussnote']|em|br" mode="copy-with-notes" />
+ <xsl:apply-templates select="text()|span[@class='fussnote']|em|strong|br" mode="copy-with-notes" />
<xsl:call-template name="copy-until-next-verse" />
</xsl:template>
@@ -103,7 +111,7 @@
<xsl:template match="div[@class='annotation']" mode="conv"/>
<xsl:template match="div[@class='lineBreak']" mode="conv"/>
- <xsl:template match="br|em" mode="conv"/>
+ <xsl:template match="br|em|strong" mode="conv"/>
<xsl:template match="p" mode="conv"/>
<xsl:template match="*" mode="conv">