Skip to content

Commit 2bfe08a

Browse files
authored
Merge branch 'master' into master
2 parents 79f41ab + 771552c commit 2bfe08a

32 files changed

+1379
-848
lines changed

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*******************************************************************
2-
* LICENSE.txt for example-p5-xslt *
2+
* LICENSE.txt for EpiDoc Stylesheets *
33
*******************************************************************
44

55
This program is free software: you can redistribute it and/or modify

fo-tpl-struct-creta.xsl

+85-90
Original file line numberDiff line numberDiff line change
@@ -6,115 +6,110 @@
66
<fo:block margin-top="12.5pt" margin-bottom="3.1pt" hyphenate="true" page-break-after="avoid">
77
Text
88
</fo:block>
9-
10-
<xsl:call-template name="creta-body-structure"/>
11-
12-
</xsl:template>
139

14-
<xsl:template name="creta-body-structure">
15-
<fo:block-container id="body-{replace(//t:idno[@type='filename'], '\s+', '_')}">
16-
<fo:block>
17-
<xsl:variable name="edtxt">
18-
<xsl:apply-templates select="//t:div[@type='edition']">
19-
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
20-
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
21-
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
22-
</xsl:apply-templates>
23-
</xsl:variable>
24-
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
25-
<xsl:apply-templates select="$edtxt" mode="sqbrackets"/>
26-
</fo:block>
27-
28-
<fo:block font-weight="800">Apparato</fo:block>
29-
<fo:block>
30-
<xsl:apply-templates select="//t:div[@type='apparatus']">
31-
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
32-
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
33-
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
34-
</xsl:apply-templates></fo:block>
35-
36-
<fo:block font-weight="800">Traduzione</fo:block>
37-
<fo:block><xsl:variable name="trtxt">
38-
<xsl:apply-templates select="//t:div[@type='translation']">
10+
<xsl:call-template name="creta-body-structure"/>
11+
12+
</xsl:template>
13+
14+
<xsl:template name="creta-body-structure">
15+
<fo:block-container id="body-{replace(//t:idno[@type='filename'], '\s+', '_')}">
16+
<fo:block>
17+
<xsl:variable name="edtxt">
18+
<xsl:apply-templates select="//t:div[@type='edition']">
3919
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
4020
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
4121
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
4222
</xsl:apply-templates>
4323
</xsl:variable>
44-
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
45-
<xsl:apply-templates select="$trtxt" mode="sqbrackets"/></fo:block>
46-
47-
<fo:block font-weight="800">Commento</fo:block>
48-
<fo:block>
49-
<xsl:apply-templates select="//t:div[@type='commentary']">
50-
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
51-
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
52-
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
53-
</xsl:apply-templates>
54-
</fo:block>
55-
56-
</fo:block-container>
57-
</xsl:template>
58-
59-
60-
<!-- various links in bibliography -->
24+
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
25+
<xsl:apply-templates select="$edtxt" mode="sqbrackets"/>
26+
</fo:block>
27+
28+
<fo:block font-weight="800">Apparato</fo:block>
29+
<fo:block>
30+
<xsl:apply-templates select="//t:div[@type='apparatus']">
31+
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
32+
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
33+
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
34+
</xsl:apply-templates></fo:block>
35+
36+
<fo:block font-weight="800">Traduzione</fo:block>
37+
<fo:block><xsl:variable name="trtxt">
38+
<xsl:apply-templates select="//t:div[@type='translation']">
39+
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
40+
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
41+
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
42+
</xsl:apply-templates>
43+
</xsl:variable>
44+
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
45+
<xsl:apply-templates select="$trtxt" mode="sqbrackets"/></fo:block>
46+
47+
<fo:block font-weight="800">Commento</fo:block>
48+
<fo:block>
49+
<xsl:apply-templates select="//t:div[@type='commentary']">
50+
<xsl:with-param name="parm-edition-type" tunnel="yes"><xsl:text>interpretive</xsl:text></xsl:with-param>
51+
<xsl:with-param name="parm-verse-lines" tunnel="yes"><xsl:text>off</xsl:text></xsl:with-param>
52+
<xsl:with-param name="parm-line-inc" tunnel="yes"><xsl:text>5</xsl:text></xsl:with-param>
53+
</xsl:apply-templates>
54+
</fo:block>
55+
56+
</fo:block-container>
57+
</xsl:template>
58+
59+
60+
<!-- links to external resources in bibliography -->
6161
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='phi']">
62-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>PHI</a></xsl:template>
63-
62+
➚<a target="_blank" href="http://epigraphy.packhum.org/text/{@target}">PHI</a>
63+
</xsl:template>
6464
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='aio']">
65-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>AIO</a></xsl:template>
66-
65+
➚<a target="_blank" href="https://www.atticinscriptions.com/inscription/{@target}">AIO</a>
66+
</xsl:template>
6767
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='seg']">
68-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>SEG</a></xsl:template>
69-
68+
➚<a target="_blank" href="http://dx.doi.org/10.1163/1874-6772_seg_{@target}">SEG</a>
69+
</xsl:template>
7070
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='cgrn']">
71-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>CGRN</a></xsl:template>
72-
71+
➚<a target="_blank" href="http://cgrn.ulg.ac.be/file/{@target}">CGRN</a>
72+
</xsl:template>
7373
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='thetima']">
74-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>ΘΕΤΙΜΑ</a></xsl:template>
75-
74+
➚<a target="_blank" href="http://ancdialects.greek-language.gr/inscriptions/{@target}">ΘΕΤΙΜΑ</a>
75+
</xsl:template>
7676
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='axon']">
77-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>Axon</a></xsl:template>
78-
77+
➚<a target="_blank" href="https://mizar.unive.it/axon/public/axon/anteprima/anteprima/idSchede/{@target}">Axon</a>
78+
</xsl:template>
7979
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='poinikastas']">
80-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>Poinikastas</a></xsl:template>
81-
80+
➚<a target="_blank" href="http://poinikastas.csad.ox.ac.uk/search-browse.shtml{@target}">Poinikastas</a>
81+
</xsl:template>
8282
<xsl:template mode="creta" match="t:div[@type='bibliography']/t:p/t:bibl/t:ptr[@target][@type='ela']">
83-
➚<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute>ELA</a></xsl:template>
84-
83+
➚<a target="_blank" href="http://www.epigraphiclandscape.unito.it/index.php/browse/{@target}">ELA</a>
84+
</xsl:template>
85+
86+
<!-- links to full bibliographic references -->
87+
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']/t:p/t:bibl/t:ref[@target]">
88+
<a target="_blank" href="../texts/bibliografia.html#{substring-after(@target,'#')}" class="link"><xsl:apply-templates mode="creta"/></a>
89+
</xsl:template>
90+
91+
<!-- links to inscriptions and literary sources in the commentary -->
92+
<xsl:template mode="creta" match="t:div[@type='commentary']/t:p/t:ref[@target][@type='ins']">
93+
<a target="_blank" href="./{substring-after(@target,'#')}.html"><xsl:apply-templates mode="creta"/></a></xsl:template>
94+
95+
<xsl:template mode="creta" match="t:div[@type='commentary']/t:p/t:ref[@target][@type='lit']">
96+
<a target="_blank" href="../texts/fonti_letterarie.html{substring-after(@target, '#')}"><xsl:apply-templates mode="creta"/></a></xsl:template>
97+
98+
<!-- links to institution sections in the commentary -->
99+
<xsl:template mode="creta" match="t:div[@type='commentary']/t:p/t:ref[@target][@type='inst']">
100+
<a target="_blank" href="../texts/istituzioni.html{@target}"><xsl:apply-templates mode="creta"/></a></xsl:template>
101+
102+
85103
<!-- bold chosen edition in bibliography -->
86104
<xsl:template mode="creta" match="t:bibl[@type='main_edition']"><strong><xsl:apply-templates mode="creta"/></strong></xsl:template>
87-
88-
89-
<!-- lb in bibliography and commentary -->
90-
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']/t:p//t:lb"><br/><xsl:apply-templates/></xsl:template>
105+
106+
<!-- p in bibliography, commentary, translation -->
107+
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary' or @type='translation']/t:p"><p><xsl:apply-templates mode="creta"/></p></xsl:template>
91108

