diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-10-23 13:37:18 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-10-23 13:47:04 +0200 |
commit | 79901116aaa26ad24d7d0d157d3e72bedcfe0834 (patch) | |
tree | 293b8a4ac4dfd46892d983e17f4ce6383fe4292e | |
parent | d46f39d85d4fa06c33f91ef1241a17fbd1f4fe8c (diff) | |
download | bible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.tar.gz bible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.tar.bz2 bible-fetch-79901116aaa26ad24d7d0d157d3e72bedcfe0834.zip |
convert: Parse strong tags
-rwxr-xr-x | convert.sed | 3 | ||||
-rw-r--r-- | convert.xsl | 12 |
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/<\/span>/<\/span>/g s/\<em\>/<em>/g s/\<\/em\>/<\/em>/g +s/\<strong\>/<strong>/g +s/\<\/strong\>/<\/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"> |