-
Notifications
You must be signed in to change notification settings - Fork 0
/
line-start-end.xsl
115 lines (95 loc) · 3.77 KB
/
line-start-end.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY lsquo '‘' >
<!ENTITY rsquo '’' >
<!ENTITY ldquo '“' >
<!ENTITY rdquo '”' >
<!ENTITY nbsp ' ' >
<!ENTITY ndash '–' >
<!ENTITY times '×' >
<!ENTITY zwj '⁠' >
]>
<!-- Copyright 2020-2021 Antenna House, Inc. -->
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- 'Moby-Dick' first edition. -->
<!-- http://purl.dlib.indiana.edu/iudl/wright/VAC7237 -->
<xsl:stylesheet
xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:m="http://www.mentea.net/"
xmlns:ahf="http://www.antennahouse.com/names/XSLT/Functions/Document"
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="ahf m tei xs xhtml"
version="3.0">
<!-- ============================================================= -->
<!-- IMPORTS -->
<!-- ============================================================= -->
<xsl:import href="paragraph-widow-2.xsl"/>
<!-- ============================================================= -->
<!-- TEMPLATES -->
<!-- ============================================================= -->
<!-- Additional hyphenation exceptions. -->
<!--
<xsl:template match="axf:hyphenation-info"
mode="axf:hyphenation-info">
<xsl:apply-imports />
<axf:hyphenation-info
language="eng"
xmlns:axh="http://www.antennahouse.com/names/XSL/Hyphenations">
<axh:exceptions>
Phædon
</axh:exceptions>
</axf:hyphenation-info>
</xsl:template>
-->
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[3]/p[45]/text()">
<xsl:value-of
select="replace(ahf:text(.), 'to be', 'to be')" />
</xsl:template>
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[11]/p[2]/text()">
<xsl:value-of
select="replace(ahf:text(.), 'you feel', 'you feel')" />
</xsl:template>
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[13]/p[5]">
<fo:block word-spacing.minimum="0.03em"
xsl:use-attribute-sets="p">
<xsl:apply-templates />
</fo:block>
</xsl:template>
<!-- 'I thought him...' (pg. 84) -->
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[16]/p[54]">
<xsl:param name="atts" select="()" as="attribute()*" />
<xsl:next-match>
<xsl:with-param name="atts" as="attribute()*">
<xsl:attribute name="word-spacing.minimum" select="'0.01em'" />
<xsl:sequence select="$atts" />
</xsl:with-param>
</xsl:next-match>
</xsl:template>
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[81]/p[29]/text()">
<xsl:value-of
select="replace(ahf:text(.), 'of the thing', 'of the thing')" />
</xsl:template>
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[96]/p[3]/text()">
<xsl:value-of
select="replace(ahf:text(.), 'the rear', 'the rear')" />
</xsl:template>
<xsl:template match="/TEI/text[1]/body[1]/div[1]/div[107]/p[5]/text()">
<xsl:value-of
select="replace(ahf:text(.), 'by any', 'by any')" />
</xsl:template>
</xsl:stylesheet>