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

Upload New File

parent 01435963
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 eine XHTML-Liste aus den Schlagwörtern in der TEI/XML-Datei des Stammbuchs. -->
<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="stammbuchpfad">../stammbuch#</xsl:variable>
<xsl:template match="/">
<xsl:result-document href="stammb_sw.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>Schlagwortregister zum Großen Stammbuch Philipp Hainhofers</title>
</head>
<body>
<ul>
<xsl:apply-templates select="//div[@type='Verschlagwortung']//term">
<xsl:sort select="replace(.,'^\W','')" lang="de"/>
</xsl:apply-templates>
</ul>
</body>
</html>
</xsl:result-document>
<xsl:result-document href="stammb_ikon.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>Ikonographisches Register zum Großen Stammbuch Philipp Hainhofers</title>
</head>
<body>
<ul>
<xsl:apply-templates select="//index/term">
<xsl:sort select="replace(.,'^\W','')" lang="de"/>
</xsl:apply-templates>
</ul>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="div[@type='Verschlagwortung']//term">
<xsl:if test="not(preceding::term[@ref eq current()/@ref][parent::item]) and matches(@ref,'^http')">
<!-- <xsl:if test="not(preceding::term[@ref eq current()/@ref]) and matches(@ref,'^https://d-nb\.info/gnd/([0-9]|X|-)+')"> -->
<li xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id" select="replace(replace(translate(replace(replace(replace(replace(replace(lower-case(.), 'ä', 'ae'), 'ö', 'oe'), 'ü', 'ue'),'ß','ss'),' ','_'),'&#x002c;&#x0028;&#x0029;',''),'_/_','_'),'ç','c')"/>
<a href="{@ref}"><xsl:value-of select="."/></a>
<ul>
<xsl:for-each select="//div[@type='Verschlagwortung'][.//term[@ref eq current()/@ref]]">
<li>
<a href="{concat($stammbuchpfad,../@xml:id)}"><xsl:choose>
<xsl:when test="matches(../div[@type='Seite']/p,'^[A-Z]')"/>
<xsl:otherwise>S. </xsl:otherwise>
</xsl:choose><xsl:value-of select="../div[@type='Seite']/p"/></a>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
</xsl:template>
<xsl:template match="index/term">
<xsl:if test="not(preceding::term[parent::index][@ref eq current()/@ref]) and matches(@ref,'^http')">
<!-- <xsl:if test="not(preceding::term[parent::index][@ref eq current()/@ref]) and matches(@ref,'^https://d-nb\.info/gnd/([0-9]|X|-)+')"> -->
<li xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id" select="replace(replace(replace(replace(replace(replace(lower-case(.), 'ä', 'ae'), 'ö', 'oe'), 'ü', 'ue'),'ß','ss'),'ç','c'),'\W','')"/>
<a href="{@ref}"><xsl:value-of select="."/></a>
<ul>
<xsl:for-each select="//div[@type='Eintrag'][.//term[@ref eq current()/@ref]]">
<li>
<a href="{concat($stammbuchpfad,@xml:id)}">S. <xsl:value-of select="./div[@type='Seite']/p"/></a>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
</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