1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
4 xmlns:tmarc="http://www.indexdata.com/turbomarc">
6 <xsl:output indent="yes" method="xml" version="1.0"
8 <xsl:param name="medium"/>
10 <!-- Extract metadata from MARC21/USMARC from streamlined marcxml format
11 http://www.loc.gov/marc/bibliographic/ecbdhome.html -->
12 <xsl:template name="record-hook" />
15 <xsl:template match="/">
16 <xsl:apply-templates />
19 <xsl:template match="tmarc:collection">
21 <xsl:apply-templates />
25 <xsl:template match="tmarc:r">
26 <xsl:variable name="title_medium" select="tmarc:d245/tmarc:sh" />
27 <xsl:variable name="journal_title" select="tmarc:d773/tmarc:st" />
28 <xsl:variable name="electronic_location_url" select="tmarc:d856/tmarc:su" />
29 <xsl:variable name="fulltext_a" select="tmarc:d900/tmarc:sa" />
30 <xsl:variable name="fulltext_b" select="tmarc:d900/tmarc:sb" />
31 <!-- Does not always hit the right substring. The field is not always fixed-width? -->
32 <xsl:variable name="control_lang" select="substring(tmarc:c008, 36, 3)" />
33 <xsl:variable name="contains110" select="tmarc:d110" />
34 <xsl:variable name="hasAuthorFields" select="tmarc:d100 or tmarc:d111" />
35 <xsl:variable name="typeofrec" select="substring(tmarc:l, 7, 1)"/>
36 <xsl:variable name="typeofvm" select="substring(tmarc:c008, 34, 1)"/>
37 <xsl:variable name="biblevel" select="substring(tmarc:l, 8, 1)"/>
38 <xsl:variable name="physdes" select="substring(tmarc:c007, 1, 1)"/>
39 <xsl:variable name="form1" select="substring(tmarc:c008, 24, 1)"/>
40 <xsl:variable name="form2" select="substring(tmarc:c008, 30, 1)"/>
41 <xsl:variable name="oclca" select="substring(tmarc:c007, 1, 1)"/>
42 <xsl:variable name="oclcb" select="substring(tmarc:c007, 2, 1)"/>
43 <xsl:variable name="oclcd" select="substring(tmarc:c007, 4, 1)"/>
44 <xsl:variable name="oclce" select="substring(tmarc:c007, 5, 1)"/>
45 <xsl:variable name="typeofserial" select="substring(tmarc:c008, 22, 1)"/>
47 <xsl:variable name="electronic">
49 <xsl:when test="$form1='s' or $form1='q' or $form1='o' or
50 $form2='s' or $form2='q' or $form2='o'">
51 <xsl:text>yes</xsl:text>
57 <xsl:variable name="vmedium">
59 <xsl:when test="string-length($medium)"><xsl:value-of select="$medium" /></xsl:when>
60 <xsl:when test="($typeofrec='a' or $typeofrec='t') and $biblevel='m'">book</xsl:when>
61 <xsl:when test="$typeofrec='j' or $typeofrec='i'">
62 <xsl:text>recording</xsl:text>
64 <xsl:when test="$oclcb='d' and $oclcd='f'">-cd</xsl:when>
65 <xsl:when test="$oclcb='s'">-cassette</xsl:when>
66 <xsl:when test="$oclcb='d' and $oclcd='a' or $oclcd='b' or
67 $oclcd='c' or $oclcd='d' or $oclcd='e'">-vinyl</xsl:when>
70 <xsl:when test="$typeofrec='g'">
72 <xsl:when test="$typeofvm='m' or $typeofvm='v'">
73 <xsl:text>video</xsl:text>
75 <xsl:when test="$oclca='v' and $oclcb='d' and $oclce='v'">-dvd</xsl:when>
76 <xsl:when test="$oclca='v' and $oclcb='d' and $oclce='s'">-blu-ray</xsl:when>
77 <xsl:when test="$oclca='v' and $oclcb='f' and $oclce='b'">-vhs</xsl:when>
80 <xsl:otherwise>audio-visual</xsl:otherwise>
83 <xsl:when test="$typeofrec='a' and $biblevel='s'">
85 <xsl:when test="$typeofserial='n'">newspaper</xsl:when>
86 <xsl:otherwise>journal</xsl:otherwise>
89 <xsl:when test="$typeofrec='e' or $typeofrec='f'">map</xsl:when>
90 <xsl:when test="$typeofrec='c' or $typeofrec='d'">music-score</xsl:when>
91 <xsl:when test="$form1='a' or $form1='b' or $form1='c'">microform</xsl:when>
92 <xsl:when test="$typeofrec='t'">thesis</xsl:when>
93 <!-- <xsl:when test="$journal_title">article</xsl:when> -->
94 <xsl:when test="$typeofrec='a' or $typeofrec='i' and
95 ($typeofserial='d' or $typeofserial='w')">web</xsl:when>
96 <xsl:when test="$typeofrec='a' and $biblevel='b'">article</xsl:when>
97 <xsl:when test="$typeofrec='m'">electronic</xsl:when>
98 <xsl:when test="$title_medium">
99 <xsl:value-of select="translate($title_medium, ' []/:', '')" />
102 <xsl:text>other</xsl:text>
107 <xsl:variable name="has_fulltext">
109 <xsl:when test="tmarc:d856/tmarc:sq">
110 <xsl:text>yes</xsl:text>
112 <xsl:when test="tmarc:d856/tmarc:si='TEXT*'">
113 <xsl:text>yes</xsl:text>
116 <xsl:text>no</xsl:text>
121 <xsl:variable name="oclc_number">
123 <xsl:when test='contains(tmarc:c001,"ocn") or
124 contains(tmarc:c001,"ocm") or
125 contains(tmarc:c001,"OCoLC") '>
126 <xsl:value-of select="tmarc:c001"/>
128 <xsl:when test='contains(tmarc:d035/tmarc:sa,"ocn") or
129 contains(tmarc:d035/tmarc:sa,"ocm") or
130 contains(tmarc:d035/tmarc:sa,"OCoLC") '>
131 <xsl:value-of select="tmarc:d035/tmarc:sa"/>
138 <xsl:attribute name="mergekey">
139 <xsl:text>title </xsl:text>
140 <xsl:value-of select="tmarc:d245/tmarc:sa" />
141 <xsl:text> author </xsl:text>
142 <xsl:value-of select="tmarc:d100/tmarc:sa" />
143 <xsl:text> medium </xsl:text>
144 <xsl:value-of select="$medium" />
148 <xsl:for-each select="tmarc:c001">
149 <pz:metadata type="id">
150 <xsl:value-of select="." />
154 <pz:metadata type="oclc-number">
155 <xsl:value-of select="$oclc_number" />
158 <xsl:for-each select="tmarc:d010">
159 <pz:metadata type="lccn">
160 <xsl:value-of select="tmarc:sa" />
164 <xsl:for-each select="tmarc:d020">
165 <pz:metadata type="isbn">
166 <xsl:value-of select="tmarc:sa" />
170 <xsl:for-each select="tmarc:d022">
171 <pz:metadata type="issn">
172 <xsl:value-of select="tmarc:sa" />
176 <xsl:for-each select="tmarc:d027">
177 <pz:metadata type="tech-rep-nr">
178 <xsl:value-of select="tmarc:sa" />
182 <xsl:for-each select="tmarc:d035">
183 <pz:metadata type="system-control-nr">
185 <xsl:when test="tmarc:sa">
186 <xsl:value-of select="tmarc:sa"/>
189 <xsl:value-of select="tmarc:sb"/>
195 <xsl:for-each select="tmarc:d100">
196 <pz:metadata type="author">
197 <xsl:value-of select="tmarc:sa" />
199 <pz:metadata type="author-title">
200 <xsl:value-of select="tmarc:sc" />
202 <pz:metadata type="author-date">
203 <xsl:value-of select="tmarc:sd" />
207 <xsl:for-each select="tmarc:d110">
208 <pz:metadata type="corporate-name">
209 <xsl:value-of select="tmarc:sa" />
211 <pz:metadata type="corporate-location">
212 <xsl:value-of select="tmarc:sc" />
214 <pz:metadata type="corporate-date">
215 <xsl:value-of select="tmarc:sd" />
219 <xsl:for-each select="tmarc:d111">
220 <pz:metadata type="meeting-name">
221 <xsl:value-of select="tmarc:sa" />
223 <pz:metadata type="meeting-location">
224 <xsl:value-of select="tmarc:sc" />
226 <pz:metadata type="meeting-date">
227 <xsl:value-of select="tmarc:sd" />
231 <xsl:for-each select="tmarc:d260">
232 <pz:metadata type="date">
233 <xsl:value-of select="translate(tmarc:sc, 'cp[].', '')" />
237 <xsl:for-each select="tmarc:d130">
238 <pz:metadata type="title-uniform">
239 <xsl:value-of select="tmarc:sa" />
241 <pz:metadata type="title-uniform-media">
242 <xsl:value-of select="tmarc:sm" />
244 <pz:metadata type="title-uniform-parts">
245 <xsl:value-of select="tmarc:sn" />
247 <pz:metadata type="title-uniform-partname">
248 <xsl:value-of select="tmarc:sp" />
250 <pz:metadata type="title-uniform-key">
251 <xsl:value-of select="tmarc:sr" />
255 <xsl:for-each select="tmarc:d245">
256 <pz:metadata type="title">
257 <xsl:value-of select="tmarc:sa" />
259 <pz:metadata type="title-remainder">
260 <xsl:value-of select="tmarc:sb" />
262 <pz:metadata type="title-responsibility">
263 <xsl:value-of select="tmarc:sc" />
265 <pz:metadata type="title-dates">
266 <xsl:value-of select="tmarc:sf" />
268 <pz:metadata type="title-medium">
269 <xsl:value-of select="tmarc:sh" />
271 <pz:metadata type="title-number-section">
272 <xsl:value-of select="tmarc:sn" />
274 <pz:metadata type="title-complete">
275 <xsl:value-of select="tmarc:sa" />
276 <xsl:if test="tmarc:sb" ><xsl:value-of select="concat(' ', tmarc:sb)" /></xsl:if>
280 <xsl:for-each select="tmarc:d250">
281 <pz:metadata type="edition">
282 <xsl:value-of select="tmarc:sa" />
286 <xsl:for-each select="tmarc:d260">
287 <pz:metadata type="publication-place">
288 <xsl:value-of select="tmarc:sa" />
290 <pz:metadata type="publication-name">
291 <xsl:value-of select="tmarc:sb" />
293 <pz:metadata type="publication-date">
294 <xsl:value-of select="tmarc:sc" />
298 <xsl:for-each select="tmarc:d300">
299 <pz:metadata type="physical-extent">
300 <xsl:value-of select="tmarc:sa" />
302 <pz:metadata type="physical-format">
303 <xsl:value-of select="tmarc:sb" />
305 <pz:metadata type="physical-dimensions">
306 <xsl:value-of select="tmarc:sc" />
308 <pz:metadata type="physical-accomp">
309 <xsl:value-of select="tmarc:se" />
311 <pz:metadata type="physical-unittype">
312 <xsl:value-of select="tmarc:sf" />
314 <pz:metadata type="physical-unitsize">
315 <xsl:value-of select="tmarc:sg" />
317 <pz:metadata type="physical-specified">
318 <xsl:value-of select="tmarc:s3" />
322 <xsl:for-each select="tmarc:d440">
323 <pz:metadata type="series-title">
324 <xsl:value-of select="tmarc:sa" />
328 <xsl:for-each select="tmarc:d500">
329 <pz:metadata type="description">
330 <xsl:for-each select="node()">
331 <xsl:value-of select="text()" />
336 <xsl:for-each select="tmarc:d505">
337 <pz:metadata type="description">
338 <xsl:for-each select="node()">
339 <xsl:value-of select="text()" />
344 <xsl:for-each select="tmarc:d518">
345 <pz:metadata type="description">
346 <xsl:for-each select="node()">
347 <xsl:value-of select="text()" />
352 <xsl:for-each select="tmarc:d520">
353 <pz:metadata type="description">
354 <xsl:for-each select="node()">
355 <xsl:value-of select="text()" />
360 <xsl:for-each select="tmarc:d522">
361 <pz:metadata type="description">
362 <xsl:for-each select="node()">
363 <xsl:value-of select="text()" />
368 <xsl:for-each select="tmarc:d911">
369 <pz:metadata type="description">
370 <xsl:for-each select="node()">
371 <xsl:value-of select="text()" />
376 <xsl:for-each select="tmarc:d600">
377 <pz:metadata type="subject">
378 <xsl:value-of select="tmarc:sa" />
380 <pz:metadata type="subject-long">
381 <xsl:for-each select="node()/text()">
382 <xsl:if test="position() > 1">
383 <xsl:text>, </xsl:text>
385 <xsl:value-of select="." />
390 <xsl:for-each select="tmarc:d610">
391 <pz:metadata type="subject">
392 <xsl:value-of select="tmarc:sa" />
394 <pz:metadata type="subject-long">
395 <xsl:for-each select="node()/text()">
396 <xsl:if test="position() > 1">
397 <xsl:text>, </xsl:text>
399 <xsl:value-of select="." />
404 <xsl:for-each select="tmarc:d611">
405 <pz:metadata type="subject">
406 <xsl:value-of select="tmarc:sa" />
408 <pz:metadata type="subject-long">
409 <xsl:for-each select="node()/text()">
410 <xsl:if test="position() > 1">
411 <xsl:text>, </xsl:text>
413 <xsl:value-of select="." />
418 <xsl:for-each select="tmarc:d630">
419 <pz:metadata type="subject">
420 <xsl:value-of select="tmarc:sa" />
422 <pz:metadata type="subject-long">
423 <xsl:for-each select="node()/text()">
424 <xsl:if test="position() > 1">
425 <xsl:text>, </xsl:text>
427 <xsl:value-of select="." />
432 <xsl:for-each select="tmarc:d648">
433 <pz:metadata type="subject">
434 <xsl:value-of select="tmarc:sa" />
436 <pz:metadata type="subject-long">
437 <xsl:for-each select="node()/text()">
438 <xsl:if test="position() > 1">
439 <xsl:text>, </xsl:text>
441 <xsl:value-of select="." />
446 <xsl:for-each select="tmarc:d650">
447 <pz:metadata type="subject">
448 <xsl:value-of select="tmarc:sa" />
450 <pz:metadata type="subject-long">
451 <xsl:for-each select="node()/text()">
452 <xsl:if test="position() > 1">
453 <xsl:text>, </xsl:text>
455 <xsl:value-of select="." />
460 <xsl:for-each select="tmarc:d651">
461 <pz:metadata type="subject">
462 <xsl:value-of select="tmarc:sa" />
464 <pz:metadata type="subject-long">
465 <xsl:for-each select="node()/text()">
466 <xsl:if test="position() > 1">
467 <xsl:text>, </xsl:text>
469 <xsl:value-of select="." />
474 <xsl:for-each select="tmarc:d653">
475 <pz:metadata type="subject">
476 <xsl:value-of select="tmarc:sa" />
478 <pz:metadata type="subject-long">
479 <xsl:for-each select="node()/text()">
480 <xsl:if test="position() > 1">
481 <xsl:text>, </xsl:text>
483 <xsl:value-of select="." />
488 <xsl:for-each select="tmarc:d654">
489 <pz:metadata type="subject">
490 <xsl:value-of select="tmarc:sa" />
492 <pz:metadata type="subject-long">
493 <xsl:for-each select="node()/text()">
494 <xsl:if test="position() > 1">
495 <xsl:text>, </xsl:text>
497 <xsl:value-of select="." />
502 <xsl:for-each select="tmarc:d655">
503 <pz:metadata type="subject">
504 <xsl:value-of select="tmarc:sa" />
506 <pz:metadata type="subject-long">
507 <xsl:for-each select="node()/text()">
508 <xsl:if test="position() > 1">
509 <xsl:text>, </xsl:text>
511 <xsl:value-of select="." />
516 <xsl:for-each select="tmarc:d656">
517 <pz:metadata type="subject">
518 <xsl:value-of select="tmarc:sa" />
520 <pz:metadata type="subject-long">
521 <xsl:for-each select="node()/text()">
522 <xsl:if test="position() > 1">
523 <xsl:text>, </xsl:text>
525 <xsl:value-of select="." />
530 <xsl:for-each select="tmarc:d657">
531 <pz:metadata type="subject">
532 <xsl:value-of select="tmarc:sa" />
534 <pz:metadata type="subject-long">
535 <xsl:for-each select="node()/text()">
536 <xsl:if test="position() > 1">
537 <xsl:text>, </xsl:text>
539 <xsl:value-of select="." />
544 <xsl:for-each select="tmarc:d658">
545 <pz:metadata type="subject">
546 <xsl:value-of select="tmarc:sa" />
548 <pz:metadata type="subject-long">
549 <xsl:for-each select="node()/text()">
550 <xsl:if test="position() > 1">
551 <xsl:text>, </xsl:text>
553 <xsl:value-of select="." />
558 <xsl:for-each select="tmarc:d662">
559 <pz:metadata type="subject">
560 <xsl:value-of select="tmarc:sa" />
562 <pz:metadata type="subject-long">
563 <xsl:for-each select="node()/text()">
564 <xsl:if test="position() > 1">
565 <xsl:text>, </xsl:text>
567 <xsl:value-of select="." />
572 <xsl:for-each select="tmarc:d69X">
573 <pz:metadata type="subject">
574 <xsl:value-of select="tmarc:sa" />
576 <pz:metadata type="subject-long">
577 <xsl:for-each select="node()/text()">
578 <xsl:if test="position() > 1">
579 <xsl:text>, </xsl:text>
581 <xsl:value-of select="." />
586 <!-- or tmarc:d651 or tmarc:d653 or tmarc:d654 or tmarc:d655 or tmarc:d656
587 or tmarc:d657 or tmarc:d658 or tmarc:d662 or tmarc:d69X"> -->
589 <!-- <xsl:for-each select="tmarc:d600" > <pz:metadata type="subject">
590 <xsl:value-of select="tmarc:sa"/> </pz:metadata> <pz:metadata type="subject-long">
591 <xsl:for-each select="tmarc:sa tmarc:sb tmarc:sc tmarc:sd "> <xsl:if test="position()
592 > 1"> <xsl:text>, </xsl:text> </xsl:if> <xsl:value-of select="."/> </xsl:for-each>
593 </pz:metadata> </xsl:for-each> -->
595 <xsl:for-each select="tmarc:d856">
596 <pz:metadata type="electronic-url">
597 <xsl:value-of select="tmarc:su" />
599 <pz:metadata type="electronic-text">
601 <xsl:when test="tmarc:sy">
602 <xsl:value-of select="tmarc:sy/text()" />
604 <xsl:when test="tmarc:s3">
605 <xsl:value-of select="tmarc:s3/text()" />
607 <xsl:otherwise>Get resource</xsl:otherwise>
610 <pz:metadata type="electronic-note">
611 <xsl:value-of select="tmarc:sz" />
613 <pz:metadata type="electronic-format-instruction">
614 <xsl:value-of select="tmarc:si" />
616 <pz:metadata type="electronic-format-type">
617 <xsl:value-of select="tmarc:sq" />
621 <xsl:for-each select="tmarc:d773">
622 <pz:metadata type="citation">
623 <xsl:for-each select="*">
624 <xsl:value-of select="normalize-space(.)" />
625 <xsl:text> </xsl:text>
628 <xsl:if test="tmarc:st">
629 <pz:metadata type="journal-title">
630 <xsl:value-of select="tmarc:st"/>
633 <xsl:if test="tmarc:sg">
634 <pz:metadata type="journal-subpart">
635 <xsl:value-of select="tmarc:sg"/>
638 <xsl:if test="tmarc:sp">
639 <pz:metadata type="journal-title-abbrev">
640 <xsl:value-of select="tmarc:sp"/>
645 <xsl:for-each select="tmarc:d852">
646 <xsl:if test="tmarc:sy">
647 <pz:metadata type="publicnote">
648 <xsl:value-of select="tmarc:sy" />
651 <xsl:if test="tmarc:sh">
652 <pz:metadata type="callnumber">
653 <xsl:value-of select="tmarc:sh" />
658 <pz:metadata type="medium">
659 <xsl:value-of select="$vmedium" />
660 <xsl:if test="string-length($electronic) and $vmedium != 'electronic'">
661 <xsl:text> (electronic)</xsl:text>
665 <xsl:for-each select="tmarc:d900/tmarc:sa">
666 <pz:metadata type="fulltext">
667 <xsl:value-of select="." />
671 <!-- <xsl:if test="$fulltext_a"> <pz:metadata type="fulltext"> <xsl:value-of
672 select="$fulltext_a"/> </pz:metadata> </xsl:if> -->
674 <xsl:for-each select="tmarc:d900/tmarc:sb">
675 <pz:metadata type="fulltext">
676 <xsl:value-of select="." />
680 <xsl:for-each select="tmarc:d900/tmarc:se">
681 <pz:metadata type="fulltext">
682 <xsl:value-of select="." />
686 <xsl:for-each select="tmarc:d900/tmarc:sf">
687 <pz:metadata type="fulltext">
688 <xsl:value-of select="." />
692 <xsl:for-each select="tmarc:d900/tmarc:si">
693 <pz:metadata type="fulltext">
694 <xsl:value-of select="." />
698 <xsl:for-each select="tmarc:d900/tmarc:sk">
699 <pz:metadata type="fulltext">
700 <xsl:value-of select="." />
704 <xsl:for-each select="tmarc:d900/tmarc:sq">
705 <pz:metadata type="fulltext">
706 <xsl:value-of select="." />
710 <xsl:for-each select="tmarc:d900/tmarc:ss">
711 <pz:metadata type="fulltext">
712 <xsl:value-of select="." />
716 <xsl:for-each select="tmarc:d900/tmarc:su">
717 <pz:metadata type="fulltext">
718 <xsl:value-of select="." />
722 <xsl:for-each select="tmarc:d900/tmarc:sy">
723 <pz:metadata type="fulltext">
724 <xsl:value-of select="." />
729 <!-- <xsl:if test="$fulltext_b"> <pz:metadata type="fulltext"> <xsl:value-of
730 select="$fulltext_b"/> </pz:metadata> </xsl:if> -->
732 <pz:metadata type="has-fulltext">
733 <xsl:value-of select="$has_fulltext"/>
736 <xsl:for-each select="tmarc:d907">
737 <!-- or tmarc:d901"> -->
738 <pz:metadata type="iii-id">
739 <xsl:value-of select="tmarc:sa" />
743 <xsl:for-each select="tmarc:d926">
744 <pz:metadata type="locallocation">
745 <xsl:choose><xsl:when test="tmarc:sa">
746 <xsl:value-of select="tmarc:sa"/>
747 </xsl:when><xsl:otherwise>
748 <xsl:text>PAZPAR2_NULL_VALUE</xsl:text>
749 </xsl:otherwise></xsl:choose>
751 <pz:metadata type="callnumber">
752 <xsl:choose><xsl:when test="tmarc:sc">
753 <xsl:value-of select="tmarc:sc"/>
754 </xsl:when><xsl:otherwise>
755 <xsl:text>PAZPAR2_NULL_VALUE</xsl:text>
756 </xsl:otherwise></xsl:choose>
758 <pz:metadata type="available">
759 <xsl:choose><xsl:when test="tmarc:se">
760 <xsl:value-of select="tmarc:se"/>
761 </xsl:when><xsl:otherwise>
762 <xsl:text>PAZPAR2_NULL_VALUE</xsl:text>
763 </xsl:otherwise></xsl:choose>
767 <xsl:for-each select="tmarc:d948">
768 <pz:metadata type="holding">
769 <xsl:for-each select="tmarc:s">
770 <xsl:if test="position() > 1">
771 <xsl:text> </xsl:text>
773 <xsl:value-of select="." />
778 <xsl:for-each select="tmarc:d991">
779 <pz:metadata type="holding">
780 <xsl:for-each select="tmarc:s">
781 <xsl:if test="position() > 1">
782 <xsl:text> </xsl:text>
784 <xsl:value-of select="." />
789 <xsl:for-each select="tmarc:d999">
790 <pz:metadata type="localid">
792 <xsl:when test="tmarc:sa">
793 <xsl:value-of select="tmarc:sa"/>
795 <xsl:when test="tmarc:sc">
796 <xsl:value-of select="tmarc:sc"/>
799 <xsl:value-of select="tmarc:sd"/>
806 <!-- passthrough id data -->
807 <xsl:for-each select="pz:metadata">
808 <xsl:copy-of select="." />
811 <!-- other stylesheets importing this might want to define this -->
812 <xsl:call-template name="record-hook" />
817 <xsl:template match="text()" />
819 <!-- TODO Does not work anymore -->
820 <xsl:template name="shortTitle">
821 <xsl:param name="tag" />
822 <xsl:for-each select="tmarc:d">
823 <xsl:value-of select="tmarc:sa" />
824 <xsl:value-of select="tmarc:sm" />
825 <xsl:value-of select="tmarc:sn" />
826 <xsl:value-of select="tmarc:sp" />
827 <xsl:value-of select="tmarc:sr" />
831 <!-- No working as expected -->
832 <xsl:template name="description">
833 <xsl:param name="element" />
834 <xsl:for-each select="$element">
835 <pz:metadata type="description">
836 <xsl:for-each select="node()">
837 <xsl:value-of select="text()" />
841 <xsl:apply-templates />
844 <!-- <xsl:for-each select="tmarc:d500"> <pz:metadata type="description">
845 <xsl:for-each select="node()"> <xsl:value-of select="text()"/> </xsl:for-each>
846 </pz:metadata> </xsl:for-each> -->
850 <xsl:template name="subject">
851 <xsl:param name="element" />
852 <xsl:for-each select="$element">
853 <pz:metadata type="subject">
854 <xsl:value-of select="tmarc:sa" />
856 <pz:metadata type="subject-long">
857 <xsl:for-each select="node()/text()">
858 <xsl:if test="position() > 1">
859 <xsl:text>, </xsl:text>
861 <xsl:value-of select="." />