source: BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/biblio-iso690.xsl@ 2ff8f62

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 2ff8f62 was f8c4e94, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS XSL Stylesheets.

  • Property mode set to 100644
File size: 55.2 KB
RevLine 
[f8c4e94]1<?xml version="1.0" encoding="ASCII"?>
2<!--This file was created automatically by html2xhtml-->
3<!--from the HTML stylesheets.-->
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6
7<!-- ********************************************************************
8 $Id$
9 ********************************************************************
10
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://docbook.sf.net/release/xsl/current/ for
13 copyright and other information.
14
15 The original code for processing bibliography in ISO690 style
16 was provided by Jana Dvorakova <jana4u@seznam.cz>
17
18 ******************************************************************** -->
19
20<!-- ==================================================================== -->
21
22<!-- if biblioentry.alt.primary.seps is set to nonzero value then use alternative separators for primary responsibility - $alt.person.two.sep, $alt.person.last.sep, $alt.person.more.sep -->
23<xsl:param name="biblioentry.alt.primary.seps" select="0"/>
24
25<!-- how many authors will be printed if there is more than three authors - set to number 1 (default value), 2 or 3 -->
26<xsl:param name="biblioentry.primary.count" select="1"/>
27
28<!-- ==================================================================== -->
29
30<xsl:template name="iso690.makecitation">
31<!-- Types of resources -->
32 <xsl:choose>
33
34 <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ENTIRE MESSAGE SYSTEM -->
35 <!-- same as Monographs -->
36 <xsl:when test="./@role='messagesystem'">
37 <xsl:call-template name="iso690.monogr"/>
38 </xsl:when>
39
40 <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ELECTRONIC MESSAGES -->
41 <!-- same as Contributions to Monographs -->
42 <xsl:when test="./@role='message'">
43 <xsl:call-template name="iso690.paper.mon"/>
44 </xsl:when>
45
46 <!-- SERIALS -->
47 <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
48 <xsl:call-template name="iso690.serial"/>
49 </xsl:when>
50
51 <!-- PARTS OF MONOGRAPHS -->
52 <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
53 <xsl:call-template name="iso690.monogr.part"/>
54 </xsl:when>
55
56 <!-- CONTRIBUTIONS TO MONOGRAPHS -->
57 <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
58 <xsl:call-template name="iso690.paper.mon"/>
59 </xsl:when>
60
61 <!-- ARTICLES, ETC., IN SERIALS -->
62 <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
63 <xsl:call-template name="iso690.article"/>
64 </xsl:when>
65
66 <!-- PATENT DOCUMENTS -->
67 <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
68 <xsl:call-template name="iso690.patent"/>
69 </xsl:when>
70
71 <!-- MONOGRAPHS -->
72 <xsl:otherwise>
73 <xsl:call-template name="iso690.monogr"/>
74 </xsl:otherwise>
75
76 </xsl:choose>
77</xsl:template>
78
79<!-- ==================================================================== -->
80
81<!-- MONOGRAPHS -->
82<xsl:template name="iso690.monogr">
83 <!-- Primary responsibility -->
84 <xsl:call-template name="iso690.primary"/>
85 <!-- Title and Type of medium -->
86 <xsl:call-template name="iso690.title"/>
87 <!-- Subordinate responsibility -->
88 <xsl:call-template name="iso690.secondary"/>
89 <!-- Edition -->
90 <xsl:call-template name="iso690.edition"/>
91 <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
92 <xsl:call-template name="iso690.pub"/>
93 <!-- Extent -->
94 <xsl:call-template name="iso690.extent"/>
95 <!-- Series -->
96 <xsl:call-template name="iso690.serie"/>
97 <!-- Notes -->
98 <xsl:call-template name="iso690.notice"/>
99 <!-- Avaibility and access -->
100 <xsl:call-template name="iso690.access"/>
101 <!-- Standard number -->
102 <xsl:call-template name="iso690.isbn"/>
103</xsl:template>
104
105<!-- SERIALS -->
106<xsl:template name="iso690.serial">
107 <!-- Title and Type of medium -->
108 <xsl:call-template name="iso690.title"/>
109 <!-- Responsibility [nonEL] -->
110 <xsl:if test="not(./bibliomisc[@role='medium'])">
111 <xsl:call-template name="iso690.secondary"/>
112 </xsl:if>
113 <!-- Edition -->
114 <xsl:call-template name="iso690.edition">
115 <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
116 </xsl:call-template>
117 <!-- Issue designation (date and/or num) [nonEL] -->
118 <xsl:if test="not(./bibliomisc[@role='medium'])">
119 <xsl:call-template name="iso690.issuing"/>
120 </xsl:if>
121 <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
122 <xsl:call-template name="iso690.pub"/>
123 <!-- Series -->
124 <xsl:call-template name="iso690.serie"/>
125 <!-- Notes -->
126 <xsl:call-template name="iso690.notice"/>
127 <!-- Avaibility and access -->
128 <xsl:call-template name="iso690.access"/>
129 <!-- Standard number -->
130 <xsl:call-template name="iso690.issn"/>
131</xsl:template>
132
133<!-- PARTS OF MONOGRAPHS -->
134<xsl:template name="iso690.monogr.part">
135 <!-- Primary responsibility of host document -->
136 <xsl:call-template name="iso690.primary"/>
137 <!-- Title and Type of medium of host document -->
138 <xsl:call-template name="iso690.title"/>
139 <!-- Subordinate responsibility of host document [EL] -->
140 <xsl:if test="./bibliomisc[@role='medium']">
141 <xsl:call-template name="iso690.secondary"/>
142 </xsl:if>
143 <!-- Edition -->
144 <xsl:call-template name="iso690.edition">
145 <xsl:with-param name="after" select="./volumenum"/>
146 </xsl:call-template>
147 <!-- Numeration of the part [nonEL]-->
148 <xsl:if test="not(./bibliomisc[@role='medium'])">
149 <xsl:call-template name="iso690.partnr"/>
150 <!-- Subordinate responsibility [nonEL] -->
151 <xsl:call-template name="iso690.secondary"/>
152 </xsl:if>
153 <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
154 <xsl:call-template name="iso690.pub"/>
155 <!-- Location within host -->
156 <xsl:call-template name="iso690.part.location"/>
157 <xsl:if test="./bibliomisc[@role='medium']">
158 <!-- Numeration within host document [EL] -->
159 <!-- Notes [EL] -->
160 <xsl:call-template name="iso690.notice"/>
161 <!-- Avaibility and access [EL] -->
162 <xsl:call-template name="iso690.access"/>
163 <!-- Standard number [EL] -->
164 <xsl:call-template name="iso690.isbn"/>
165 </xsl:if>
166</xsl:template>
167
168<!-- CONTRIBUTIONS TO MONOGRAPHS -->
169<xsl:template name="iso690.paper.mon">
170<!-- Contribution -->
171 <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
172<!-- In -->
173 <xsl:text>In </xsl:text>
174<!-- Host -->
175 <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
176</xsl:template>
177
178<xsl:template match="biblioset" mode="iso690.paper.part">
179<!-- Contribution -->
180 <!-- Primary responsibility -->
181 <xsl:call-template name="iso690.primary"/>
182 <!-- Title -->
183 <xsl:call-template name="iso690.title">
184 <xsl:with-param name="italic" select="0"/>
185 </xsl:call-template>
186</xsl:template>
187
188<xsl:template match="biblioset" mode="iso690.paper.book">
189<!-- Host -->
190 <!-- Primary responsibility -->
191 <xsl:call-template name="iso690.primary"/>
192 <!-- Title and Type of medium -->
193 <xsl:call-template name="iso690.title"/>
194 <!-- Subordinate responsibility [EL] -->
195 <xsl:if test="./bibliomisc[@role='medium']">
196 <xsl:call-template name="iso690.secondary"/>
197 </xsl:if>
198 <!-- Edition -->
199 <xsl:call-template name="iso690.edition"/>
200 <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
201 <xsl:call-template name="iso690.paper.pub"/>
202 <!-- Numeration within host document [EL] -->
203 <!-- Location within host -->
204 <xsl:call-template name="iso690.location"/>
205 <xsl:if test="./bibliomisc[@role='medium']">
206 <!-- Notes [EL] -->
207 <xsl:call-template name="iso690.notice"/>
208 <!-- Avaibility and access [EL] -->
209 <xsl:call-template name="iso690.access"/>
210 <!-- Standard number [EL] -->
211 <xsl:call-template name="iso690.isbn"/>
212 </xsl:if>
213</xsl:template>
214
215<!-- ARTICLES, ETC., IN SERIALS -->
216<xsl:template name="iso690.article">
217<!-- Article -->
218 <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
219<!-- Serial -->
220 <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
221</xsl:template>
222
223<xsl:template match="biblioset" mode="iso690.article.art">
224<!-- Article -->
225 <!-- Primary responsibility -->
226 <xsl:call-template name="iso690.primary"/>
227 <!-- Title -->
228 <xsl:call-template name="iso690.title">
229 <xsl:with-param name="italic" select="0"/>
230 </xsl:call-template>
231 <!-- Subordinate responsibility [nonEL] -->
232 <xsl:if test="not(../*/bibliomisc[@role='medium'])">
233 <xsl:call-template name="iso690.secondary"/>
234 </xsl:if>
235</xsl:template>
236
237<xsl:template match="biblioset" mode="iso690.article.jour">
238<!-- Serial -->
239 <!-- Title and Type of medium -->
240 <xsl:call-template name="iso690.title"/>
241 <!-- Edition -->
242 <xsl:call-template name="iso690.edition">
243 <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
244 </xsl:call-template>
245 <!-- Number designation [EL] -->
246 <!-- Location within host -->
247 <xsl:call-template name="iso690.article.location"/>
248 <xsl:if test="./bibliomisc[@role='medium']">
249 <!-- Notes [EL] -->
250 <xsl:call-template name="iso690.notice"/>
251 <!-- Avaibility and access [EL] -->
252 <xsl:call-template name="iso690.access"/>
253 <!-- Standard number [EL] -->
254 <xsl:call-template name="iso690.issn"/>
255 </xsl:if>
256</xsl:template>
257
258<!-- PATENT DOCUMENTS -->
259<xsl:template name="iso690.patent">
260 <!-- Primary responsibility (applicant) -->
261 <xsl:call-template name="iso690.primary"/>
262 <!-- Title of the invention -->
263 <xsl:call-template name="iso690.title"/>
264 <!-- Subordinate responsibility -->
265 <xsl:call-template name="iso690.secondary"/>
266 <!-- Notes -->
267 <xsl:call-template name="iso690.notice"/>
268 <!-- Identification -->
269 <xsl:call-template name="iso690.pat.ident"/>
270</xsl:template>
271
272<!-- ==================================================================== -->
273<!-- Elements -->
274
275<!-- Primary responsibility -->
276<xsl:template name="iso690.primary">
277 <xsl:param name="primary.sep">
278 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
279 </xsl:param>
280 <xsl:choose>
281 <xsl:when test="./authorgroup/author|./author">
282 <xsl:call-template name="iso690.author.list">
283 <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
284 </xsl:call-template>
285 </xsl:when>
286 <xsl:when test="./authorgroup/editor|./editor">
287 <xsl:call-template name="iso690.author.list">
288 <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
289 </xsl:call-template>
290 </xsl:when>
291 <xsl:when test="./authorgroup/corpauthor|./corpauthor">
292 <xsl:call-template name="iso690.author.list">
293 <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
294 </xsl:call-template>
295 </xsl:when>
296 <xsl:otherwise>
297 <xsl:if test="(./firstname)and(./surname)">
298 <xsl:call-template name="iso690.author"/>
299 <xsl:call-template name="iso690.endsep">
300 <xsl:with-param name="text" select="string(./firstname[1])"/>
301 <xsl:with-param name="sep" select="$primary.sep"/>
302 </xsl:call-template>
303 </xsl:if>
304 </xsl:otherwise>
305 </xsl:choose>
306</xsl:template>
307
308<xsl:template name="iso690.author.list">
309 <xsl:param name="person.list" select="author|corpauthor|editor"/>
310 <xsl:param name="person.count" select="count($person.list)"/>
311 <xsl:param name="count" select="1"/>
312 <xsl:param name="group" select="./authorgroup[@role='many']"/>
313 <xsl:param name="many" select="0"/>
314
315 <xsl:param name="primary.many">
316 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.many'"/></xsl:call-template>
317 </xsl:param>
318 <xsl:param name="primary.editor">
319 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.editor'"/></xsl:call-template>
320 </xsl:param>
321 <xsl:param name="primary.sep">
322 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
323 </xsl:param>
324
325 <xsl:choose>
326 <xsl:when test="$count &gt; $person.count"/>
327 <xsl:otherwise>
328 <xsl:choose>
329 <xsl:when test="$person.count &lt; 4 and not($group)">
330 <xsl:call-template name="iso690.author">
331 <xsl:with-param name="node" select="$person.list[position()=$count]"/>
332 </xsl:call-template>
333 <xsl:choose>
334 <xsl:when test="$person.count = 2 and $count = 1 and $biblioentry.alt.primary.seps != 0">
335 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.two.sep'"/></xsl:call-template>
336 </xsl:when>
337 <xsl:when test="$person.count = 2 and $count = 1">
338 <xsl:call-template name="gentext.template">
339 <xsl:with-param name="context" select="'authorgroup'"/>
340 <xsl:with-param name="name" select="'sep2'"/>
341 </xsl:call-template>
342 </xsl:when>
343 <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count and $biblioentry.alt.primary.seps != 0">
344 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.last.sep'"/></xsl:call-template>
345 </xsl:when>
346 <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
347 <xsl:call-template name="gentext.template">
348 <xsl:with-param name="context" select="'authorgroup'"/>
349 <xsl:with-param name="name" select="'seplast'"/>
350 </xsl:call-template>
351 </xsl:when>
352 <xsl:when test="$count &lt; $person.count and $biblioentry.alt.primary.seps != 0">
353 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.more.sep'"/></xsl:call-template>
354 </xsl:when>
355 <xsl:when test="$count &lt; $person.count">
356 <xsl:call-template name="gentext.template">
357 <xsl:with-param name="context" select="'authorgroup'"/>
358 <xsl:with-param name="name" select="'sep'"/>
359 </xsl:call-template>
360 </xsl:when>
361 <xsl:when test="($count = $person.count)">
362 <xsl:choose>
363 <xsl:when test="$many!=0">
364 <xsl:if test="name($person.list[position()=$count])='editor'">
365 <xsl:value-of select="$primary.editor"/>
366 </xsl:if>
367 <xsl:value-of select="$primary.many"/>
368 <xsl:call-template name="iso690.endsep">
369 <xsl:with-param name="text" select="$primary.many"/>
370 <xsl:with-param name="sep" select="$primary.sep"/>
371 </xsl:call-template>
372 </xsl:when>
373 <xsl:when test="name($person.list[position()=$count])='editor'">
374 <xsl:value-of select="$primary.editor"/>
375 <xsl:value-of select="$primary.sep"/>
376 </xsl:when>
377 <xsl:when test="name($person.list[position()=$count])='corpauthor'">
378 <xsl:call-template name="iso690.endsep">
379 <xsl:with-param name="text" select="string($person.list[position()=$count])"/>
380 <xsl:with-param name="sep" select="$primary.sep"/>
381 </xsl:call-template>
382 </xsl:when>
383 <xsl:otherwise>
384 <xsl:call-template name="iso690.endsep">
385 <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
386 <xsl:with-param name="sep" select="$primary.sep"/>
387 </xsl:call-template>
388 </xsl:otherwise>
389 </xsl:choose>
390 </xsl:when>
391 </xsl:choose>
392
393 <xsl:call-template name="iso690.author.list">
394 <xsl:with-param name="person.list" select="$person.list"/>
395 <xsl:with-param name="person.count" select="$person.count"/>
396 <xsl:with-param name="count" select="$count+1"/>
397 <xsl:with-param name="many" select="$many"/>
398 <xsl:with-param name="group"/>
399 </xsl:call-template>
400 </xsl:when>
401
402 <xsl:otherwise>
403 <xsl:choose>
404 <xsl:when test="($biblioentry.primary.count&gt;=3) and ($person.count&gt;=3)">
405 <xsl:call-template name="iso690.author.list">
406 <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]|$person.list[3]"/>
407 <xsl:with-param name="person.count" select="3"/>
408 <xsl:with-param name="count" select="1"/>
409 <xsl:with-param name="many" select="1"/>
410 <xsl:with-param name="group"/>
411 </xsl:call-template>
412 </xsl:when>
413 <xsl:when test="($biblioentry.primary.count&gt;1) and ($person.count&gt;1)">
414 <xsl:call-template name="iso690.author.list">
415 <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]"/>
416 <xsl:with-param name="person.count" select="2"/>
417 <xsl:with-param name="count" select="1"/>
418 <xsl:with-param name="many" select="1"/>
419 <xsl:with-param name="group"/>
420 </xsl:call-template>
421 </xsl:when>
422 <xsl:otherwise>
423 <xsl:call-template name="iso690.author.list">
424 <xsl:with-param name="person.list" select="$person.list[1]"/>
425 <xsl:with-param name="person.count" select="1"/>
426 <xsl:with-param name="count" select="1"/>
427 <xsl:with-param name="many" select="1"/>
428 <xsl:with-param name="group"/>
429 </xsl:call-template>
430 </xsl:otherwise>
431 </xsl:choose>
432 </xsl:otherwise>
433 </xsl:choose>
434 </xsl:otherwise>
435 </xsl:choose>
436</xsl:template>
437
438<xsl:template name="iso690.author">
439 <xsl:param name="node" select="."/>
440 <xsl:param name="lastfirst.sep">
441 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'lastfirst.sep'"/></xsl:call-template>
442 </xsl:param>
443 <xsl:choose>
444 <xsl:when test="name($node)!='corpauthor'">
445 <span style="text-transform:uppercase">
446 <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
447 </span>
448 <xsl:if test="$node//surname and $node//firstname">
449 <xsl:value-of select="$lastfirst.sep"/>
450 </xsl:if>
451 <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
452 </xsl:when>
453 <xsl:otherwise>
454 <span style="text-transform:uppercase">
455 <xsl:apply-templates mode="iso690.mode" select="$node"/>
456 </span>
457 </xsl:otherwise>
458 </xsl:choose>
459</xsl:template>
460
461<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
462 <xsl:apply-templates mode="iso690.mode"/>
463</xsl:template>
464
465<!-- Title and Type of medium -->
466<xsl:template name="iso690.title">
467 <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
468 <xsl:param name="italic" select="1"/>
469 <xsl:param name="sep">
470 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
471 </xsl:param>
472
473 <xsl:apply-templates mode="iso690.mode" select="./title">
474 <xsl:with-param name="medium" select="$medium"/>
475 <xsl:with-param name="italic" select="$italic"/>
476 <xsl:with-param name="sep" select="$sep"/>
477 </xsl:apply-templates>
478</xsl:template>
479
480<xsl:template match="title" mode="iso690.mode">
481 <xsl:param name="medium"/>
482 <xsl:param name="italic" select="1"/>
483 <xsl:param name="sep">
484 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
485 </xsl:param>
486 <xsl:param name="medium1">
487 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium1'"/></xsl:call-template>
488 </xsl:param>
489 <xsl:param name="medium2">
490 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium2'"/></xsl:call-template>
491 </xsl:param>
492 <xsl:choose>
493 <xsl:when test="$italic=1">
494 <xsl:call-template name="iso690.italic.title"/>
495 </xsl:when>
496 <xsl:otherwise>
497 <xsl:call-template name="iso690.make.title"/>
498 </xsl:otherwise>
499 </xsl:choose>
500 <xsl:if test="$medium">
501 <xsl:value-of select="$medium1"/>
502 <xsl:apply-templates mode="iso690.mode" select="$medium"/>
503 <xsl:value-of select="$medium2"/>
504 </xsl:if>
505 <xsl:call-template name="iso690.endsep">
506 <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
507 <xsl:with-param name="sep" select="$sep"/>
508 </xsl:call-template>
509</xsl:template>
510
511<xsl:template name="iso690.italic.title">
512 <i>
513 <xsl:call-template name="iso690.make.title"/>
514 </i>
515</xsl:template>
516
517<xsl:template name="iso690.make.title">
518 <xsl:param name="submaintitle.sep">
519 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
520 </xsl:param>
521 <xsl:apply-templates mode="iso690.mode"/>
522 <xsl:if test="../subtitle">
523 <xsl:value-of select="$submaintitle.sep"/>
524 <xsl:apply-templates mode="iso690.mode" select="../subtitle"/>
525 </xsl:if>
526</xsl:template>
527
528<xsl:template match="subtitle" mode="iso690.mode">
529 <xsl:apply-templates mode="iso690.mode"/>
530</xsl:template>
531
532<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
533 <xsl:apply-templates mode="iso690.mode"/>
534</xsl:template>
535
536<!-- Subordinate responsibility -->
537<xsl:template name="iso690.secondary">
538 <xsl:param name="secondary.sep">
539 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.sep'"/></xsl:call-template>
540 </xsl:param>
541 <xsl:param name="secondary.person.sep">
542 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
543 </xsl:param>
544 <xsl:for-each select="./bibliomisc[@role='secondary']">
545 <xsl:apply-templates mode="iso690.mode" select="."/>
546 <xsl:choose>
547 <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
548 <xsl:call-template name="iso690.endsep">
549 <xsl:with-param name="text" select="string(.)"/>
550 <xsl:with-param name="sep" select="$secondary.sep"/>
551 </xsl:call-template>
552 </xsl:when>
553 <xsl:otherwise>
554 <xsl:value-of select="$secondary.person.sep"/>
555 </xsl:otherwise>
556 </xsl:choose>
557 </xsl:for-each>
558</xsl:template>
559
560<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
561 <xsl:apply-templates mode="iso690.mode"/>
562</xsl:template>
563
564<!-- Edition -->
565<xsl:template name="iso690.edition">
566 <xsl:param name="after"/>
567 <xsl:param name="edition.serial.sep">
568 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.serial.sep'"/></xsl:call-template>
569 </xsl:param>
570 <xsl:choose>
571 <xsl:when test="string($after)!=''">
572 <xsl:apply-templates mode="iso690.mode" select="./edition">
573 <xsl:with-param name="sep" select="$edition.serial.sep"/>
574 </xsl:apply-templates>
575 </xsl:when>
576 <xsl:otherwise>
577 <xsl:apply-templates mode="iso690.mode" select="./edition"/>
578 </xsl:otherwise>
579 </xsl:choose>
580</xsl:template>
581
582<xsl:template match="edition" mode="iso690.mode">
583 <xsl:param name="sep">
584 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
585 </xsl:param>
586 <xsl:apply-templates mode="iso690.mode"/>
587 <xsl:call-template name="iso690.endsep">
588 <xsl:with-param name="text" select="string(.)"/>
589 <xsl:with-param name="sep" select="$sep"/>
590 </xsl:call-template>
591</xsl:template>
592
593<!-- Issue designation (date and/or num) -->
594<xsl:template name="iso690.issuing">
595 <xsl:param name="issuing.div">
596 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
597 </xsl:param>
598 <xsl:param name="issuing.range">
599 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
600 </xsl:param>
601 <xsl:param name="issuing.sep">
602 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
603 </xsl:param>
604 <xsl:choose>
605 <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
606 <xsl:call-template name="iso690.issuedate"/>
607 <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
608 <xsl:with-param name="sep" select="$issuing.div"/>
609 </xsl:apply-templates>
610 <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
611 <xsl:with-param name="sep" select="$issuing.range"/>
612 </xsl:apply-templates>
613 <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
614 <xsl:with-param name="sep" select="$issuing.div"/>
615 </xsl:apply-templates>
616 <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
617 <xsl:with-param name="sep" select="$issuing.sep"/>
618 </xsl:apply-templates>
619 </xsl:when>
620 <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
621 <xsl:call-template name="iso690.issuedate"/>
622 <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
623 <xsl:with-param name="sep" select="$issuing.range"/>
624 </xsl:apply-templates>
625 <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
626 <xsl:with-param name="sep" select="$issuing.sep"/>
627 </xsl:apply-templates>
628 </xsl:when>
629 <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
630 <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
631 <xsl:with-param name="sep" select="$issuing.div"/>
632 </xsl:apply-templates>
633 <xsl:apply-templates mode="iso690.mode" select="./volumenum">
634 <xsl:with-param name="sep" select="$issuing.div"/>
635 </xsl:apply-templates>
636 <xsl:apply-templates mode="iso690.mode" select="./issuenum">
637 <xsl:with-param name="sep" select="$issuing.sep"/>
638 </xsl:apply-templates>
639 </xsl:when>
640 <xsl:when test="./pubdate[@role='issuing']">
641 <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
642 <xsl:with-param name="sep" select="$issuing.sep"/>
643 </xsl:apply-templates>
644 </xsl:when>
645 <xsl:when test="./volumenum">
646 <xsl:apply-templates mode="iso690.mode" select="./volumenum">
647 <xsl:with-param name="sep" select="$issuing.sep"/>
648 </xsl:apply-templates>
649 </xsl:when>
650 <xsl:when test="./issuenum">
651 <xsl:apply-templates mode="iso690.mode" select="./issuenum">
652 <xsl:with-param name="sep" select="$issuing.sep"/>
653 </xsl:apply-templates>
654 </xsl:when>
655 </xsl:choose>
656</xsl:template>
657
658<xsl:template name="iso690.issuedate">
659 <xsl:param name="issuing.div">
660 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
661 </xsl:param>
662 <xsl:param name="issuing.range">
663 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
664 </xsl:param>
665 <xsl:param name="issuing.sep">
666 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
667 </xsl:param>
668 <xsl:choose>
669 <xsl:when test="./pubdate[@role='issuing'][2]">
670 <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
671 <xsl:with-param name="sep" select="$issuing.range"/>
672 </xsl:apply-templates>
673 <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
674 <xsl:with-param name="sep" select="$issuing.div"/>
675 </xsl:apply-templates>
676 </xsl:when>
677 <xsl:otherwise>
678 <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
679 <xsl:with-param name="sep" select="$issuing.div"/>
680 </xsl:apply-templates>
681 </xsl:otherwise>
682 </xsl:choose>
683</xsl:template>
684
685<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
686 <xsl:param name="sep"/>
687 <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
688 <xsl:apply-templates mode="iso690.mode"/>
689 <xsl:call-template name="iso690.space">
690 <xsl:with-param name="text" select="$substr"/>
691 </xsl:call-template>
692 <xsl:choose>
693 <xsl:when test="$substr='-'">
694 <xsl:call-template name="iso690.endsep">
695 <xsl:with-param name="text" select="' '"/>
696 <xsl:with-param name="sep" select="$sep"/>
697 </xsl:call-template>
698 </xsl:when>
699 <xsl:otherwise>
700 <xsl:call-template name="iso690.endsep">
701 <xsl:with-param name="text" select="string(.)"/>
702 <xsl:with-param name="sep" select="$sep"/>
703 </xsl:call-template>
704 </xsl:otherwise>
705 </xsl:choose>
706</xsl:template>
707
708<!-- Numeration of the part -->
709<xsl:template name="iso690.partnr">
710 <xsl:param name="partnr.sep">
711 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
712 </xsl:param>
713 <xsl:apply-templates mode="iso690.mode" select="./volumenum">
714 <xsl:with-param name="sep" select="$partnr.sep"/>
715 </xsl:apply-templates>
716</xsl:template>
717
718<!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
719<xsl:template name="iso690.pub">
720 <xsl:param name="onlydate" select="0"/>
721 <xsl:param name="placesep">
722 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'placepubl.sep'"/></xsl:call-template>
723 </xsl:param>
724 <xsl:param name="pubsep">
725 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'publyear.sep'"/></xsl:call-template>
726 </xsl:param>
727 <xsl:param name="endsep">
728 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
729 </xsl:param>
730 <xsl:choose>
731 <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
732 <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
733 <xsl:with-param name="sep" select="$placesep"/>
734 </xsl:apply-templates>
735 <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
736 <xsl:with-param name="sep" select="$pubsep"/>
737 </xsl:apply-templates>
738 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
739 <xsl:with-param name="sep" select="$endsep"/>
740 </xsl:apply-templates>
741 <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
742 <xsl:call-template name="iso690.data">
743 <xsl:with-param name="sep" select="$endsep"/>
744 </xsl:call-template>
745 </xsl:if>
746 </xsl:when>
747 <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
748 <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
749 <xsl:with-param name="sep" select="$placesep"/>
750 </xsl:apply-templates>
751 <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
752 <xsl:with-param name="sep" select="$endsep"/>
753 </xsl:apply-templates>
754 </xsl:when>
755 <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
756 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
757 <xsl:with-param name="sep" select="$endsep"/>
758 </xsl:apply-templates>
759 <xsl:if test="$onlydate=1">
760 <xsl:call-template name="iso690.location">
761 <xsl:with-param name="onlypages" select="1"/>
762 </xsl:call-template>
763 </xsl:if>
764 </xsl:when>
765 <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
766 <xsl:call-template name="iso690.data">
767 <xsl:with-param name="sep" select="$endsep"/>
768 </xsl:call-template>
769 </xsl:when>
770 </xsl:choose>
771</xsl:template>
772
773<xsl:template name="iso690.paper.pub">
774 <xsl:param name="spec.pubinfo.sep">
775 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
776 </xsl:param>
777 <xsl:choose>
778 <xsl:when test="./volumnum|./issuenum|./pagenums">
779 <xsl:call-template name="iso690.pub">
780 <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
781 </xsl:call-template>
782 </xsl:when>
783 <xsl:otherwise>
784 <xsl:call-template name="iso690.pub"/>
785 </xsl:otherwise>
786 </xsl:choose>
787</xsl:template>
788
789<xsl:template name="iso690.data">
790 <xsl:param name="sep"/>
791 <xsl:param name="datecit2">
792 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
793 </xsl:param>
794 <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
795 <xsl:with-param name="sep"/>
796 </xsl:apply-templates>
797 <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
798 <xsl:choose>
799 <xsl:when test="./date[@role='cit']">
800 <xsl:call-template name="iso690.endsep">
801 <xsl:with-param name="text" select="$datecit2"/>
802 <xsl:with-param name="sep" select="$sep"/>
803 </xsl:call-template>
804 </xsl:when>
805 <xsl:when test="./date[@role='upd']">
806 <xsl:call-template name="iso690.endsep">
807 <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
808 <xsl:with-param name="sep" select="$sep"/>
809 </xsl:call-template>
810 </xsl:when>
811 </xsl:choose>
812</xsl:template>
813
814<xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
815 <xsl:param name="sep"/>
816 <xsl:param name="upd" select="0"/>
817 <xsl:apply-templates mode="iso690.mode"/>
818 <xsl:call-template name="iso690.endsep">
819 <xsl:with-param name="text" select="string(.)"/>
820 <xsl:with-param name="sep" select="$sep"/>
821 </xsl:call-template>
822</xsl:template>
823
824<xsl:template match="pubdate|copyright/year" mode="iso690.mode">
825 <xsl:param name="sep"/>
826 <xsl:param name="upd" select="1"/>
827 <xsl:param name="datecit2">
828 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
829 </xsl:param>
830 <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
831 <xsl:if test="name(.)!='pubdate'">
832 <xsl:value-of select="'&#169;'"/><!-- copyright -->
833 </xsl:if>
834 <xsl:apply-templates mode="iso690.mode"/>
835 <xsl:call-template name="iso690.space">
836 <xsl:with-param name="text" select="$substr"/>
837 </xsl:call-template>
838 <xsl:if test="$upd!=0">
839 <xsl:choose>
840 <xsl:when test="name(.)='pubdate'">
841 <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
842 <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
843 </xsl:when>
844 <xsl:otherwise>
845 <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
846 <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
847 </xsl:otherwise>
848 </xsl:choose>
849 </xsl:if>
850 <xsl:choose>
851 <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
852 <xsl:call-template name="iso690.endsep">
853 <xsl:with-param name="text" select="$datecit2"/>
854 <xsl:with-param name="sep" select="$sep"/>
855 </xsl:call-template>
856 </xsl:when>
857 <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
858 <xsl:call-template name="iso690.endsep">
859 <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
860 <xsl:with-param name="sep" select="$sep"/>
861 </xsl:call-template>
862 </xsl:when>
863 <xsl:when test="$substr='-'">
864 <xsl:call-template name="iso690.endsep">
865 <xsl:with-param name="text" select="' '"/>
866 <xsl:with-param name="sep" select="$sep"/>
867 </xsl:call-template>
868 </xsl:when>
869 <xsl:otherwise>
870 <xsl:call-template name="iso690.endsep">
871 <xsl:with-param name="text" select="string(.)"/>
872 <xsl:with-param name="sep" select="$sep"/>
873 </xsl:call-template>
874 </xsl:otherwise>
875 </xsl:choose>
876</xsl:template>
877
878<xsl:template name="iso690.space">
879 <xsl:param name="text" select="substring(string(.),string-length(string(.)))"/>
880 <xsl:if test="$text='-'">
881 <xsl:value-of select="' '"/>
882 </xsl:if>
883</xsl:template>
884
885<!-- Date of update/revision -->
886<xsl:template match="date[@role='upd']" mode="iso690.mode">
887 <xsl:param name="sep">
888 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
889 </xsl:param>
890 <xsl:value-of select="$sep"/>
891 <xsl:apply-templates mode="iso690.mode"/>
892</xsl:template>
893
894<!-- Date of citation -->
895<xsl:template match="date[@role='cit']" mode="iso690.mode">
896 <xsl:param name="datecit1">
897 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
898 </xsl:param>
899 <xsl:param name="datecit2">
900 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
901 </xsl:param>
902 <xsl:value-of select="$datecit1"/>
903 <xsl:apply-templates mode="iso690.mode"/>
904 <xsl:value-of select="$datecit2"/>
905</xsl:template>
906
907<!-- Extent -->
908<xsl:template name="iso690.extent">
909 <xsl:param name="extent.sep">
910 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
911 </xsl:param>
912 <xsl:apply-templates mode="iso690.mode" select="./pagenums">
913 <xsl:with-param name="sep" select="$extent.sep"/>
914 </xsl:apply-templates>
915</xsl:template>
916
917<!-- Location within host -->
918<xsl:template name="iso690.part.location">
919 <xsl:param name="location.sep">
920 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
921 </xsl:param>
922 <xsl:choose>
923 <xsl:when test="./pagenums">
924 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
925 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
926 <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
927 </xsl:when>
928 <xsl:when test="./bibliomisc[@role='sectitle']">
929 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
930 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
931 <xsl:with-param name="sep" select="$location.sep"/>
932 </xsl:apply-templates>
933 </xsl:when>
934 <xsl:otherwise>
935 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
936 <xsl:with-param name="sep" select="$location.sep"/>
937 </xsl:apply-templates>
938 </xsl:otherwise>
939 </xsl:choose>
940</xsl:template>
941
942<xsl:template name="iso690.article.location">
943 <xsl:param name="location.sep">
944 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
945 </xsl:param>
946 <xsl:param name="locs.sep">
947 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
948 </xsl:param>
949 <xsl:choose>
950 <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
951 <xsl:choose>
952 <xsl:when test="./volumenum|./issuenum|./pagenums">
953 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
954 <xsl:with-param name="upd" select="0"/>
955 <xsl:with-param name="sep" select="$locs.sep"/>
956 </xsl:apply-templates>
957 <xsl:call-template name="iso690.location"/>
958 </xsl:when>
959 <xsl:otherwise>
960 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
961 <xsl:with-param name="sep" select="$location.sep"/>
962 </xsl:apply-templates>
963 </xsl:otherwise>
964 </xsl:choose>
965 </xsl:when>
966 <xsl:otherwise>
967 <xsl:choose>
968 <xsl:when test="./volumenum|./issuenum|./pagenums">
969 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
970 <xsl:with-param name="upd" select="0"/>
971 <xsl:with-param name="sep" select="$locs.sep"/>
972 </xsl:apply-templates>
973 </xsl:when>
974 <xsl:otherwise>
975 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
976 <xsl:with-param name="upd" select="0"/>
977 <xsl:with-param name="sep" select="$location.sep"/>
978 </xsl:apply-templates>
979 </xsl:otherwise>
980 </xsl:choose>
981 <xsl:choose>
982 <xsl:when test="./issuenum">
983 <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
984 <xsl:apply-templates mode="iso690.mode" select="./issuenum">
985 <xsl:with-param name="sep"/>
986 </xsl:apply-templates>
987 </xsl:when>
988 <xsl:otherwise>
989 <xsl:apply-templates mode="iso690.mode" select="./volumenum">
990 <xsl:with-param name="sep"/>
991 </xsl:apply-templates>
992 </xsl:otherwise>
993 </xsl:choose>
994 <xsl:choose>
995 <xsl:when test="./pagenums">
996 <xsl:call-template name="iso690.data">
997 <xsl:with-param name="sep" select="$locs.sep"/>
998 </xsl:call-template>
999 <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
1000 </xsl:when>
1001 <xsl:otherwise>
1002 <xsl:call-template name="iso690.data">
1003 <xsl:with-param name="sep" select="$location.sep"/>
1004 </xsl:call-template>
1005 </xsl:otherwise>
1006 </xsl:choose>
1007 </xsl:otherwise>
1008 </xsl:choose>
1009</xsl:template>
1010
1011<xsl:template name="iso690.location">
1012 <xsl:param name="location.sep">
1013 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
1014 </xsl:param>
1015 <xsl:choose>
1016 <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
1017 <xsl:apply-templates mode="iso690.mode" select="./volumenum">
1018 <xsl:with-param name="sep" select="$location.sep"/>
1019 </xsl:apply-templates>
1020 </xsl:when>
1021 <xsl:when test="./issuenum and not(./pagenums)">
1022 <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
1023 <xsl:apply-templates mode="iso690.mode" select="./issuenum">
1024 <xsl:with-param name="sep" select="$location.sep"/>
1025 </xsl:apply-templates>
1026 </xsl:when>
1027 <xsl:when test="./pagenums">
1028 <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
1029 <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
1030 <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
1031 </xsl:when>
1032 </xsl:choose>
1033</xsl:template>
1034
1035<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
1036 <xsl:param name="sep">
1037 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
1038 </xsl:param>
1039 <xsl:apply-templates mode="iso690.mode"/>
1040 <xsl:call-template name="iso690.endsep">
1041 <xsl:with-param name="text" select="string(.)"/>
1042 <xsl:with-param name="sep" select="$sep"/>
1043 </xsl:call-template>
1044</xsl:template>
1045
1046<xsl:template match="volumenum|issuenum" mode="iso690.mode">
1047 <xsl:param name="sep">
1048 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
1049 </xsl:param>
1050 <xsl:apply-templates mode="iso690.mode"/>
1051 <xsl:call-template name="iso690.endsep">
1052 <xsl:with-param name="text" select="string(.)"/>
1053 <xsl:with-param name="sep" select="$sep"/>
1054 </xsl:call-template>
1055</xsl:template>
1056
1057<xsl:template match="pagenums" mode="iso690.mode">
1058 <xsl:param name="sep">
1059 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
1060 </xsl:param>
1061 <xsl:apply-templates mode="iso690.mode"/>
1062 <xsl:call-template name="iso690.endsep">
1063 <xsl:with-param name="text" select="string(.)"/>
1064 <xsl:with-param name="sep" select="$sep"/>
1065 </xsl:call-template>
1066</xsl:template>
1067
1068<!-- Series -->
1069<xsl:template name="iso690.serie">
1070 <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
1071</xsl:template>
1072
1073<!-- Notes -->
1074<xsl:template name="iso690.notice">
1075 <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
1076</xsl:template>
1077
1078<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
1079 <xsl:param name="notice.sep">
1080 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
1081 </xsl:param>
1082 <xsl:apply-templates mode="iso690.mode"/>
1083 <xsl:call-template name="iso690.endsep">
1084 <xsl:with-param name="text" select="string(.)"/>
1085 <xsl:with-param name="sep" select="$notice.sep"/>
1086 </xsl:call-template>
1087</xsl:template>
1088
1089<!-- Avaibility and access -->
1090<xsl:template name="iso690.access">
1091 <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
1092 <xsl:choose>
1093 <xsl:when test="position()=1">
1094 <xsl:apply-templates mode="iso690.mode" select="."/>
1095 </xsl:when>
1096 <xsl:otherwise>
1097 <xsl:apply-templates mode="iso690.mode" select=".">
1098 <xsl:with-param name="firstacc" select="0"/>
1099 </xsl:apply-templates>
1100 </xsl:otherwise>
1101 </xsl:choose>
1102 </xsl:for-each>
1103</xsl:template>
1104
1105<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
1106 <xsl:param name="link1">
1107 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
1108 </xsl:param>
1109 <xsl:param name="link2">
1110 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link2'"/></xsl:call-template>
1111 </xsl:param>
1112 <xsl:value-of select="$link1"/>
1113 <xsl:call-template name="ulink"/>
1114 <xsl:value-of select="$link2"/>
1115</xsl:template>
1116
1117<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
1118 <xsl:param name="firstacc" select="1"/>
1119 <xsl:param name="access">
1120 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
1121 </xsl:param>
1122 <xsl:param name="acctoo">
1123 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'acctoo'"/></xsl:call-template>
1124 </xsl:param>
1125 <xsl:param name="onwww">
1126 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'onwww'"/></xsl:call-template>
1127 </xsl:param>
1128 <xsl:param name="oninet">
1129 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'oninet'"/></xsl:call-template>
1130 </xsl:param>
1131 <xsl:param name="access.end">
1132 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.end'"/></xsl:call-template>
1133 </xsl:param>
1134 <xsl:param name="access.sep">
1135 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.sep'"/></xsl:call-template>
1136 </xsl:param>
1137 <xsl:choose>
1138 <xsl:when test="$firstacc=1">
1139 <xsl:value-of select="$access"/>
1140 </xsl:when>
1141 <xsl:otherwise>
1142 <xsl:value-of select="$acctoo"/>
1143 </xsl:otherwise>
1144 </xsl:choose>
1145 <xsl:choose>
1146 <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
1147 <xsl:choose>
1148 <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
1149 <xsl:value-of select="$onwww"/>
1150 <xsl:value-of select="$access.end"/>
1151 <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
1152 </xsl:when>
1153 <xsl:otherwise>
1154 <xsl:value-of select="$oninet"/>
1155 <xsl:value-of select="$access.end"/>
1156 <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
1157 </xsl:otherwise>
1158 </xsl:choose>
1159 </xsl:when>
1160 <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
1161 <xsl:value-of select="text()[1]"/>
1162 <xsl:call-template name="iso690.endsep">
1163 <xsl:with-param name="text" select="text()[1]"/>
1164 <xsl:with-param name="sep" select="$access.end"/>
1165 </xsl:call-template>
1166 <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
1167 </xsl:when>
1168 <xsl:otherwise>
1169 <xsl:apply-templates mode="iso690.mode"/>
1170 </xsl:otherwise>
1171 </xsl:choose>
1172 <xsl:value-of select="$access.sep"/>
1173</xsl:template>
1174
1175<!-- Standard number - ISBN -->
1176<xsl:template name="iso690.isbn">
1177 <xsl:choose>
1178 <xsl:when test="./biblioid/@class='isbn'">
1179 <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
1180 </xsl:when>
1181 <xsl:when test="./isbn">
1182 <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
1183 </xsl:when>
1184 </xsl:choose>
1185</xsl:template>
1186
1187<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
1188 <xsl:param name="isbn">
1189 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
1190 </xsl:param>
1191 <xsl:param name="stdnum.sep">
1192 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
1193 </xsl:param>
1194 <xsl:value-of select="$isbn"/>
1195 <xsl:apply-templates mode="iso690.mode"/>
1196 <xsl:value-of select="$stdnum.sep"/>
1197</xsl:template>
1198
1199<!-- Standard number - ISSN -->
1200<xsl:template name="iso690.issn">
1201 <xsl:choose>
1202 <xsl:when test="./biblioid/@class='issn'">
1203 <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
1204 </xsl:when>
1205 <xsl:when test="./issn">
1206 <xsl:apply-templates mode="iso690.mode" select="./issn"/>
1207 </xsl:when>
1208 </xsl:choose>
1209</xsl:template>
1210
1211<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
1212 <xsl:param name="issn">
1213 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
1214 </xsl:param>
1215 <xsl:param name="stdnum.sep">
1216 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
1217 </xsl:param>
1218 <xsl:value-of select="$issn"/>
1219 <xsl:apply-templates mode="iso690.mode"/>
1220 <xsl:value-of select="$stdnum.sep"/>
1221</xsl:template>
1222
1223<!-- Identification of patent document -->
1224<xsl:template name="iso690.pat.ident">
1225 <xsl:param name="patdate.sep">
1226 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
1227 </xsl:param>
1228 <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
1229 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
1230 <xsl:choose>
1231 <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
1232 <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
1233 </xsl:when>
1234 <xsl:otherwise>
1235 <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
1236 </xsl:otherwise>
1237 </xsl:choose>
1238 <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
1239 <xsl:with-param name="sep" select="$patdate.sep"/>
1240 </xsl:apply-templates>
1241</xsl:template>
1242
1243<!-- Country or issuing office -->
1244<xsl:template match="address/country" mode="iso690.mode">
1245 <xsl:param name="patcountry.sep">
1246 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
1247 </xsl:param>
1248 <i>
1249 <xsl:apply-templates mode="iso690.mode"/>
1250 </i>
1251 <xsl:value-of select="$patcountry.sep"/>
1252</xsl:template>
1253
1254<!-- Kind of patent document -->
1255<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
1256 <xsl:param name="pattype.sep">
1257 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
1258 </xsl:param>
1259 <i>
1260 <xsl:apply-templates mode="iso690.mode"/>
1261 </i>
1262 <xsl:value-of select="$pattype.sep"/>
1263</xsl:template>
1264
1265<!-- Number -->
1266<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
1267 <xsl:param name="patnum.sep">
1268 <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
1269 </xsl:param>
1270 <xsl:apply-templates mode="iso690.mode"/>
1271 <xsl:value-of select="$patnum.sep"/>
1272</xsl:template>
1273
1274<!-- ==================================================================== -->
1275<!-- Supplementary templates -->
1276
1277<xsl:template name="iso690.endsep">
1278 <xsl:param name="text"/>
1279 <xsl:param name="sep" select=". "/>
1280 <xsl:choose>
1281 <xsl:when test="substring($text,string-length($text))!=substring($sep,1,1)">
1282 <xsl:value-of select="$sep"/>
1283 </xsl:when>
1284 <xsl:when test="substring($text,string-length($text))=' '">
1285 </xsl:when>
1286 <xsl:otherwise>
1287 <xsl:value-of select="' '"/>
1288 </xsl:otherwise>
1289 </xsl:choose>
1290</xsl:template>
1291
1292<!-- ==================================================================== -->
1293
1294<xsl:template match="*" mode="iso690.mode">
1295 <xsl:apply-templates select="."/><!-- try the default mode -->
1296</xsl:template>
1297
1298<!-- ==================================================================== -->
1299
1300</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.