92109
<!-- emph in bibliography and commentary -->
93110
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']/t:p//t:emph"><strong><xsl:apply-templates/></strong></xsl:template>
94111

95-
<!-- foreign words in bibliography and commentary -->
96-
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']/t:p//t:foreign"><i><xsl:apply-templates/></i></xsl:template>
97-
98-
<!-- apices in bibliography and commentary -->
99-
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']//t:hi[@rend='superscript']"><sup><xsl:apply-templates/></sup></xsl:template>
100-
101-
<!-- simple link to full bibliographic references -->
102-
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary']/t:p/t:bibl/t:ref[@target]">
103-
<xsl:variable name="bib-id" select="substring-after(@target,'#')"/>
104-
<a><xsl:attribute name="class"><xsl:value-of select="'link'"/></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="concat('../texts/riferimenti_bibliografici.html#',$bib-id)"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute><xsl:apply-templates mode="creta"/></a>
105-
</xsl:template>
106-
107-
<!-- ref for mentions of inscriptions and literary sources in the commentary -->
108-
<xsl:template mode="creta" match="t:div[@type='commentary']/t:p/t:ref[@target]">
109-
<a><xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute><xsl:attribute name="target"><xsl:value-of select="'_blank'"/></xsl:attribute><xsl:apply-templates mode="creta"/></a></xsl:template>
110-
111-
<!-- apices in apparatus -->
112-
<xsl:template mode="creta" match="t:div[@type='apparatus']//t:hi[@rend='superscript']"><sup><xsl:apply-templates/></sup></xsl:template>
113-
114-
<!-- foreign words in apparatus -->
115-
<xsl:template match="t:div[@type='apparatus']//t:foreign"><i><xsl:apply-templates mode="creta"/></i></xsl:template>
112+
<!-- apices in bibliography, commentary, apparatus -->
113+
<xsl:template mode="creta" match="t:div[@type='bibliography' or @type='commentary' or @type='apparatus']//t:hi[@rend='superscript']"><sup><xsl:apply-templates/></sup></xsl:template>
116114

