-
Notifications
You must be signed in to change notification settings - Fork 12
/
htm-tpl-structure.xsl
93 lines (85 loc) · 3.41 KB
/
htm-tpl-structure.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:t="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="t"
version="2.0">
<!-- Contains named templates for default file structure (aka "metadata" aka "supporting data") -->
<!-- Specific named templates for HGV, InsLib, RIB, IOSPE, EDH, etc. are found in:
htm-tpl-struct-hgv.xsl
htm-tpl-struct-inslib.xsl
htm-tpl-struct-rib.xsl
htm-tpl-struct-iospe.xsl
htm-tpl-struct-edh.xsl
etc.
-->
<xsl:template name="london-structure">
<xsl:call-template name="default-structure"/>
</xsl:template>
<xsl:template name="default-structure">
<html>
<head>
<title>
<xsl:call-template name="default-title" />
</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<!-- Found in htm-tpl-cssandscripts.xsl -->
<xsl:call-template name="css-script"/>
</head>
<body>
<xsl:call-template name="default-body-structure"/>
</body>
</html>
</xsl:template>
<xsl:template name="default-body-structure">
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<!-- Heading for a ddb style file -->
<xsl:if test="($parm-leiden-style = ('ddbdp','dclp','sammelbuch'))">
<h1>
<xsl:choose>
<xsl:when test="//t:sourceDesc//t:bibl/text()">
<xsl:value-of select="//t:sourceDesc//t:bibl"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//t:idno[@type='filename']"/>
</xsl:otherwise>
</xsl:choose>
</h1>
</xsl:if>
<!-- Main text output -->
<xsl:variable name="maintxt">
<xsl:apply-templates/>
</xsl:variable>
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
<xsl:variable name="maintxt2">
<xsl:apply-templates select="$maintxt" mode="sqbrackets"/>
</xsl:variable>
<xsl:apply-templates select="$maintxt2" mode="sqbrackets"/>
<!-- Found in htm-tpl-license.xsl -->
<xsl:call-template name="license"/>
</xsl:template>
<xsl:template name="default-title">
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<xsl:when test="$parm-leiden-style = ('ddbdp','dclp','sammelbuch')">
<xsl:choose>
<xsl:when test="//t:sourceDesc//t:bibl/text()">
<xsl:value-of select="//t:sourceDesc//t:bibl"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//t:idno[@type='filename']"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="//t:titleStmt/t:title/text()">
<xsl:if test="//t:idno[@type='filename']/text()">
<xsl:value-of select="//t:idno[@type='filename']"/>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:value-of select="//t:titleStmt/t:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>EpiDoc example output, default style</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>