Commit 14f89a99 authored by Jakob Schmidt's avatar Jakob Schmidt
Browse files

Prototyp Brief Index XSL

parent b56f0fd8
<?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"
version="2.0" xpath-default-namespace="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="#all">
<!-- alle Vorkommnisse von @ref mit #l am Anfang (außer unter "history"), sortiert nach @ref -->
<xsl:key name="occ"
match="*[@ref][starts-with(@ref, '#l')][not(ancestor::*[local-name() = 'history'])]"
use="@ref"/>
<!-- alle Seitenumbrüche, sortiert nach Dateinamen (vor dem Unterstrich) -->
<xsl:key name="pbs" match="*[@facs]" use="substring-before(@facs, '_')"/>
<xsl:variable name="pathlist">
<xsl:text>../../text/letters?select=*.xml;recurse=yes;on-error=warning</xsl:text>
</xsl:variable>
<xsl:variable name="docs" select="collection($pathlist)"/>
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
<html lang="de">
<head>
<meta charset="UTF-8"/>
<title> Übersicht </title>
<!-- BOOTSTRAP STYLESHEET-->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
crossorigin="anonymous"/>
<!-- BOOTSTRAP THEME STYLESHEET-->
<link rel="stylesheet" href="http://bootswatch.com/sandstone/bootstrap.min.css"/>
<!-- CUSTOM CSS-->
<link rel="stylesheet" href="../css/toggle-switch.css"/>
<link rel="stylesheet" href="../css/style.css"/>
</head>
<body>
<nav class="navbar navbar-default ">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"/>
<span class="icon-bar"/>
<span class="icon-bar"/>
</button>
<a class="navbar-brand" href="#">
<img src="../img/busoni_white.png"/>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="leses-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="#">Über das Projekt</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-haspopup="true" aria-expanded="false"
>Navigationseinstiege <span class="caret"/></a>
<ul class="dropdown-menu">
<li>
<a href="#">Autoren</a>
</li>
<li>
<a href="#">Themen</a>
</li>
<li>
<a href="#">Aufbewahrungsorte</a>
</li>
</ul>
</li>
<li>
<a href="#">Editorische Richtlinien</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<div class="container">
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li>
<a href="#">Start</a>
<span class="divider"/>
</li>
<li class="active">
Briefe
</li>
</ul>
<h1>Liste aller Briefe:</h1>
<div class="list-group">
<xsl:for-each select="$docs [(contains(., 'nb'))]"> //filtern der nb-Einträge
<xsl:sort
select="(tokenize(substring-before(base-uri(.), '.xml'), '/'))[last()]"/>
<xsl:variable name="cur_doc" select="."/>
<xsl:variable name="file"
select="(tokenize(substring-before(base-uri(.), '.xml'), '/'))[last()]"/>
<a href="{$file}.html" class="list-group-item">
<h4 class="list-group-item-heading">
<xsl:value-of select="$file"/>
</h4>
<xsl:if test="$cur_doc//*[local-name() = 'titleStmt']/*[local-name() = 'title']">
<p class="list-group-item-text"><xsl:value-of
select="$cur_doc//*[local-name() = 'titleStmt']/*[local-name() = 'title']"
/></p></xsl:if>
</a>
<!-- Seite <xsl:for-each select="key('pbs', $file)">
<xsl:sort select="number(@n)"/>
<xsl:variable name="cur_pb_n" select="@n"/>
für jedes erste Vorkommen eines @ref, zu dem der gerade aktuelle pb der erste vorherige pb ist
<xsl:for-each
select="key('occ', '#l0029')[preceding::*[local-name() = 'pb'][1]/@n = $cur_pb_n][1]">
<a href="{$file}.html#{$cur_pb_n}"><xsl:value-of select="$cur_pb_n"
/></a>
<xsl:text> </xsl:text>
</xsl:for-each>-->
</xsl:for-each>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">10. September 1903</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">14. September 1903</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1903-09-10-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">20. September 1903</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1903-09-14-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">14. Oktober 1903</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1903-09-20-sb.html">«</a></li>
......
......@@ -34,7 +34,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">16. Dezember 1903</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1903-10-14-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">13. Juli 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1903-12-16-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">16. Juli 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-07-13-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">20. Juli 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-07-16-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">26. Juli 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-07-20-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">31. Juli 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-07-26-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">2. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-07-31-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">13. August 1909 18. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-02-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">20. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-13-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">24. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-20-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">26. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-24-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">27. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-26-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">29. August 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-27-sb.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">6. Oktober 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-08-29-bs.html">«</a></li>
......
......@@ -33,7 +33,7 @@
<div class="container well" style="padding:10px;">
<ul class="breadcrumb">
<li><a href="#">Start</a><span class="divider"></span></li>
<li><a href="#">Briefe</a><span class="divider"></span></li>
<li><a href="index.html">Briefe</a><span class="divider"></span></li>
<li class="active">7. Oktober 1909</li><br><div class="letternav">
<ul class="pagination pagination-sm">
<li><a href="1909-10-06-sb.html">«</a></li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment