Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Hainhofer-XSLTs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin de la Iglesia
Hainhofer-XSLTs
Commits
a5ef71c0
Commit
a5ef71c0
authored
4 years ago
by
Martin de la Iglesia
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
ab02715a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bibliographie2html_gesamtliste.xsl
+122
-0
122 additions, 0 deletions
bibliographie2html_gesamtliste.xsl
with
122 additions
and
0 deletions
bibliographie2html_gesamtliste.xsl
0 → 100644
+
122
−
0
View file @
a5ef71c0
<?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>
–
</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>
–
</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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment