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

Upload New File

parent 1b1b9ab7
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<!-- Dieses Stylesheet ist Teil von
Philipp Hainhofer: Das Große Stammbuch. Kommentierte digitale Edition eines bedeutenden Album Amicorum aus der Zeit um 1600 [Wolfenbütteler Digitale Editionen, Nr. 6], herausgegeben, transkribiert, übersetzt und kommentiert von Sabine Jagodzinski, Wolfenbüttel: Herzog August Bibliothek 2024, https://stammbuch.hab.de/stammbuch
und wurde erstellt von Martin de la Iglesia (iglesia@hab.de).
Es erzeugt für jeden Eintrag in der TEI/XML-Datei des Personenregisters jeweils eine XHTML-Datei. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="#all" version="2.0" xpath-default-namespace="http://www.tei-c.org/ns/1.0">
<xsl:output method="xhtml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/>
<xsl:variable name="psnpfad"></xsl:variable>
<xsl:variable name="outputpfad">personen/</xsl:variable>
<xsl:variable name="psnclasspath">../klassifikation-zum-personenregister</xsl:variable>
<xsl:variable name="biblpfad">../../informationen-zur-edition/bibliographie/</xsl:variable>
<xsl:variable name="stammbuchpfad">stammbuch#</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="//person"/>
</xsl:template>
<xsl:template match="person">
<xsl:result-document href="{$outputpfad}{@xml:id}.xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="publisher" content="Herzog August Bibliothek Wolfenbüttel"/>
<link rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/de/"/>
<title><xsl:choose>
<xsl:when test="persName[@type='preferred']/term/forename and persName[@type='preferred']/term/surname ">
<xsl:value-of select="persName[@type='preferred']/term/forename"/><xsl:text> </xsl:text><xsl:value-of select="persName[@type='preferred']/term/surname"/>
</xsl:when>
<xsl:when test="persName[@type='preferred']/term/name">
<xsl:value-of select="persName[@type='preferred']/term/name"/>
</xsl:when>
</xsl:choose></title>
</head>
<body>
<h1 class="prefname"><xsl:choose>
<xsl:when test="persName[@type='preferred']/term/forename and persName[@type='preferred']/term/surname ">
<xsl:value-of select="persName[@type='preferred']/term/forename"/><xsl:text> </xsl:text><xsl:value-of select="persName[@type='preferred']/term/surname"/>
</xsl:when>
<xsl:when test="persName[@type='preferred']/term/name">
<xsl:value-of select="persName[@type='preferred']/term/name"/>
</xsl:when>
</xsl:choose></h1>
<xsl:if test="birth/@when-iso or birth/@notBefore-iso or death/@when-iso or death/@notBefore-iso">
<div class="birthdeath">
<p>
<xsl:if test="birth/@*">
<xsl:text>* </xsl:text>
</xsl:if>
<xsl:if test="birth/@precision eq 'low' and birth/@when-iso">
<xsl:text>ca. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="birth/@when-iso">
<xsl:choose>
<xsl:when test="substring(birth/@when-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(birth/@when-iso, '-')) + 1"/>
<xsl:text> v. Chr.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(birth/@when-iso)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="birth/@notBefore-iso and birth/@notAfter-iso">
<xsl:text>zwischen </xsl:text>
<xsl:if test="birth/@precision eq 'low'">
<xsl:text>ca. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="substring(birth/@notBefore-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(birth/@notBefore-iso, '-')) + 1"/>
<xsl:if test="substring(birth/@notAfter-iso, 1, 1) != '-'">
<xsl:text> v. Chr.</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(birth/@notBefore-iso)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> und </xsl:text>
<xsl:choose>
<xsl:when test="substring(birth/@notAfter-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(birth/@notAfter-iso, '-')) + 1"/>
<xsl:text> v. Chr.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(birth/@notAfter-iso)"/>
<xsl:if test="substring(birth/@notBefore-iso, 1, 1) = '-'">
<xsl:text> n. Chr.</xsl:text>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
<xsl:if test="birth/@*">
<br/>
</xsl:if>
<xsl:if test="death/@*">
<xsl:text></xsl:text>
</xsl:if>
<xsl:if test="death/@precision eq 'low' and death/@when-iso">
<xsl:text>ca. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="death/@when-iso">
<xsl:choose>
<xsl:when test="substring(death/@when-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(death/@when-iso, '-')) + 1"/>
<xsl:text> v. Chr.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(death/@when-iso)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="death/@notBefore-iso and death/@notAfter-iso">
<xsl:text>zwischen </xsl:text>
<xsl:if test="death/@precision eq 'low'">
<xsl:text>ca. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="substring(death/@notBefore-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(death/@notBefore-iso, '-')) + 1"/>
<xsl:if test="substring(death/@notAfter-iso, 1, 1) != '-'">
<xsl:text> v. Chr.</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(death/@notBefore-iso)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> und </xsl:text>
<xsl:choose>
<xsl:when test="substring(death/@notAfter-iso, 1, 1) = '-'">
<xsl:value-of select="number(substring-after(death/@notAfter-iso, '-')) + 1"/>
<xsl:text> v. Chr.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number(death/@notAfter-iso)"/>
<xsl:if test="substring(death/@notBefore-iso, 1, 1) = '-'">
<xsl:text> n. Chr.</xsl:text>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</p>
</div>
</xsl:if>
<xsl:if test="floruit">
<div class="floruit">
<p>
<span>Wirkungsdaten: </span>
<xsl:value-of select="floruit"/>
</p>
</div>
</xsl:if>
<xsl:if test="persName[@type = 'variant']">
<div class="variantcontainer">
<xsl:choose>
<xsl:when test="count(persName[@type = 'variant']) > 1">
<h2 class="variantnameprefix">Andere Namen</h2>
<ul class="variantnames">
<xsl:for-each select="persName[@type = 'variant']">
<li>
<xsl:choose>
<xsl:when test="term/forename and term/surname">
<xsl:value-of select="term/forename"/><xsl:text> </xsl:text><xsl:value-of select="term/surname"/>
</xsl:when>
<xsl:when test="term/name">
<xsl:value-of select="term/name"/>
</xsl:when>
</xsl:choose>
</li>
</xsl:for-each>
</ul>
</xsl:when>
<xsl:otherwise>
<h2 class="variantnameprefix">Anderer Name</h2>
<p class="variantname"><xsl:choose>
<xsl:when test="persName[@type='variant']/term/forename and persName[@type = 'variant']/term/surname">
<xsl:value-of select="persName[@type = 'variant']/term/forename"/><xsl:text> </xsl:text><xsl:value-of select="persName[@type = 'variant']/term/surname"/>
</xsl:when>
<xsl:when test="persName[@type = 'variant']/term/name">
<xsl:value-of select="persName[@type = 'variant']/term/name"/>
</xsl:when>
</xsl:choose></p>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
<xsl:if test="ptr[@type='gnd']">
<div class="gndcontainer">
<h2 class="gndhead">Gemeinsame Normdatei (GND)</h2>
<p>
<a>
<xsl:attribute name="href" select="ptr[@type='gnd']/@target"/>
<xsl:value-of select="substring-after(ptr[@type='gnd'][1]/@target, 'd-nb.info/gnd/')"/>
</a>
</p>
</div>
</xsl:if>
<xsl:if test="occupation">
<div class="categorycontainer">
<h2 class="catprefix">Kategorien</h2>
<ul>
<xsl:for-each select="occupation">
<!--<xsl:variable name="occupationcode" select="replace(replace(replace(lower-case(.), 'ä', 'ae'), ' ', '_'), 'ü', 'ue')"/>-->
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($psnclasspath,@code)"/>
</xsl:attribute>
<xsl:value-of select="//category[@xml:id eq substring-after(current()/@code, '#')]/catDesc"/>
</a>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if>
<xsl:if test="faith">
<div class="faithcontainer">
<h2>Konfession</h2>
<p><span><xsl:value-of select="faith"/></span></p>
</div>
</xsl:if>
<xsl:if test="note[@type = 'weitere_Angaben']">
<div class="bio">
<xsl:choose>
<xsl:when test="note[@type = 'weitere_Angaben']/p">
<h2 class="biohead">Weitere Angaben</h2>
<xsl:apply-templates select="note[@type = 'weitere_Angaben']"/>
</xsl:when>
<xsl:otherwise>
<h2 class="bioprefix">Weitere Angaben</h2>
<p>
<xsl:apply-templates select="note[@type = 'weitere_Angaben']"/>
</p>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
<!--<xsl:if test="noteGrp[@type='Personenverhältnis']/note[@type='Hainhofer']/*">
<div class="Personenverhältnis_Hainhofer">
<h2>Personenverhältnis Inskribent - Hainhofer</h2>
<xsl:apply-templates select="noteGrp[@type='Personenverhältnis']/note[@type='Hainhofer']"/>
</div>
</xsl:if>
<xsl:if test="noteGrp[@type='Personenverhältnis']/note[@type='Künstler']/*">
<div class="Personenverhältnis_Künstler">
<h2>Personenverhältnis Inskribent - Künstler</h2>
<xsl:apply-templates select="noteGrp[@type='Personenverhältnis']/note[@type='Künstler']"/>
</div>
</xsl:if>-->
<xsl:if test="noteGrp[@type='Personenverhältnis']/note[@type='andere_Inskribenten']/*">
<div class="Personenverhältnis_andere_Inskribenten">
<h2>Verhältnis zu anderen Inskribent*innen</h2>
<p><xsl:apply-templates select="noteGrp[@type='Personenverhältnis']/note[@type='andere_Inskribenten']"/></p>
</div>
</xsl:if>
<xsl:if test="ptr[@type='ph-reisen']">
<div class="ph-reisencontainer">
<h2 class="ph-reisenhead">Registereintrag in der Reiseberichte-Edition</h2>
<p>
<a>
<xsl:attribute name="href" select="ptr[@type='ph-reisen']/@target"/>
<xsl:value-of select="ptr[@type='ph-reisen']/@target"/>
</a>
</p>
</div>
</xsl:if>
<xsl:if test="listBibl">
<div class="litcontainer">
<h2>Literatur</h2>
<ul>
<xsl:for-each select="listBibl/bibl">
<li>
<a>
<xsl:variable name="biblid" select="substring-after(ptr/@target, ':')"/>
<xsl:attribute name="href">
<xsl:value-of select="concat($biblpfad, $biblid)"/>
</xsl:attribute>
<xsl:value-of select="document('stammb_bibl.xml')//bibl[@xml:id eq $biblid]/seg"/>
</a>
<xsl:choose>
<xsl:when test="citedRange[not(@target)]">
<xsl:text>, </xsl:text>
<xsl:value-of select="citedRange"/>
</xsl:when>
<xsl:when test="citedRange[@target]">
<xsl:text>, </xsl:text>
<a>
<xsl:attribute name="href" select="citedRange/@target"/>
<xsl:value-of select="citedRange"/>
</a>
</xsl:when>
</xsl:choose>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if>
<div class="occurrencescontainer">
<h2>Vorkommen im Text</h2>
<ul>
<xsl:for-each select="document('stammbuch.xml')//rs[substring-after(@ref,'psn:') eq current()/@xml:id]">
<li><a><xsl:attribute name="href" select="concat($stammbuchpfad,./ancestor::div[@type='Eintrag']/@xml:id)"/><xsl:choose>
<xsl:when test="matches(./ancestor::div[@type='Eintrag']/div[@type='Seite']/p, '^[A-Z]')"/>
<xsl:otherwise>S. </xsl:otherwise>
</xsl:choose><xsl:value-of select="./ancestor::div[@type='Eintrag']/div[@type='Seite']/p"/></a><xsl:choose>
<xsl:when test="ancestor::div[@type='Name']">
<xsl:text> (Inskribent*in)</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> (</xsl:text><xsl:value-of select="replace(./ancestor::div[1]/@type,'_',' ')"/><xsl:text>)</xsl:text>
</xsl:otherwise>
</xsl:choose></li>
</xsl:for-each>
</ul>
</div>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="rs">
<a xmlns="http://www.w3.org/1999/xhtml"><xsl:attribute name="href" select="concat($psnpfad,substring-after(@ref,'#'))"/><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="bibl/ref">
<a class="Bibliographielink" xmlns="http://www.w3.org/1999/xhtml"><xsl:attribute name="href" select="concat($biblpfad,substring-after(@target,'lit:'))"/><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="*[not(local-name() eq 'bibl')]/ref[starts-with(@target,'stammbuch.xml#')]">
<a class="Stammbuchlink" xmlns="http://www.w3.org/1999/xhtml"><xsl:attribute name="href" select="concat($stammbuchpfad,substring-after(@target,'stammbuch.xml#'))"/><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="*[not(local-name() eq 'bibl')]/ref[starts-with(@target,'http')]">
<a class="Weblink" xmlns="http://www.w3.org/1999/xhtml"><xsl:attribute name="href" select="@target"/><xsl:value-of select="."/></a>
</xsl:template>
</xsl:stylesheet>
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