Skip to content
Snippets Groups Projects
Commit 9a3d97cd authored by Martin de la Iglesia's avatar Martin de la Iglesia
Browse files

Add new file

parent b3c3c3df
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xs xhtml tei" version="2.0">
<!-- Dieses Stylesheet erzeugt aus den TEI/XML-Dateien aller Reiseberichte ein Bibelstellenregister, sofern die Bibelstellen entsprechend codiert sind. Bei VPN-Zugriff muss der Pfad angepasst werden (siehe unten). Die resultierende Datei "bibelstellen.xhtml" muss anschließend in WordPress hochgeladen werden.
Das Stylesheet basiert auf XSL-Code von Maximilian Görmar.
Siehe auch die HAB-WDB-Dokumentation zu biblischen Zitaten: http://diglib.hab.de/rules/documentation/quoting_biblical.xml -->
<xsl:variable name="transcrpath">https://hainhofer.hab.de/reiseberichte/</xsl:variable>
<xsl:variable name="cRef-biblical-start">https://www.biblija.net/biblija.cgi?m=</xsl:variable>
<xsl:variable name="cRef-biblical-end">&amp;id12=1&amp;id8=1&amp;set=1&amp;l=en</xsl:variable>
<xsl:variable name="rules" select="'&lt; Gn &lt; Ex &lt; Lv &lt; Nm &lt; Dt &lt; Ios &lt; Idc &lt; Rt &lt; 1Sm &lt; 2Sm &lt; 3Rg &lt; 4Rg &lt; 1Par &lt; 2Par &lt; 1Esr &lt; 2Esr &lt; Tb &lt; Idt &lt; Est &lt; Iob &lt; Ps &lt; Prv &lt; Ecl &lt; Ct &lt; Sap &lt; Sir &lt; Is &lt; Ier &lt; Lam &lt; Bar &lt; Ez &lt; Dn &lt; Os &lt; Ioel &lt; Am &lt; Abd &lt; Ion &lt; Mi &lt; Na &lt; Hab &lt; So &lt; Agg &lt; Za &lt; Mal &lt; 1Mcc &lt; 2Mcc &lt; Mt &lt; Mc &lt; Lc &lt; Io &lt; Act &lt; Rm &lt; 1Cor &lt; 2Cor &lt; Gal &lt; Eph &lt; Phil &lt; Col &lt; 1Th &lt; 2Th &lt; 1Tim &lt; 2Tim &lt; Tit &lt; Phlm &lt; Hbr &lt; Iac &lt; 1Pt &lt; 2Pt &lt; 1Io &lt; 2Io &lt; 3Io &lt; Iud &lt; Apc &lt; OrMan &lt; 3Esr &lt; 4Esr &lt; Ps151 &lt; Laod'"/>
<xsl:template match="/">
<xsl:result-document href="../HTML-Dateien/bibelstellen.xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Register der Bibelstellen</title>
</head>
<body xmlns="http://www.w3.org/1999/xhtml">
<table>
<xsl:for-each select="collection('file:////FPSERVER/handschriften/Projekte/Hainhofer/Edition/XML-Dateien/?select=*.xml;recurse=no')//tei:ref[@type='biblical']/@cRef"> <!-- via VPN: 'file:////fpserver.hab.de/handschriften/Projekte/Hainhofer/Edition/XML-Dateien/?select=*.xml;recurse=no' -->
<!--Sortierung nach Reihenfolge der Bibelbücher-->
<xsl:sort collation="http://saxon.sf.net/collation?rules={encode-for-uri($rules)}">
<xsl:choose>
<xsl:when test="starts-with(., '1') or starts-with(., '2') or starts-with(., '3') or starts-with(., '4')">
<xsl:value-of select="translate(substring-before(.,'_'),'.','')"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="contains(.,'_')">
<xsl:value-of select="translate(substring-before(., '_'), '_', '')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:sort>
<!--Anschließend alphanummerische Sortierung der Stellen-->
<xsl:sort lang="de" collation="http://saxon.sf.net/collation?lang=de;alphanumeric=yes">
<xsl:choose>
<xsl:when test="starts-with(., '1') or starts-with(., '2') or starts-with(., '3') or starts-with(., '4')">
<xsl:value-of select="substring-after(substring-after(., '_'),'_')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(substring-after(., '_'), '_', '')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:sort>
<tr>
<td>
<a xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="href">
<xsl:value-of select="$cRef-biblical-start"/>
<xsl:value-of select="translate(.,' ._,','+++:')"/>
<xsl:value-of select="$cRef-biblical-end"/>
</xsl:attribute>
<xsl:value-of select="translate(.,'_.',' ')"/>
</a>
</td>
<td>
<a>
<xsl:variable name="fol" select="preceding::tei:pb[1]/@n"/>
<xsl:attribute name="href">
<xsl:value-of select="concat($transcrpath, replace(replace(replace(replace(replace(lower-case(//tei:title),'[\s|/]',''),'ü','ue'),'ä','ae'),'ö','oe'),'–','_'), '#fol', substring-after($fol,'. '))"/>
</xsl:attribute>
<xsl:value-of select="//tei:title"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="$fol"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment