1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<!-- $Id: htm-tpl-struct-iospe.xsl 1434 2011-05-31 18:23:56Z gabrielbodard $ -->
|
3
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4
|
xmlns:t="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="t" version="2.0">
|
5
|
<!-- Contains named templates for IOSPE file structure (aka "metadata" aka "supporting data") -->
|
6
|
|
7
|
<!-- Called from htm-tpl-structure.xsl -->
|
8
|
|
9
|
<xsl:template name="iospe-structure">
|
10
|
<xsl:variable name="title">
|
11
|
<xsl:choose>
|
12
|
<xsl:when test="//t:titleStmt/t:title/text()">
|
13
|
<xsl:number value="substring-before(t:idno[@type='filename'],'.')" format="I"/>
|
14
|
<xsl:text> </xsl:text>
|
15
|
<xsl:number value="substring-after(t:idno[@type='filename'],'.')" format="1"/>
|
16
|
<xsl:text>. </xsl:text>
|
17
|
<xsl:value-of select="//origPlace"/>
|
18
|
<xsl:text>. </xsl:text>
|
19
|
<xsl:value-of select="//t:titleStmt/t:title"/>
|
20
|
</xsl:when>
|
21
|
<xsl:when test="//t:sourceDesc//t:bibl/text()">
|
22
|
<xsl:value-of select="//t:sourceDesc//t:bibl"/>
|
23
|
</xsl:when>
|
24
|
<xsl:when test="//t:idno[@type='filename']/text()">
|
25
|
<xsl:value-of select="//t:idno[@type='filename']"/>
|
26
|
</xsl:when>
|
27
|
<xsl:otherwise>
|
28
|
<xsl:text>EpiDoc example output, IOSPE style</xsl:text>
|
29
|
</xsl:otherwise>
|
30
|
</xsl:choose>
|
31
|
</xsl:variable>
|
32
|
<html>
|
33
|
<head>
|
34
|
<title>
|
35
|
<xsl:value-of select="$title"/>
|
36
|
</title>
|
37
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
38
|
<!-- Found in htm-tpl-cssandscripts.xsl -->
|
39
|
<xsl:call-template name="css-script"/>
|
40
|
</head>
|
41
|
<body>
|
42
|
<h1>
|
43
|
<xsl:value-of select="$title"/>
|
44
|
</h1>
|
45
|
<div id="stone">
|
46
|
<h3 class="iospe">Monument</h3>
|
47
|
<dl class="iospe">
|
48
|
<dt width="150" align="left">Type of monument</dt>
|
49
|
<dd>
|
50
|
<xsl:choose>
|
51
|
<xsl:when test="//t:support//t:objectType//text()">
|
52
|
<xsl:value-of select="//t:support//t:objectType"/>
|
53
|
</xsl:when>
|
54
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
55
|
</xsl:choose>
|
56
|
</dd>
|
57
|
<dt width="150" align="left">Material</dt>
|
58
|
<dd>
|
59
|
<xsl:choose>
|
60
|
<xsl:when test="//t:support//t:material//text()">
|
61
|
<xsl:value-of select="//t:support//t:material"/>
|
62
|
</xsl:when>
|
63
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
64
|
</xsl:choose>
|
65
|
</dd>
|
66
|
<dt width="150" align="left">Description and condition</dt>
|
67
|
<dd>
|
68
|
<xsl:choose>
|
69
|
<xsl:when test="//t:support//t:p//text()">
|
70
|
<xsl:value-of select="//t:support//t:p"/>
|
71
|
</xsl:when>
|
72
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
73
|
</xsl:choose>
|
74
|
</dd>
|
75
|
</dl>
|
76
|
|
77
|
<dl class="iospe">
|
78
|
<dt width="150" align="left">Find place</dt>
|
79
|
<dd>
|
80
|
<xsl:choose>
|
81
|
<xsl:when test="//t:provenance[@type='found']//t:placeName[@type='ancientFindspot']//text()">
|
82
|
<xsl:value-of select="//t:provenance[@type='found']//t:placeName[@type='ancientFindspot']"/>
|
83
|
</xsl:when>
|
84
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
85
|
</xsl:choose>
|
86
|
</dd>
|
87
|
<dt width="150" align="left">Find circumstances</dt>
|
88
|
<dd>
|
89
|
<xsl:choose>
|
90
|
<xsl:when test="//t:provenance[@type='found']//t:rs[@type='circumstances']//text()">
|
91
|
<xsl:value-of select="//t:provenance[@type='found']//t:rs[@type='circumstances']"/>
|
92
|
</xsl:when>
|
93
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
94
|
</xsl:choose>
|
95
|
</dd>
|
96
|
<dt width="150" align="left">Find context</dt>
|
97
|
<dd>
|
98
|
<xsl:choose>
|
99
|
<xsl:when test="//t:provenance[@type='found']//t:rs[@type='context']//text()">
|
100
|
<xsl:value-of select="//t:provenance[@type='found']//t:rs[@type='context']"/>
|
101
|
</xsl:when>
|
102
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
103
|
</xsl:choose>
|
104
|
</dd>
|
105
|
<dt width="150" align="left">Modern location</dt>
|
106
|
<dd>
|
107
|
<xsl:choose>
|
108
|
<xsl:when test="//t:provenance[@type='observed']//text()">
|
109
|
<xsl:value-of select="//t:provenance[@type='observed']"/>
|
110
|
</xsl:when>
|
111
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
112
|
</xsl:choose>
|
113
|
</dd>
|
114
|
<dt width="150" align="left">Dimensions</dt>
|
115
|
<dd>
|
116
|
<xsl:choose>
|
117
|
<xsl:when test="//t:support/t:dimensions//text()[not(normalize-space(.)=' ')]">
|
118
|
<xsl:if test="//t:support/t:dimensions/t:height/text()[not(normalize-space(.)=' ')]">H. <xsl:value-of select="//t:support/t:dimensions/t:height"/>,</xsl:if>
|
119
|
<xsl:if test="//t:support/t:dimensions/t:width/text()[not(normalize-space(.)=' ')]">W. <xsl:value-of select="//t:support/t:dimensions/t:width"/>,</xsl:if>
|
120
|
<xsl:if test="//t:support/t:dimensions/t:depth/text()[not(normalize-space(.)=' ')]">Th. <xsl:value-of select="//t:support/t:dimensions/t:depth"/></xsl:if>
|
121
|
<xsl:if test="//t:support/t:dimensions/t:dim[@type='diameter']/text()[not(normalize-space(.)=' ')]">, Diam. <xsl:value-of select="//t:support/t:dimensions/t:dim[@type='diameter']"/></xsl:if>
|
122
|
</xsl:when>
|
123
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
124
|
</xsl:choose>
|
125
|
</dd>
|
126
|
<dt width="150" align="left">Institution and inventory</dt>
|
127
|
<dd>
|
128
|
<xsl:choose>
|
129
|
<xsl:when test="//t:msIdentifier//t:repository/text() and //t:msIdentifier//t:idno/text()">
|
130
|
<xsl:value-of select="//t:msIdentifier//t:repository"/>
|
131
|
<xsl:value-of select="//t:msIdentifier//t:idno"/>
|
132
|
</xsl:when>
|
133
|
<xsl:when test="//t:msIdentifier//t:repository/text()">
|
134
|
<xsl:value-of select="//t:msIdentifier//t:repository"/>
|
135
|
<xsl:text>no inv. no.</xsl:text>
|
136
|
</xsl:when>
|
137
|
<xsl:otherwise>Unknown</xsl:otherwise>
|
138
|
</xsl:choose>
|
139
|
</dd>
|
140
|
</dl>
|
141
|
</div>
|
142
|
|
143
|
<div id="text-field">
|
144
|
<h3 class="iospe">Inscribed field</h3>
|
145
|
<dl class="iospe">
|
146
|
<xsl:if test="//t:layout/@ana">
|
147
|
<dt width="150" align="left">Faces code</dt>
|
148
|
<dd><xsl:value-of select="//t:layout/@ana"/></dd>
|
149
|
</xsl:if>
|
150
|
<dt width="150" align="left">Placement of text</dt>
|
151
|
<dd>
|
152
|
<xsl:choose>
|
153
|
<xsl:when test="//t:layout/text()">
|
154
|
<xsl:value-of select="//t:layout"/>
|
155
|
</xsl:when>
|
156
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
157
|
</xsl:choose>
|
158
|
</dd>
|
159
|
<dt width="150" align="left">Style of lettering</dt>
|
160
|
<dd>
|
161
|
<xsl:choose>
|
162
|
<xsl:when test="//t:handNote//text()[not(ancestor::t:height)]">
|
163
|
<xsl:value-of select="/t:handNote//text()[not(ancestor::t:height)]"/>
|
164
|
</xsl:when>
|
165
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
166
|
</xsl:choose>
|
167
|
</dd>
|
168
|
<dt width="150" align="left">Letterheights</dt>
|
169
|
<dd>
|
170
|
<xsl:choose>
|
171
|
<xsl:when test="//t:handNote//t:height/text()">
|
172
|
<xsl:value-of select="//t:handNote//t:height"/>
|
173
|
</xsl:when>
|
174
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
175
|
</xsl:choose>
|
176
|
</dd>
|
177
|
</dl>
|
178
|
</div>
|
179
|
|
180
|
<div id="text">
|
181
|
<h3 class="iospe">Text</h3>
|
182
|
<dl class="iospe">
|
183
|
|
184
|
<dt>Origin</dt>
|
185
|
<dd>
|
186
|
<xsl:choose>
|
187
|
<xsl:when test="//t:origin/t:origPlace/text()">
|
188
|
<xsl:value-of select="//t:origin/t:origPlace"/>
|
189
|
</xsl:when>
|
190
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
191
|
</xsl:choose>
|
192
|
</dd>
|
193
|
<dt>Category</dt>
|
194
|
<dd>
|
195
|
<xsl:choose>
|
196
|
<xsl:when test="//t:msContents/t:summary/text()">
|
197
|
<xsl:value-of select="//t:msContents/t:summary"/>
|
198
|
</xsl:when>
|
199
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
200
|
</xsl:choose>
|
201
|
</dd>
|
202
|
<dt>Date</dt>
|
203
|
<dd>
|
204
|
<xsl:choose>
|
205
|
<xsl:when test="//t:origin/t:origDate/text()">
|
206
|
<xsl:value-of select="//t:origin/t:origDate"/>
|
207
|
</xsl:when>
|
208
|
<xsl:otherwise>Not specified</xsl:otherwise>
|
209
|
</xsl:choose></dd>
|
210
|
<dt>Dating criteria</dt>
|
211
|
<dd>
|
212
|
<xsl:choose>
|
213
|
<xsl:when test="//t:origin/t:origDate/@evidence">
|
214
|
<xsl:for-each select="tokenize(//t:origin/t:origDate[@evidence],' ')">
|
215
|
<xsl:value-of select="translate(.,'-',' ')"/>
|
216
|
<xsl:if test="position()!=last()">
|
217
|
<xsl:text>, </xsl:text>
|
218
|
</xsl:if>
|
219
|
</xsl:for-each>
|
220
|
</xsl:when>
|
221
|
<xsl:otherwise>
|
222
|
<xsl:text>n/a</xsl:text>
|
223
|
</xsl:otherwise>
|
224
|
</xsl:choose>
|
225
|
</dd>
|
226
|
<dt>Editions</dt>
|
227
|
<dd>
|
228
|
<xsl:choose>
|
229
|
<xsl:when test="//t:body//t:div[@type='bibliography']//text()">
|
230
|
<xsl:apply-templates select="//t:body//t:div[@type='bibliography']"/>
|
231
|
</xsl:when>
|
232
|
<xsl:otherwise>Unpublished</xsl:otherwise>
|
233
|
</xsl:choose></dd>
|
234
|
</dl>
|
235
|
|
236
|
<div id="edition" class="iospe">
|
237
|
<!-- Edited text output -->
|
238
|
<xsl:variable name="edtxt">
|
239
|
<xsl:apply-templates select="//t:div[@type='edition']"/>
|
240
|
</xsl:variable>
|
241
|
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
|
242
|
<xsl:apply-templates select="$edtxt" mode="sqbrackets"/>
|
243
|
</div>
|
244
|
<div id="apparatus" class="iospe">
|
245
|
<h4 class="iospe">Apparatus</h4>
|
246
|
<!-- Apparatus text output -->
|
247
|
<xsl:variable name="apptxt">
|
248
|
<xsl:apply-templates select="//t:div[@type='apparatus']/t:listApp"/>
|
249
|
</xsl:variable>
|
250
|
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
|
251
|
<xsl:apply-templates select="$apptxt" mode="sqbrackets"/>
|
252
|
</div>
|
253
|
<div id="translation" class="iospe">
|
254
|
<h4 class="iospe">Translation</h4>
|
255
|
<!-- Translation text output -->
|
256
|
<xsl:variable name="transtxt">
|
257
|
<xsl:apply-templates select="//t:div[@type='translation']//t:p"/>
|
258
|
</xsl:variable>
|
259
|
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
|
260
|
<xsl:apply-templates select="$transtxt" mode="sqbrackets"/>
|
261
|
</div>
|
262
|
<div id="commentary" class="iospe">
|
263
|
<h4 class="iospe">Commentary</h4>
|
264
|
<!-- Commentary text output -->
|
265
|
<xsl:variable name="commtxt">
|
266
|
<xsl:apply-templates select="//t:div[@type='commentary']//t:p"/>
|
267
|
</xsl:variable>
|
268
|
<!-- Moded templates found in htm-tpl-sqbrackets.xsl -->
|
269
|
<xsl:apply-templates select="$commtxt" mode="sqbrackets"/>
|
270
|
</div>
|
271
|
</div>
|
272
|
</body>
|
273
|
</html>
|
274
|
</xsl:template>
|
275
|
|
276
|
</xsl:stylesheet>
|