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

Upload New File

parent ab02715a
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<!-- Dieses Stylesheet erzeugt aus der TEI/XML-Datei der Bibliographie eine alphabetisch sortierte XHTML-Gesamtliste. -->
<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="tei xhtml xs" version="2.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"/>
<!-- Hier die Dateipfade angeben: -->
<xsl:variable name="litpath">lit/</xsl:variable>
<xsl:variable name="wrkpath">../wrk/</xsl:variable>
<xsl:variable name="psnpath">../psn/</xsl:variable>
<xsl:variable name="plcpath">../plc/</xsl:variable>
<xsl:variable name="orgpath">../org/</xsl:variable>
<xsl:template match="/">
<xsl:result-document href="../HTML-Dateien/lit-list.xhtml">
<xsl:variable name="output">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="lit/lit-output.css"/>
<title>Bibliographie</title>
</head>
<body>
<table>
<xsl:apply-templates select="tei:TEI/tei:text/tei:body/tei:listBibl"/>
</table>
</body>
</html>
</xsl:variable>
<xsl:apply-templates mode="step2" select="$output">
<xsl:with-param name="output" select="$output"/>
</xsl:apply-templates>
</xsl:result-document>
</xsl:template>
<xsl:template match="tei:listBibl">
<xsl:apply-templates select="tei:bibl">
<xsl:sort select="@sortKey"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="tei:bibl">
<tr xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id">
<xsl:value-of select="substring(@sortKey,1,1)"/>
</xsl:attribute>
<td class="gesamtliste">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($litpath,@xml:id,'.xhtml')"/>
</xsl:attribute>
<xsl:value-of select="tei:seg"/>
</a>
<xsl:if test="tei:seg/tei:ptr">
<xsl:text> [</xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($litpath,substring-after(tei:seg/tei:ptr/@target,'#'),'.xhtml')"/>
</xsl:attribute>
<xsl:text>zum übergeordneten Werk</xsl:text>
</a>
<xsl:text>]</xsl:text>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="@* | node()" mode="step2">
<xsl:copy>
<xsl:apply-templates select="@* | node()|comment()" mode="step2"/>
</xsl:copy>
</xsl:template>
<xsl:template match="xhtml:body" mode="step2">
<body xmlns="http://www.w3.org/1999/xhtml">
<div>
<xsl:choose>
<xsl:when test="xhtml:table">
<xsl:for-each select="xhtml:table/xhtml:tr[not(@id eq preceding-sibling::xhtml:tr[1]/@id)]/@id">
<a href="#{.}"><xsl:value-of select="upper-case(.)"/></a>
<xsl:if test="parent::xhtml:tr/following-sibling::xhtml:tr[not(@id eq preceding-sibling::xhtml:tr[1]/@id)]">
<xsl:text> &#x2013; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="xhtml:ul">
<xsl:for-each select="xhtml:ul/xhtml:li[not(replace(replace(replace(lower-case(substring(., 1, 1)), 'ä', 'a'), 'ö', 'o'), 'ü', 'u') eq preceding-sibling::xhtml:li[1]/replace(replace(replace(lower-case(substring(., 1, 1)), 'ä', 'a'), 'ö', 'o'), 'ü', 'u'))]">
<a href="#{@id}"><xsl:value-of select="upper-case(replace(replace(replace(lower-case(substring(., 1, 1)), 'ä', 'a'), 'ö', 'o'), 'ü', 'u'))"/></a>
<xsl:if test="substring(.,1,1) ne 'Z'">
<xsl:text> &#x2013; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</div>
<xsl:apply-templates mode="step2"/>
</body>
</xsl:template>
<xsl:template match="xhtml:tr" mode="step2">
<xsl:if test="not(@id eq preceding-sibling::xhtml:tr[1]/@id)">
<tr xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id" select="@id"/>
<th>
<xsl:value-of select="upper-case(@id)"/>
</th>
</tr>
</xsl:if>
<tr xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates mode="step2"/>
</tr>
</xsl:template>
<xsl:template match="xhtml:body/xhtml:ul/xhtml:li" mode="step2">
<li xmlns="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="step2"/>
</li>
</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