diff options
-rwxr-xr-x | concat.sh | 12 | ||||
-rw-r--r-- | convert.xsl | 28 |
2 files changed, 20 insertions, 20 deletions
@@ -4,15 +4,15 @@ translation=$1 title="$2" echo '<?xml version="1.0" encoding="UTF-8"?>' -printf '<xmlbible type="x-bible" biblename="%s" status="v">\n' "$title" -echo '<information>' +printf '<XMLBIBLE type="x-bible" biblename="%s" status="v">\n' "$title" +echo '<INFORMATION>' echo "<title>${title}</title>" echo '<format>Zefania XML Bible Markup Language</format>' -echo '</information>' +echo '</INFORMATION>' j=1 cat ${translation}/book-list | while read buch do - echo "<biblebook bname=\"$buch\" bnumber=\"$j\">" + echo "<BIBLEBOOK bname=\"$buch\" bnumber=\"$j\">" buchdir=$(echo "$buch" | sed "y/äöü /aou_/") i=1 @@ -23,6 +23,6 @@ do done j=$((j+1)) - echo "</biblebook>" + echo "</BIBLEBOOK>" done -echo '</xmlbible>' +echo '</XMLBIBLE>' diff --git a/convert.xsl b/convert.xsl index a2f7d2d..3cdb1c6 100644 --- a/convert.xsl +++ b/convert.xsl @@ -2,7 +2,7 @@ <xsl:output method="xml" indent="yes" encoding="UTF-8" media-type="text/xml"/> <xsl:template match="h2" mode="conv"> - <caption> + <CAPTION> <xsl:attribute name="vref"> <xsl:choose> <xsl:when test="string-length(following::span[@class='verse']) > 0"> @@ -16,16 +16,16 @@ <!-- FIXME: e.g. Psalm 145 has footnotes in caption, with incorrect reference --> <xsl:value-of select="text()" /> - </caption> + </CAPTION> </xsl:template> <xsl:template match="span[@class='fussnote']" mode="copy-with-notes"> - <note n1="x-studynote"> + <NOTE n1="x-studynote"> <xsl:variable name="id"> <xsl:value-of select="@data-param"/> </xsl:variable> <xsl:apply-templates select="//div[@id=$id]/div/p" mode="copy-with-notes"/> - </note> + </NOTE> </xsl:template> <xsl:template match="text()" mode="copy-with-notes"> @@ -37,22 +37,22 @@ </xsl:template> <xsl:template match="em" mode="copy-with-notes"> - <style fs="emphasis"> + <STYLE fs="emphasis"> <xsl:value-of select="." /> - </style> + </STYLE> </xsl:template> <xsl:template match="strong" mode="copy-with-notes"> - <style fs="bold"> + <STYLE fs="bold"> <xsl:value-of select="." /> - </style> + </STYLE> </xsl:template> <xsl:template match="br" mode="copy-with-notes"> - <br art="x-nl" /> + <BR art="x-nl" /> </xsl:template> <xsl:template match="div[@class='lineBreak']" mode="copy-with-notes"> - <br art="x-nl" /> + <BR art="x-nl" /> </xsl:template> <!-- @@ -99,14 +99,14 @@ </xsl:template> <xsl:template match="p[span/@class='verse']" mode="conv"> - <vers> + <VERS> <xsl:attribute name="vnumber"> <xsl:value-of select="span[@class='verse']"/> </xsl:attribute> <xsl:call-template name="copy-with-notes" /> <!--<xsl:apply-templates select="*" mode="error" />--> - </vers> + </VERS> </xsl:template> <xsl:template match="div[@class='annotation']" mode="conv"/> @@ -125,8 +125,8 @@ </xsl:template> <xsl:template match="/"> - <chapter cnumber="{//span[@class='chapter' and text()!='0']}"> + <CHAPTER cnumber="{//span[@class='chapter' and text()!='0']}"> <xsl:apply-templates select="//div[@class='markdown']/*" mode="conv"/> - </chapter> + </CHAPTER> </xsl:template> </xsl:stylesheet> |