117-
<!-- foreign words in header -->
118-
<xsl:template match="t:teiHeader//t:foreign"><i><xsl:apply-templates mode="creta"/></i></xsl:template>
119-
120115
</xsl:stylesheet>

global.css

+15-1
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,25 @@
5454
text-decoration: underline;
5555
}
5656

57+
.inslibligature {
58+
border-top: 2px solid black;
59+
border-radius: 6px;
60+
padding: 4px 2px 0px 2px;
61+
}
62+
5763
.underline {
5864
text-decoration: underline;
5965
}
6066

6167
.italic {
6268
font-style: italic;
6369
}
64-
70+
71+
.rtl, .rtl * {
72+
direction: rtl;
73+
text-align-last: right;
74+
}
75+
6576
h4.slimmer {
6677
margin-bottom: -0.5em;
6778
}
@@ -117,3 +128,6 @@ div.iospe {
117128
margin-left:165px;
118129
}
119130

131+
.no-space {
132+
margin-bottom: -1.9em;
133+
}

htm-teibibl.xsl

+58-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
33
xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:f="http://example.com/ns/functions"
4-
xmlns:html="http://www.w3.org/1999/html" exclude-result-prefixes="t f" version="2.0">
4+
xmlns:html="http://www.w3.org/1999/html" exclude-result-prefixes="t f" version="2.0" xmlns:fn="http://www.w3.org/2005/xpath-functions">
55
<!--
66
77
Pietro notes on 14/8/2015 work on this template, from mail to Gabriel.
@@ -267,6 +267,62 @@ bibliography. All examples only cater for book and article.
267267
</xsl:otherwise>
268268
</xsl:choose>
269269
</xsl:template>
270-
270+
271+
272+
<xsl:template match="t:ptr[@target]">
273+
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/>
274+
<xsl:choose>
275+
<xsl:when test="$parm-edn-structure='inslib' or $parm-edn-structure='sample'">
276+
<!-- if you are running this template outside EFES, change the path to the bibliography authority list accordingly -->
277+
<xsl:variable name="bibliography-al" select="concat('file:',system-property('user.dir'),'/webapps/ROOT/content/xml/authority/bibliography.xml')"/>
278+
<xsl:variable name="bibl-ref" select="translate(@target, '#', '')"/>
279+
<xsl:choose>
280+
<xsl:when test="doc-available($bibliography-al) = fn:true()">
281+
<xsl:variable name="bibl" select="document($bibliography-al)//t:bibl[@xml:id=$bibl-ref][not(@sameAs)]"/>
282+
<a href="../concordance/bibliography/{$bibl-ref}.html" target="_blank">
283+
<xsl:choose>
284+
<xsl:when test="$bibl//t:bibl[@type='abbrev']">
285+
<xsl:apply-templates select="$bibl//t:bibl[@type='abbrev'][1]"/>
286+
</xsl:when>
287+
<xsl:otherwise>
288+
<xsl:choose>
289+
<xsl:when test="$bibl[ancestor::t:div[@xml:id='authored_editions']]">
290+
<xsl:for-each select="$bibl//t:name[@type='surname'][not(parent::*/preceding-sibling::t:title)]">
291+
<xsl:apply-templates select="."/>
292+
<xsl:if test="position()!=last()"> – </xsl:if>
293+
</xsl:for-each>
294+
<xsl:text> </xsl:text>
295+
<xsl:apply-templates select="$bibl//t:date"/>
296+
</xsl:when>
297+
<xsl:when test="$bibl[ancestor::t:div[@xml:id='series_collections']]">
298+
<i><xsl:value-of select="$bibl/@xml:id"/></i>
299+
</xsl:when>
300+
</xsl:choose>
301+
</xsl:otherwise>
302+
</xsl:choose>
303+
</a>
304+
</xsl:when>
305+
<xsl:otherwise>
306+
<xsl:value-of select="$bibl-ref"/>
307+
</xsl:otherwise>
308+
</xsl:choose>
309+
</xsl:when>
310+
<xsl:otherwise>
311+
<xsl:apply-templates/>
312+
</xsl:otherwise>
313+
</xsl:choose>
314+
</xsl:template>
315+
316+
<xsl:template match="t:title[not(ancestor::t:titleStmt)]" mode="#default inslib-dimensions inslib-placename sample-dimensions creta">
317+
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/>
318+
<xsl:choose>
319+
<xsl:when test="$parm-edn-structure='inslib' or $parm-edn-structure='sample' or $parm-edn-structure='creta'">
320+
<i><xsl:apply-templates/></i>
321+
</xsl:when>
322+
<xsl:otherwise>
323+
<xsl:apply-templates/>
324+
</xsl:otherwise>
325+
</xsl:choose>
326+
</xsl:template>
271327

272328
</xsl:stylesheet>

0 commit comments

Comments
 (0)