tangled
alpha
login
or
join now
liamoc.net
/
forest-theme
1
fork
atom
My theme for forester (+plugins)
1
fork
atom
overview
issues
pulls
pipelines
new version of theme using a namespace for forester
jonmsterling.com
2 years ago
9610f1a3
69b8a34a
+148
-148
3 changed files
expand all
collapse all
unified
split
forest.xsl
links.xsl
metadata.xsl
+105
-105
forest.xsl
···
1
1
<?xml version="1.0"?>
2
2
<!-- SPDX-License-Identifier: CC0-1.0 -->
3
3
<xsl:stylesheet version="1.0"
4
4
-
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
5
-
xmlns:mml="http://www.w3.org/1998/Math/MathML">
4
4
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
5
+
xmlns:mml="http://www.w3.org/1998/Math/MathML"
6
6
+
xmlns:f="http://www.jonmsterling.com/jms-005P.xml">
6
7
7
8
<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="" doctype-system="" />
8
9
···
11
12
12
13
<xsl:key
13
14
name="tree-with-addr"
14
14
-
match="/tree/mainmatter//tree"
15
15
-
use="frontmatter/addr/text()" />
15
15
+
match="/f:tree/f:mainmatter//f:tree"
16
16
+
use="f:frontmatter/f:addr/text()" />
16
17
17
18
<!-- The following ensures that node not matched by a template will simply be
18
19
copied into the output. -->
···
36
37
</xsl:template>
37
38
38
39
<xsl:template
39
39
-
match="p | img | code | pre | a | em | b | strong | ol | ul | li | center | blockquote | table | tr | th | td | ruby | rb | rt | rp | span | figure | figcaption | mark | div | hr | abbr | sub | sup">
40
40
+
match="f:p | f:img | f:code | f:pre | f:em | f:strong | f:ol | f:ul | f:li | f:blockquote | table | tr | th | td | ruby | rb | rt | rp | span | figure | figcaption | mark | div | hr | abbr | sub | sup">
40
41
<xsl:copy>
41
42
<xsl:apply-templates select="node()|@*" />
42
43
</xsl:copy>
43
44
</xsl:template>
44
45
45
45
-
<xsl:template match="pause"></xsl:template>
46
46
+
<!-- <xsl:template match="pause"></xsl:template> -->
46
47
47
47
-
<xsl:template match="embedded-tex">
48
48
+
<xsl:template match="f:embedded-tex">
48
49
<center>
49
50
<img src="resources/{@hash}.svg" />
50
51
</center>
51
52
</xsl:template>
52
53
53
53
-
<xsl:template match="error">
54
54
+
<xsl:template match="f:error">
54
55
<span class="error">
55
56
<xsl:apply-templates />
56
57
</span>
57
58
</xsl:template>
58
59
59
59
-
<xsl:template match="tex[@display='block']">
60
60
+
<xsl:template match="f:tex[@f:display='block']">
60
61
<xsl:text>\[</xsl:text>
61
62
<xsl:value-of select="." />
62
63
<xsl:text>\]</xsl:text>
63
64
</xsl:template>
64
65
65
65
-
<xsl:template match="tex[not(@display='block')]">
66
66
+
<xsl:template match="f:tex[not(@f:display='block')]">
66
67
<xsl:text>\(</xsl:text>
67
68
<xsl:value-of select="." />
68
69
<xsl:text>\)</xsl:text>
···
74
75
<meta name="viewport" content="width=device-width" />
75
76
<link rel="stylesheet" href="style.css" />
76
77
<link rel="stylesheet" href="katex.min.css" />
77
77
-
<xsl:apply-templates select="/tree/frontmatter/rss" />
78
78
<script type="text/javascript">
79
79
-
<xsl:if test="/tree/frontmatter/source-path">
79
79
+
<xsl:if test="/f:tree/f:frontmatter/f:source-path">
80
80
<xsl:text>window.sourcePath = '</xsl:text>
81
81
-
<xsl:value-of select="/tree/frontmatter/source-path" />
81
81
+
<xsl:value-of select="/f:tree/f:frontmatter/f:source-path" />
82
82
<xsl:text>'</xsl:text>
83
83
</xsl:if>
84
84
</script>
85
85
<script type="module" src="forester.js"></script>
86
86
<title>
87
87
-
<xsl:value-of select="/tree/frontmatter/title" />
87
87
+
<xsl:value-of select="/f:tree/f:frontmatter/f:title" />
88
88
</title>
89
89
</head>
90
90
<body>
91
91
<ninja-keys placeholder="Start typing a note title or ID"></ninja-keys>
92
92
-
<xsl:if test="not(/tree[@root = 'true'])">
92
92
+
<xsl:if test="not(/f:tree[@f:root = 'true'])">
93
93
<header class="header">
94
94
<nav class="nav">
95
95
<div class="logo">
···
102
102
</xsl:if>
103
103
<div id="grid-wrapper">
104
104
<article>
105
105
-
<xsl:apply-templates select="tree" />
105
105
+
<xsl:apply-templates select="f:tree" />
106
106
</article>
107
107
<xsl:if
108
108
-
test="tree/mainmatter/tree[@toc='true'] and not(/tree/frontmatter/meta[@name = 'toc']/.='false')">
108
108
+
test="f:tree/f:mainmatter/f:tree[not(@f:toc='false')] and not(/f:tree/f:frontmatter/f:meta[@f:name = 'toc']/.='false')">
109
109
<nav id="toc">
110
110
<div class="block">
111
111
<h1>Table of Contents</h1>
112
112
-
<xsl:apply-templates select="tree/mainmatter" mode="toc" />
112
112
+
<xsl:apply-templates select="f:tree/f:mainmatter" mode="toc" />
113
113
</div>
114
114
</nav>
115
115
</xsl:if>
···
120
120
121
121
<xsl:template name="numbered-taxon">
122
122
<span class="taxon">
123
123
-
<xsl:apply-templates select="taxon" />
124
124
-
<xsl:if test="(../@numbered='true' and ../@toc='true' and count(../../tree) > 1) or number">
125
125
-
<xsl:if test="taxon">
123
123
+
<xsl:apply-templates select="f:taxon" />
124
124
+
<xsl:if test="(not(../@f:numbered='false') and not(../@f:toc='false') and count(../../f:tree) > 1) or f:number">
125
125
+
<xsl:if test="f:taxon">
126
126
<xsl:text> </xsl:text>
127
127
</xsl:if>
128
128
<xsl:choose>
129
129
-
<xsl:when test="number">
130
130
-
<xsl:value-of select="number" />
129
129
+
<xsl:when test="f:number">
130
130
+
<xsl:value-of select="f:number" />
131
131
</xsl:when>
132
132
<xsl:otherwise>
133
133
-
<xsl:number format="1.1" count="tree[@toc='true' and @numbered='true']" level="multiple" />
133
133
+
<xsl:number format="1.1" count="f:tree[ancestor::f:tree and not(@f:toc='false') and not(@f:numbered='false')]" level="multiple" />
134
134
</xsl:otherwise>
135
135
</xsl:choose>
136
136
</xsl:if>
137
137
<xsl:if
138
138
-
test="taxon or (../@numbered='true' and ../@toc='true' and count(../../tree) > 1) or number">
138
138
+
test="f:taxon or (not(../@f:numbered='false') and not(../@f:toc='false') and count(../../f:tree) > 1) or f:number">
139
139
<xsl:text>. </xsl:text>
140
140
</xsl:if>
141
141
</span>
142
142
</xsl:template>
143
143
144
144
-
<xsl:template match="tree" mode="toc">
144
144
+
<xsl:template match="f:tree" mode="toc">
145
145
<li>
146
146
-
<xsl:for-each select="frontmatter">
147
147
-
<a href="{route}" class="bullet" title="{title} [{addr}]">■</a>
148
148
-
<span class="link local" data-target="#tree-{anchor}">
146
146
+
<xsl:for-each select="f:frontmatter">
147
147
+
<a href="{f:route}" class="bullet" title="{f:title} [{f:addr}]">■</a>
148
148
+
<span class="link local" data-target="#tree-{f:anchor}">
149
149
<xsl:call-template name="numbered-taxon" />
150
150
-
<xsl:apply-templates select="title" />
150
150
+
<xsl:apply-templates select="f:title" />
151
151
</span>
152
152
</xsl:for-each>
153
153
-
<xsl:apply-templates select="mainmatter" mode="toc" />
153
153
+
<xsl:apply-templates select="f:mainmatter" mode="toc" />
154
154
</li>
155
155
</xsl:template>
156
156
157
157
-
<xsl:template match="mainmatter" mode="toc">
157
157
+
<xsl:template match="f:mainmatter" mode="toc">
158
158
<ul class="block">
159
159
-
<xsl:apply-templates select="tree[@toc='true']" mode="toc" />
159
159
+
<xsl:apply-templates select="f:tree[not(@f:toc='false')]" mode="toc" />
160
160
</ul>
161
161
</xsl:template>
162
162
163
163
-
<xsl:template match="frontmatter/title">
163
163
+
<xsl:template match="f:frontmatter/f:title">
164
164
<xsl:apply-templates />
165
165
</xsl:template>
166
166
167
167
-
<xsl:template match="mainmatter">
168
168
-
<div class="tree-content">
167
167
+
<xsl:template match="f:mainmatter">
168
168
+
<div class="f:tree-content">
169
169
<xsl:apply-templates />
170
170
</div>
171
171
</xsl:template>
172
172
173
173
-
<xsl:template match="addr">
174
174
-
<a class="slug" href="{../route}">
173
173
+
<xsl:template match="f:addr">
174
174
+
<a class="slug" href="{../f:route}">
175
175
<xsl:text>[</xsl:text>
176
176
<xsl:value-of select="." />
177
177
<xsl:text>]</xsl:text>
178
178
</a>
179
179
</xsl:template>
180
180
181
181
-
<xsl:template match="source-path">
181
181
+
<xsl:template match="f:source-path">
182
182
<a class="edit-button" href="{concat('vscode://file', .)}">
183
183
<xsl:text>[edit]</xsl:text>
184
184
</a>
185
185
</xsl:template>
186
186
187
187
-
<xsl:template match="taxon">
187
187
+
<xsl:template match="f:taxon">
188
188
<xsl:value-of select="." />
189
189
</xsl:template>
190
190
191
191
-
<xsl:template match="frontmatter">
191
191
+
<xsl:template match="f:frontmatter">
192
192
<header>
193
193
<h1>
194
194
<xsl:call-template name="numbered-taxon" />
195
195
-
<xsl:apply-templates select="title" />
195
195
+
<xsl:apply-templates select="f:title" />
196
196
<xsl:text> </xsl:text>
197
197
-
<xsl:apply-templates select="addr" />
197
197
+
<xsl:apply-templates select="f:addr" />
198
198
<xsl:text> </xsl:text>
199
199
-
<xsl:apply-templates select="source-path" />
199
199
+
<xsl:apply-templates select="f:source-path" />
200
200
</h1>
201
201
<div class="metadata">
202
202
<ul>
203
203
-
<xsl:apply-templates select="date" />
204
204
-
<xsl:if test="not(meta[@name = 'author']/.='false')">
205
205
-
<xsl:apply-templates select="authors" />
203
203
+
<xsl:apply-templates select="f:date" />
204
204
+
<xsl:if test="not(f:meta[@f:name = 'author']/.='false')">
205
205
+
<xsl:apply-templates select="f:authors" />
206
206
</xsl:if>
207
207
-
<xsl:apply-templates select="meta[@name='position']" />
208
208
-
<xsl:apply-templates select="meta[@name='institution']" />
209
209
-
<xsl:apply-templates select="meta[@name='venue']" />
210
210
-
<xsl:apply-templates select="meta[@name='source']" />
211
211
-
<xsl:apply-templates select="meta[@name='doi']" />
212
212
-
<xsl:apply-templates select="meta[@name='orcid']" />
213
213
-
<xsl:apply-templates select="meta[@name='external']" />
214
214
-
<xsl:apply-templates select="meta[@name='slides']" />
215
215
-
<xsl:apply-templates select="meta[@name='video']" />
207
207
+
<xsl:apply-templates select="f:meta[@f:name='position']" />
208
208
+
<xsl:apply-templates select="f:meta[@f:name='institution']" />
209
209
+
<xsl:apply-templates select="f:meta[@f:name='venue']" />
210
210
+
<xsl:apply-templates select="f:meta[@f:name='source']" />
211
211
+
<xsl:apply-templates select="f:meta[@f:name='doi']" />
212
212
+
<xsl:apply-templates select="f:meta[@f:name='orcid']" />
213
213
+
<xsl:apply-templates select="f:meta[@f:name='external']" />
214
214
+
<xsl:apply-templates select="f:meta[@f:name='slides']" />
215
215
+
<xsl:apply-templates select="f:meta[@f:name='video']" />
216
216
</ul>
217
217
</div>
218
218
</header>
219
219
</xsl:template>
220
220
221
221
-
<xsl:template match="tree" mode="tree-number">
221
221
+
<xsl:template match="f:tree" mode="tree-number">
222
222
<xsl:choose>
223
223
-
<xsl:when test="frontmatter/number">
224
224
-
<xsl:value-of select="frontmatter/number" />
223
223
+
<xsl:when test="f:frontmatter/f:number">
224
224
+
<xsl:value-of select="f:frontmatter/f:number" />
225
225
</xsl:when>
226
226
<xsl:otherwise>
227
227
-
<xsl:number format="1.1" count="tree[@toc='true' and @numbered='true']" level="multiple" />
227
227
+
<xsl:number format="1.1" count="f:tree[ancestor::f:tree and not(@f:toc='false') and not(@f:numbered='false')]" level="multiple" />
228
228
</xsl:otherwise>
229
229
</xsl:choose>
230
230
</xsl:template>
231
231
232
232
-
<xsl:template match="ref">
232
232
+
<xsl:template match="f:ref">
233
233
<a class="link local">
234
234
<xsl:attribute name="href">
235
235
<xsl:choose>
236
236
-
<xsl:when test="key('tree-with-addr',current()/@addr)">
236
236
+
<xsl:when test="key('tree-with-addr',current()/@f:addr)">
237
237
<xsl:text>#tree-</xsl:text>
238
238
-
<xsl:value-of select="key('tree-with-addr',current()/@addr)/frontmatter/anchor" />
238
238
+
<xsl:value-of select="key('tree-with-addr',current()/@f:addr)/f:frontmatter/f:anchor" />
239
239
</xsl:when>
240
240
<xsl:otherwise>
241
241
-
<xsl:value-of select="@href" />
241
241
+
<xsl:value-of select="@f:href" />
242
242
</xsl:otherwise>
243
243
</xsl:choose>
244
244
</xsl:attribute>
245
245
246
246
<xsl:choose>
247
247
-
<xsl:when test="@taxon">
248
248
-
<xsl:value-of select="@taxon" />
247
247
+
<xsl:when test="@f:taxon">
248
248
+
<xsl:value-of select="@f:taxon" />
249
249
</xsl:when>
250
250
<xsl:otherwise>§</xsl:otherwise>
251
251
</xsl:choose>
252
252
<xsl:text> </xsl:text>
253
253
<xsl:choose>
254
254
-
<xsl:when test="@number">
255
255
-
<xsl:value-of select="@number" />
254
254
+
<xsl:when test="@f:number">
255
255
+
<xsl:value-of select="@f:number" />
256
256
</xsl:when>
257
257
-
<xsl:when test="key('tree-with-addr',current()/@addr)[@numbered='true' and @toc='true']">
258
258
-
<xsl:apply-templates select="key('tree-with-addr',current()/@addr)[1]" mode="tree-number" />
257
257
+
<xsl:when test="key('tree-with-addr',current()/@f:addr)[not(@f:numbered='false') and not(@f:toc='false')]">
258
258
+
<xsl:apply-templates select="key('tree-with-addr',current()/@f:addr)[1]" mode="tree-number" />
259
259
</xsl:when>
260
260
<xsl:otherwise>
261
261
<xsl:text>[</xsl:text>
262
262
-
<xsl:value-of select="@addr" />
262
262
+
<xsl:value-of select="@f:addr" />
263
263
<xsl:text>]</xsl:text>
264
264
</xsl:otherwise>
265
265
</xsl:choose>
266
266
</a>
267
267
</xsl:template>
268
268
269
269
-
<xsl:template match="backmatter/references" mode="title">
269
269
+
<xsl:template match="f:backmatter/f:references" mode="title">
270
270
<xsl:text>References</xsl:text>
271
271
</xsl:template>
272
272
273
273
-
<xsl:template match="backmatter/context" mode="title">
273
273
+
<xsl:template match="f:backmatter/f:context" mode="title">
274
274
<xsl:text>Context</xsl:text>
275
275
</xsl:template>
276
276
277
277
-
<xsl:template match="backmatter/contributions" mode="title">
277
277
+
<xsl:template match="f:backmatter/f:contributions" mode="title">
278
278
<xsl:text>Contributions</xsl:text>
279
279
</xsl:template>
280
280
281
281
-
<xsl:template match="backmatter/related" mode="title">
281
281
+
<xsl:template match="f:backmatter/f:related" mode="title">
282
282
<xsl:text>Related</xsl:text>
283
283
</xsl:template>
284
284
285
285
-
<xsl:template match="backmatter/backlinks" mode="title">
285
285
+
<xsl:template match="f:backmatter/f:backlinks" mode="title">
286
286
<xsl:text>Backlinks</xsl:text>
287
287
</xsl:template>
288
288
289
289
-
<xsl:template match="backmatter/references|backmatter/context|backmatter/contributions|backmatter/related|backmatter/backlinks">
290
290
-
<xsl:if test="tree">
289
289
+
<xsl:template match="f:backmatter/f:references|f:backmatter/f:context|f:backmatter/f:contributions|f:backmatter/f:related|f:backmatter/f:backlinks">
290
290
+
<xsl:if test="f:tree">
291
291
<section class="block link-list">
292
292
<h2>
293
293
<xsl:apply-templates select="." mode="title" />
294
294
</h2>
295
295
-
<xsl:apply-templates select="tree" />
295
295
+
<xsl:apply-templates select="f:tree" />
296
296
</section>
297
297
</xsl:if>
298
298
</xsl:template>
299
299
300
300
-
<xsl:template match="/tree[@root!='true']/backmatter">
300
300
+
<xsl:template match="/f:tree[not(@root='true')]/f:backmatter">
301
301
<footer>
302
302
-
<xsl:apply-templates select="references" />
303
303
-
<xsl:apply-templates select="context" />
304
304
-
<xsl:apply-templates select="backlinks" />
305
305
-
<xsl:apply-templates select="related" />
306
306
-
<xsl:apply-templates select="contributions" />
302
302
+
<xsl:apply-templates select="f:references" />
303
303
+
<xsl:apply-templates select="f:context" />
304
304
+
<xsl:apply-templates select="f:backlinks" />
305
305
+
<xsl:apply-templates select="f:related" />
306
306
+
<xsl:apply-templates select="f:contributions" />
307
307
</footer>
308
308
</xsl:template>
309
309
310
310
-
<xsl:template match="/tree[@root='true']/backmatter">
310
310
+
<xsl:template match="/f:tree[@root='true']/f:backmatter">
311
311
</xsl:template>
312
312
313
313
-
<xsl:template match="tree">
313
313
+
<xsl:template match="f:tree">
314
314
<section>
315
315
<xsl:attribute name="lang">
316
316
<xsl:choose>
317
317
-
<xsl:when test="frontmatter/meta[@name='lang']">
318
318
-
<xsl:value-of select="frontmatter/meta[@name='lang']" />
317
317
+
<xsl:when test="f:frontmatter/f:meta[@f:name='lang']">
318
318
+
<xsl:value-of select="f:frontmatter/f:meta[@f:name='lang']" />
319
319
</xsl:when>
320
320
<xsl:otherwise>en</xsl:otherwise>
321
321
</xsl:choose>
322
322
</xsl:attribute>
323
323
324
324
<xsl:choose>
325
325
-
<xsl:when test="@show-metadata = 'false'">
325
325
+
<xsl:when test="@f:show-metadata = 'false'">
326
326
<xsl:attribute name="class">block hide-metadata</xsl:attribute>
327
327
</xsl:when>
328
328
<xsl:otherwise>
329
329
<xsl:attribute name="class">block</xsl:attribute>
330
330
</xsl:otherwise>
331
331
</xsl:choose>
332
332
-
<xsl:if test="frontmatter/taxon">
332
332
+
<xsl:if test="f:frontmatter/taxon">
333
333
<xsl:attribute name="data-taxon">
334
334
-
<xsl:value-of select="frontmatter/taxon" />
334
334
+
<xsl:value-of select="f:frontmatter/taxon" />
335
335
</xsl:attribute>
336
336
</xsl:if>
337
337
338
338
<xsl:choose>
339
339
-
<xsl:when test="@show-heading='true'">
340
340
-
<details id="{concat('tree-',frontmatter/anchor)}">
341
341
-
<xsl:if test="@expanded = 'true'">
339
339
+
<xsl:when test="not(@f:show-heading='false')">
340
340
+
<details id="{concat('tree-',f:frontmatter/f:anchor)}">
341
341
+
<xsl:if test="not(@f:expanded = 'false')">
342
342
<xsl:attribute name="open">open</xsl:attribute>
343
343
</xsl:if>
344
344
<summary>
345
345
-
<xsl:apply-templates select="frontmatter" />
345
345
+
<xsl:apply-templates select="f:frontmatter" />
346
346
</summary>
347
347
-
<xsl:apply-templates select="mainmatter" />
348
348
-
<xsl:apply-templates select="frontmatter/meta[@name='bibtex']" />
347
347
+
<xsl:apply-templates select="f:mainmatter" />
348
348
+
<xsl:apply-templates select="f:frontmatter/f:meta[@f:name='bibtex']" />
349
349
</details>
350
350
</xsl:when>
351
351
<xsl:otherwise>
352
352
-
<xsl:apply-templates select="mainmatter" />
352
352
+
<xsl:apply-templates select="f:mainmatter" />
353
353
</xsl:otherwise>
354
354
</xsl:choose>
355
355
</section>
356
356
357
357
-
<xsl:apply-templates select="backmatter" />
357
357
+
<xsl:apply-templates select="f:backmatter" />
358
358
</xsl:template>
359
359
360
360
-
<xsl:template match="backmatter/*/tree">
360
360
+
<xsl:template match="f:backmatter/*/f:tree">
361
361
<section class="block">
362
362
-
<xsl:if test="frontmatter/taxon">
362
362
+
<xsl:if test="f:frontmatter/f:taxon">
363
363
<xsl:attribute name="data-taxon">
364
364
-
<xsl:value-of select="frontmatter/taxon" />
364
364
+
<xsl:value-of select="f:frontmatter/f:taxon" />
365
365
</xsl:attribute>
366
366
</xsl:if>
367
367
<details>
368
368
<summary>
369
369
-
<xsl:apply-templates select="frontmatter" />
369
369
+
<xsl:apply-templates select="f:frontmatter" />
370
370
</summary>
371
371
-
<xsl:apply-templates select="mainmatter" />
371
371
+
<xsl:apply-templates select="f:mainmatter" />
372
372
</details>
373
373
</section>
374
374
</xsl:template>
+9
-9
links.xsl
···
1
1
<?xml version="1.0"?>
2
2
<!-- SPDX-License-Identifier: CC0-1.0 -->
3
3
-
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
3
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://www.jonmsterling.com/jms-005P.xml">
4
4
5
5
<!-- The purpose of this module is to perform flattening of nested links. -->
6
6
-
<xsl:template match="link">
7
7
-
<span class="link {@type}">
6
6
+
<xsl:template match="f:link">
7
7
+
<span class="link {@f:type}">
8
8
<xsl:apply-templates />
9
9
</span>
10
10
</xsl:template>
11
11
12
12
-
<xsl:template match="link//text()">
13
13
-
<a href="{ancestor::link[1]/@href}">
12
12
+
<xsl:template match="f:link//text()">
13
13
+
<a href="{ancestor::f:link[1]/@f:href}">
14
14
<xsl:choose>
15
15
-
<xsl:when test="ancestor::link[1]/@addr">
15
15
+
<xsl:when test="ancestor::f:link[1]/@f:addr">
16
16
<xsl:attribute name="title">
17
17
-
<xsl:value-of select="ancestor::link[1]/@title" />
17
17
+
<xsl:value-of select="ancestor::f:link[1]/@f:title" />
18
18
<xsl:text> [</xsl:text>
19
19
<xsl:value-of
20
20
-
select="ancestor::link[1]/@addr" />
20
20
+
select="ancestor::f:link[1]/@f:addr" />
21
21
<xsl:text>]</xsl:text>
22
22
</xsl:attribute>
23
23
</xsl:when>
24
24
<xsl:otherwise>
25
25
<xsl:attribute name="title">
26
26
-
<xsl:value-of select="ancestor::link[1]/@title" />
26
26
+
<xsl:value-of select="ancestor::f:link[1]/@f:title" />
27
27
</xsl:attribute>
28
28
</xsl:otherwise>
29
29
</xsl:choose>
+34
-34
metadata.xsl
···
1
1
<?xml version="1.0"?>
2
2
<!-- SPDX-License-Identifier: CC0-1.0 -->
3
3
-
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
3
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://www.jonmsterling.com/jms-005P.xml">
4
4
5
5
-
<xsl:template match="month[.='1']">
5
5
+
<xsl:template match="f:month[.='1']">
6
6
<xsl:text>January</xsl:text>
7
7
</xsl:template>
8
8
9
9
-
<xsl:template match="month[.='2']">
9
9
+
<xsl:template match="f:month[.='2']">
10
10
<xsl:text>February</xsl:text>
11
11
</xsl:template>
12
12
13
13
-
<xsl:template match="month[.='3']">
13
13
+
<xsl:template match="f:month[.='3']">
14
14
<xsl:text>March</xsl:text>
15
15
</xsl:template>
16
16
17
17
-
<xsl:template match="month[.='4']">
17
17
+
<xsl:template match="f:month[.='4']">
18
18
<xsl:text>April</xsl:text>
19
19
</xsl:template>
20
20
21
21
-
<xsl:template match="month[.='5']">
21
21
+
<xsl:template match="f:month[.='5']">
22
22
<xsl:text>May</xsl:text>
23
23
</xsl:template>
24
24
25
25
-
<xsl:template match="month[.='6']">
25
25
+
<xsl:template match="f:month[.='6']">
26
26
<xsl:text>June</xsl:text>
27
27
</xsl:template>
28
28
29
29
-
<xsl:template match="month[.='7']">
29
29
+
<xsl:template match="f:month[.='7']">
30
30
<xsl:text>July</xsl:text>
31
31
</xsl:template>
32
32
33
33
-
<xsl:template match="month[.='8']">
33
33
+
<xsl:template match="f:month[.='8']">
34
34
<xsl:text>August</xsl:text>
35
35
</xsl:template>
36
36
37
37
-
<xsl:template match="month[.='9']">
37
37
+
<xsl:template match="f:month[.='9']">
38
38
<xsl:text>September</xsl:text>
39
39
</xsl:template>
40
40
41
41
-
<xsl:template match="month[.='10']">
41
41
+
<xsl:template match="f:month[.='10']">
42
42
<xsl:text>October</xsl:text>
43
43
</xsl:template>
44
44
45
45
-
<xsl:template match="month[.='11']">
45
45
+
<xsl:template match="f:month[.='11']">
46
46
<xsl:text>November</xsl:text>
47
47
</xsl:template>
48
48
49
49
-
<xsl:template match="month[.='12']">
49
49
+
<xsl:template match="f:month[.='12']">
50
50
<xsl:text>December</xsl:text>
51
51
</xsl:template>
52
52
53
53
-
<xsl:template match="year">
53
53
+
<xsl:template match="f:year">
54
54
<xsl:apply-templates />
55
55
</xsl:template>
56
56
57
57
-
<xsl:template match="day">
57
57
+
<xsl:template match="f:day">
58
58
<xsl:apply-templates />
59
59
</xsl:template>
60
60
61
61
-
<xsl:template match="date" mode="date-inner">
62
62
-
<xsl:apply-templates select="month" />
63
63
-
<xsl:if test="day">
61
61
+
<xsl:template match="f:date" mode="date-inner">
62
62
+
<xsl:apply-templates select="f:month" />
63
63
+
<xsl:if test="f:day">
64
64
<xsl:text> </xsl:text>
65
65
-
<xsl:apply-templates select="day" />
65
65
+
<xsl:apply-templates select="f:day" />
66
66
</xsl:if>
67
67
-
<xsl:if test="month">
67
67
+
<xsl:if test="f:month">
68
68
<xsl:text>, </xsl:text>
69
69
</xsl:if>
70
70
-
<xsl:apply-templates select="year" />
70
70
+
<xsl:apply-templates select="f:year" />
71
71
</xsl:template>
72
72
73
73
-
<xsl:template match="date[@href]">
73
73
+
<xsl:template match="f:date[@f:href]">
74
74
<li class="meta-item">
75
75
-
<a class="link local" href="{@href}">
75
75
+
<a class="link local" href="{@f:href}">
76
76
<xsl:apply-templates select="." mode="date-inner" />
77
77
</a>
78
78
</li>
79
79
</xsl:template>
80
80
81
81
-
<xsl:template match="date[not(@href)]">
81
81
+
<xsl:template match="f:date[not(@f:href)]">
82
82
<li class="meta-item">
83
83
<xsl:apply-templates select="." mode="date-inner" />
84
84
</li>
85
85
</xsl:template>
86
86
87
87
-
<xsl:template match="authors">
87
87
+
<xsl:template match="f:authors">
88
88
<li class="meta-item">
89
89
<address class="author">
90
90
-
<xsl:for-each select="author">
90
90
+
<xsl:for-each select="f:author">
91
91
<xsl:apply-templates />
92
92
<xsl:if test="position()!=last()">
93
93
<xsl:text>,  </xsl:text>
···
95
95
</xsl:for-each>
96
96
<xsl:if test="contributor">
97
97
<xsl:text> with contributions from </xsl:text>
98
98
-
<xsl:for-each select="contributor">
98
98
+
<xsl:for-each select="f:contributor">
99
99
<xsl:apply-templates />
100
100
<xsl:if test="position()!=last()">
101
101
<xsl:text>, </xsl:text>
···
106
106
</li>
107
107
</xsl:template>
108
108
109
109
-
<xsl:template match="meta[@name='doi']">
109
109
+
<xsl:template match="f:meta[@f:name='doi']">
110
110
<li class="meta-item">
111
111
<a class="doi link" href="{concat('https://www.doi.org/', .)}">
112
112
<xsl:value-of select="." />
···
114
114
</li>
115
115
</xsl:template>
116
116
117
117
-
<xsl:template match="meta[@name='orcid']">
117
117
+
<xsl:template match="f:meta[@f:name='orcid']">
118
118
<li class="meta-item">
119
119
<a class="orcid" href="{concat('https://orcid.org/', .)}">
120
120
<xsl:value-of select="." />
···
122
122
</li>
123
123
</xsl:template>
124
124
125
125
-
<xsl:template match="meta[@name='bibtex']">
125
125
+
<xsl:template match="f:meta[@f:name='bibtex']">
126
126
<pre>
127
127
<xsl:value-of select="." />
128
128
</pre>
129
129
</xsl:template>
130
130
131
131
<xsl:template
132
132
-
match="meta[@name='venue']|meta[@name='position']|meta[@name='institution']|meta[@name='source']">
132
132
+
match="f:meta[@f:name='venue']|f:meta[@f:name='position']|f:meta[@f:name='institution']|f:meta[@f:name='source']">
133
133
<li class="meta-item">
134
134
<xsl:apply-templates />
135
135
</li>
136
136
</xsl:template>
137
137
138
138
-
<xsl:template match="meta[@name='external']">
138
138
+
<xsl:template match="f:meta[@f:name='external']">
139
139
<li class="meta-item">
140
140
<a class="link external" href="{.}">
141
141
<xsl:value-of select="." />
···
143
143
</li>
144
144
</xsl:template>
145
145
146
146
-
<xsl:template match="meta[@name='slides']">
146
146
+
<xsl:template match="f:meta[@f:name='slides']">
147
147
<li class="meta-item">
148
148
<a class="link external" href="{.}">
149
149
<xsl:text>Slides</xsl:text>
···
151
151
</li>
152
152
</xsl:template>
153
153
154
154
-
<xsl:template match="meta[@name='video']">
154
154
+
<xsl:template match="f:meta[@f:name='video']">
155
155
<li class="meta-item">
156
156
<a class="link external" href="{.}">
157
157
<xsl:text>Video</xsl:text>