-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarcxchange-to-opf.xsl
3848 lines (3518 loc) · 291 KB
/
marcxchange-to-opf.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:nlb="http://www.nlb.no/"
xmlns:nlbbib="http://www.nlb.no/bibliographic"
xmlns:SRU="http://www.loc.gov/zing/sru/"
xmlns:normarc="info:lc/xmlns/marcxchange-v1"
xmlns:schema="http://schema.org/"
xmlns:marcxchange="info:lc/xmlns/marcxchange-v1"
xmlns:DIAG="http://www.loc.gov/zing/sru/diagnostics/"
xmlns:opf="http://www.idpf.org/2007/opf"
xmlns="http://www.idpf.org/2007/opf"
exclude-result-prefixes="#all"
xpath-default-namespace="http://www.idpf.org/2007/opf"
version="2.0">
<xsl:output indent="no" exclude-result-prefixes="#all" omit-xml-declaration="yes"/>
<xsl:param name="nested" select="false()" as="xs:boolean"/>
<xsl:param name="include-source-reference" select="false()" as="xs:boolean"/>
<xsl:param name="include-source-reference-as-comments" select="false()" as="xs:boolean"/>
<xsl:param name="identifier" select="''" as="xs:string"/>
<xsl:param name="prefix-everything" select="false()" as="xs:boolean"/>
<xsl:param name="verbose" select="false()" as="xs:boolean"/>
<xsl:template match="@*|node()">
<xsl:if test="$verbose = true()">
<xsl:choose>
<xsl:when test="self::*[@tag]">
<xsl:message>
<xsl:text>Ingen regel for NORMARC-felt: </xsl:text>
<xsl:value-of select="@tag"/>
<xsl:text> (boknummer: </xsl:text>
<xsl:value-of select="../*[@tag='001']/text()"/>
<xsl:text>)</xsl:text>
</xsl:message>
</xsl:when>
<xsl:when test="self::*[@code]">
<xsl:message>
<xsl:text>Ingen regel for NORMARC-delfelt: </xsl:text>
<xsl:value-of select="parent::*/@tag"/>
<xsl:text> $</xsl:text>
<xsl:value-of select="@code"/>
<xsl:text> (boknummer: </xsl:text>
<xsl:value-of select="../../*[@tag='001']/text()"/>
<xsl:text>)</xsl:text>
</xsl:message>
</xsl:when>
<xsl:when test="self::*">
<xsl:message
select="concat('marcxchange-to-opf.xsl: no match for element "',concat('/',string-join((ancestor-or-self::*)/concat(name(),'[',count(preceding-sibling::*)+1,']'),'/')),'" with attributes: ',string-join(for $attribute in @* return concat($attribute/name(),'="',$attribute,'"'),' '))"
/>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="/*" priority="2">
<xsl:text> </xsl:text>
<xsl:variable name="result" as="element()*">
<xsl:next-match/>
</xsl:variable>
<xsl:sequence select="$result"/>
</xsl:template>
<xsl:template match="SRU:*">
<xsl:apply-templates select="node()"/>
</xsl:template>
<xsl:template match="*:record[not(self::SRU:*)]">
<xsl:variable name="metadata" as="element()">
<metadata>
<xsl:namespace name="dc" select="'http://purl.org/dc/elements/1.1/'"/>
<xsl:namespace name="nlbbib" select="'http://www.nlb.no/bibliographic'"/>
<xsl:namespace name="schema" select="'http://schema.org/'"/>
<xsl:if test="$include-source-reference">
<xsl:namespace name="nlb" select="'http://www.nlb.no/'"/>
</xsl:if>
<xsl:variable name="with-duplicates" as="element()*">
<xsl:apply-templates select="node()"/>
</xsl:variable>
<xsl:variable name="without-duplicates" as="element()*">
<xsl:for-each select="$with-duplicates">
<xsl:variable name="position" select="position()"/>
<xsl:choose>
<xsl:when test="exists(@id | @refines)">
<!-- don't remove duplicates if the duplicate has an id or refines attribute -->
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="@*" exclude-result-prefixes="#all"/>
<xsl:copy-of select="node()" exclude-result-prefixes="#all"/>
</xsl:copy>
</xsl:when>
<xsl:when test="self::dc:*">
<xsl:if test="not($with-duplicates[position() < $position and name()=current()/name() and text()=current()/text() and string(@refines)=string(current()/@refines)])">
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="$with-duplicates[self::dc:*[name()=current()/name() and text()=current()/text() and string(@refines)=string(current()/@refines)]]/@*" exclude-result-prefixes="#all"/>
<xsl:copy-of select="node()" exclude-result-prefixes="#all"/>
</xsl:copy>
</xsl:if>
</xsl:when>
<xsl:when test="self::meta">
<xsl:variable name="this" select="."/>
<xsl:if
test="not($with-duplicates[position() < $position and @property=current()/@property and text()=current()/text() and string(@refines)=string(current()/@refines)])">
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="$with-duplicates[self::meta[@property=current()/@property and text()=current()/text() and string(@refines)=string(current()/@refines)]]/@*" exclude-result-prefixes="#all"/>
<xsl:copy-of select="node()" exclude-result-prefixes="#all"/>
</xsl:copy>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="without-duplicate-role-and-id" as="element()*">
<xsl:for-each select="$without-duplicates">
<xsl:choose>
<xsl:when test="@property = 'bibliofil-id'">
<xsl:variable name="position" as="xs:integer" select="position()"/>
<xsl:variable name="bibliofil-id" as="xs:string" select="text()"/>
<xsl:variable name="target-role" as="xs:string?" select="($without-duplicates[concat('#', @id) = current()/@refines]/string((@property, name())[1]))[1]"/>
<xsl:variable name="preceding-bibliofil-id" as="element()*" select="$without-duplicates[position() lt $position and @property = 'bibliofil-id' and text() = $bibliofil-id]"/>
<xsl:variable name="preceding-bibliofil-id-target-roles" as="xs:string*" select="$without-duplicates[concat('#', @id) = $preceding-bibliofil-id/@refines]/(string((@property, name())[1]))"/>
<xsl:if test="not($target-role = $preceding-bibliofil-id-target-roles)">
<xsl:sequence select="."/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="sorted" as="element()*">
<xsl:for-each select="$without-duplicate-role-and-id[self::dc:*[not(@refines)]]">
<xsl:sort
select="if (not(contains('dc:identifier dc:title dc:creator dc:format',name()))) then 100 else count(tokenize(substring-before('dc:identifier dc:title dc:creator dc:format',name()),' '))"/>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
<xsl:if test="@id">
<xsl:call-template name="copy-meta-refines">
<xsl:with-param name="meta-set" select="$without-duplicate-role-and-id"/>
<xsl:with-param name="id" select="string(@id)"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$without-duplicate-role-and-id[self::meta[starts-with(@property,'dc:') and not(@refines)]]">
<xsl:sort select="@property"/>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
<xsl:if test="@id">
<xsl:call-template name="copy-meta-refines">
<xsl:with-param name="meta-set" select="$without-duplicate-role-and-id"/>
<xsl:with-param name="id" select="string(@id)"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$without-duplicate-role-and-id[self::meta[not(starts-with(@property,'dc:')) and contains(@property,':') and not(@refines)]]">
<xsl:sort select="@property"/>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
<xsl:if test="@id">
<xsl:call-template name="copy-meta-refines">
<xsl:with-param name="meta-set" select="$without-duplicate-role-and-id"/>
<xsl:with-param name="id" select="string(@id)"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$without-duplicate-role-and-id[self::meta[not(contains(@property,':')) and not(@refines)]]">
<xsl:sort select="@property"/>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
<xsl:if test="@id">
<xsl:call-template name="copy-meta-refines">
<xsl:with-param name="meta-set" select="$without-duplicate-role-and-id"/>
<xsl:with-param name="id" select="string(@id)"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="$sorted">
<!-- remove unneccessary id's on non-DC elements -->
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="@* except @id" exclude-result-prefixes="#all"/>
<xsl:if test="self::dc:* or @id and $sorted[@refines = concat('#',current()/@id)]">
<xsl:copy-of select="@id" exclude-result-prefixes="#all"/>
</xsl:if>
<xsl:copy-of select="node()" exclude-result-prefixes="#all"/>
</xsl:copy>
</xsl:for-each>
</metadata>
</xsl:variable>
<xsl:variable name="metadata" as="element()">
<xsl:choose>
<xsl:when test="string($nested) = 'true'">
<xsl:for-each select="$metadata">
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="@* | namespace::*" exclude-result-prefixes="#all"/>
<xsl:for-each select="*[not(@refines)] | comment()">
<xsl:choose>
<xsl:when test="self::comment()">
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
</xsl:when>
<xsl:when test="self::*">
<xsl:apply-templates select="." mode="nesting"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:copy>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$metadata" exclude-result-prefixes="#all"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="metadata" as="element()">
<xsl:choose>
<xsl:when test="$include-source-reference-as-comments">
<xsl:call-template name="add-comments">
<xsl:with-param name="context" select="$metadata"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$metadata" exclude-result-prefixes="#all"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="indent">
<xsl:with-param name="element" select="$metadata"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="add-comments">
<xsl:param name="context" as="element()"/>
<xsl:for-each select="$context">
<xsl:element name="{name()}" exclude-result-prefixes="#all">
<xsl:copy-of select="@* except @nlb:metadata-source | namespace::*[not(name() = 'nlb')]" exclude-result-prefixes="#all"/>
<xsl:if test="$include-source-reference">
<xsl:copy-of select="namespace::*[name() = 'nlb']"/>
<xsl:copy-of select="@nlb:metadata-source" exclude-result-prefixes="#all"/>
</xsl:if>
<xsl:for-each select="node()">
<xsl:choose>
<xsl:when test="self::*">
<xsl:call-template name="add-comments">
<xsl:with-param name="context" select="."/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:element>
</xsl:for-each>
<xsl:if test="$include-source-reference-as-comments and @nlb:metadata-source and parent::*">
<xsl:text> </xsl:text>
<xsl:comment select="concat(' ', @nlb:metadata-source, ' ')"/>
</xsl:if>
</xsl:template>
<xsl:template name="indent">
<xsl:param name="element" as="element()"/>
<xsl:if test="exists($element/parent::*) and $element/parent::*/normalize-space(string-join(text(),'')) = ''">
<xsl:text>
</xsl:text>
<xsl:for-each select="0 to count($element/ancestor::*)">
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:if>
<xsl:for-each select="$element">
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="@* | namespace::*" exclude-result-prefixes="#all"/>
<xsl:for-each select="node()">
<xsl:choose>
<xsl:when test="self::*">
<xsl:call-template name="indent">
<xsl:with-param name="element" select="."/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:if test="exists(*)">
<xsl:text>
</xsl:text>
<xsl:for-each select="0 to count($element/ancestor::*)">
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:if>
</xsl:copy>
</xsl:for-each>
</xsl:template>
<xsl:template name="copy-meta-refines">
<xsl:param name="meta-set" required="yes" as="element()*"/>
<xsl:param name="id" required="yes" as="xs:string"/>
<xsl:variable name="idref" select="concat('#',$id)"/>
<xsl:for-each select="$meta-set[self::*[@refines=$idref]]">
<xsl:sort select="string((@property, name())[1])"/>
<xsl:copy-of select="." exclude-result-prefixes="#all"/>
<xsl:if test="@id">
<xsl:call-template name="copy-meta-refines">
<xsl:with-param name="meta-set" select="$meta-set"/>
<xsl:with-param name="id" select="string(@id)"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="*" mode="nesting">
<xsl:copy exclude-result-prefixes="#all">
<xsl:copy-of select="@* except (@property, @refines)" exclude-result-prefixes="#all"/>
<xsl:if test="@property">
<xsl:attribute name="name" select="@property"/>
</xsl:if>
<xsl:attribute name="content" select="text()"/>
<xsl:if test="@id">
<xsl:apply-templates select="../*[@refines = concat('#',current()/@id)]" mode="nesting"/>
</xsl:if>
</xsl:copy>
</xsl:template>
<xsl:template name="meta">
<xsl:param name="context" as="element()?" select="."/>
<xsl:param name="controlfield_position" as="xs:string?"/>
<xsl:param name="property" as="xs:string"/>
<xsl:param name="value" as="xs:string+"/>
<xsl:param name="id" as="xs:string?" select="()"/>
<xsl:param name="refines" as="xs:string?" select="()"/>
<xsl:if test="not($property)">
<xsl:message terminate="yes" select="'No property name was given'"/>
</xsl:if>
<xsl:if test="count($value) = 0">
<xsl:message terminate="yes" select="concat('No value was given (value=', string($value), ')')"/>
</xsl:if>
<xsl:variable name="dublin-core" select="$property = ('dc:contributor', 'dc:coverage', 'dc:creator', 'dc:date', 'dc:description', 'dc:format', 'dc:identifier',
'dc:language', 'dc:publisher', 'dc:relation', 'dc:rights', 'dc:source', 'dc:subject', 'dc:title', 'dc:type')" as="xs:boolean"/>
<xsl:variable name="identifier001" as="xs:string?" select="($context/(../* | ../../*)[self::*:controlfield[@tag='001']])[1]/replace(text(), '^0+(.)', '$1')"/>
<xsl:variable name="tag" select="($context/../@tag, $context/@tag, '???')[1]"/>
<xsl:variable name="metadata-source-text" select="concat('Bibliofil', if ($identifier001) then concat('@',$identifier001) else '', ' *', $tag, if ($context/@code) then concat('$',$context/@code) else '', if ($controlfield_position) then concat('/', $controlfield_position) else '')"/>
<xsl:variable name="metadata-source-text" select="concat($metadata-source-text, if ($identifier001 != $identifier and $property = ('dc:identifier', 'dc:title') and not($refines)) then ' + dc:identifier' else '')"/>
<xsl:element name="{if ($dublin-core and not($refines)) then $property else 'meta'}">
<xsl:if test="$include-source-reference or $include-source-reference-as-comments">
<xsl:attribute name="nlb:metadata-source" select="$metadata-source-text"/>
</xsl:if>
<xsl:if test="not($dublin-core) or $refines">
<xsl:attribute name="property" select="$property"/>
</xsl:if>
<xsl:if test="$id">
<xsl:attribute name="id" select="$id"/>
</xsl:if>
<xsl:if test="$refines">
<xsl:attribute name="refines" select="concat('#',$refines)"/>
</xsl:if>
<xsl:if test="count($value) gt 1">
<xsl:message select="concat('WARNING: more than one value at ', $metadata-source-text)"/>
<xsl:for-each select="$value">
<xsl:message select="."/>
</xsl:for-each>
</xsl:if>
<xsl:value-of select="($value)[1]"/>
</xsl:element>
</xsl:template>
<xsl:template name="bibliofil-id">
<xsl:param name="context" as="element()?" select="."/>
<xsl:param name="property" as="xs:string" select="nlb:prefixed-property('bibliofil-id')"/>
<xsl:param name="refines" as="xs:string?" select="()"/>
<xsl:variable name="subfield" select="($context/*:subfield[@code='_' and matches(., '^\d+$')],
$context/*:subfield[@code='3' and matches(., '^\d+$')])[1]"/>
<xsl:for-each select="$subfield">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$subfield"/>
<xsl:with-param name="property" select="$property"/>
<xsl:with-param name="value" select="$subfield/text()"/>
<xsl:with-param name="refines" select="$refines"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!-- 00X KONTROLLFELT -->
<xsl:template match="*:leader"/>
<xsl:template match="*:controlfield[@tag='001']">
<xsl:variable name="edition-identifier" select="if ($identifier) then $identifier else replace(text(), '^0+(.)', '$1')"/>
<xsl:call-template name="meta">
<xsl:with-param name="property" select="'dc:identifier'"/>
<xsl:with-param name="value" select="$edition-identifier"/>
<xsl:with-param name="id" select="'pub-id'"/>
</xsl:call-template>
<xsl:call-template name="meta">
<xsl:with-param name="property" select="'dc:source.urn-nbn'"/>
<xsl:with-param name="value" select="concat('urn:nbn:no-nb_nlb_', $edition-identifier)"/>
</xsl:call-template>
<xsl:call-template name="meta">
<xsl:with-param name="property" select="nlb:prefixed-property('library')"/>
<xsl:with-param name="value" select="nlb:parseLibrary850a($edition-identifier, .)"/>
<xsl:with-param name="context" select="(../*:datafield[@tag='850']/*:subfield[@code='a'], .)[1]"/>
</xsl:call-template>
<xsl:if test="matches(string($edition-identifier), '^\d{12}$')">
<xsl:variable name="year" select="substring($edition-identifier,9)"/>
<xsl:variable name="month" select="substring($edition-identifier,7,2)"/>
<xsl:if test="not(../*:datafield[@tag='260']/*:subfield[@code='c'])">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:date.issued'"/><xsl:with-param name="value" select="$year"/></xsl:call-template>
</xsl:if>
<xsl:if test="not(../*:datafield[@tag='596']/*:subfield[@code='c'])">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:date.issued.original'"/><xsl:with-param name="value" select="$year"/></xsl:call-template>
</xsl:if>
</xsl:if>
<!-- checking this here makes sure that the field is always defined. *260$9 is usually not present. -->
<xsl:choose>
<xsl:when test="../*:datafield[@tag='260']/*:subfield[@code='9']/text() = 'n'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="nlb:prefixed-property('watermark')"/><xsl:with-param name="value" select="'false'"/></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="meta"><xsl:with-param name="property" select="nlb:prefixed-property('watermark')"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*:controlfield[@tag='003']">
<!-- Ignoreres. Dette er noe som ble brukt "i riktig gamle dager". -->
</xsl:template>
<xsl:template match="*:controlfield[@tag='007']">
<!--<xsl:message select="'NORMARC-felt ignorert: 007 FYSISK BESKRIVELSE AV DOKUMENTET'"/>-->
</xsl:template>
<xsl:template match="*:controlfield[@tag='008']">
<xsl:variable name="POS00-05" select="substring(text(),1,6)"/>
<xsl:variable name="POS21" select="substring(text(),22,1)"/>
<xsl:variable name="POS22" select="substring(text(),23,1)"/>
<xsl:variable name="POS33" select="substring(text(),34,1)"/>
<xsl:variable name="POS34" select="substring(text(),35,1)"/>
<xsl:variable name="POS35-37" select="substring(text(),36,3)"/>
<xsl:if test="matches($POS00-05,'^\d\d\d\d\d\d$')">
<xsl:variable name="current-year" select="xs:integer(tokenize(xs:string(current-date()),'-')[1])"/>
<xsl:variable name="year" select="xs:integer(substring($POS00-05,1,2))"/>
<xsl:variable name="year" select="xs:string($current-year - $current-year mod 100 + (if ($year gt $current-year mod 100) then $year - 100 else $year))"/>
<xsl:variable name="month" select="substring($POS00-05,3,2)"/>
<xsl:variable name="day" select="substring($POS00-05,5,2)"/>
<xsl:variable name="registered" select="concat($year,'-',$month,'-',$day)"/>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'00-05'"/><xsl:with-param name="property" select="'dc:date.registered'"/><xsl:with-param name="value" select="$registered"/></xsl:call-template>
<xsl:variable name="available" as="node()*">
<xsl:apply-templates select="(../*:datafield[@tag=('592')])"/>
</xsl:variable>
<xsl:variable name="external" as="node()*">
<xsl:apply-templates select="(../*:datafield[@tag=('598', '594')])"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="count($available[@property='dc:date.available']) ge 1">
<!-- do nothing, dc:date.available is created in template for 592 -->
</xsl:when>
<xsl:when test="count($external[@property=nlb:prefixed-property('external-retrieved')]) ge 1">
<xsl:variable name="external-retrieved" select="($external[@property=nlb:prefixed-property('external-retrieved')])[1]" as="xs:string"/>
<xsl:call-template name="meta">
<xsl:with-param name="property" select="'dc:date.available'"/>
<xsl:with-param name="value" select="$external-retrieved"/>
<xsl:with-param name="context" select="(../*:datafield[@tag=('598', '594')])[1]"/> <!-- most likely context. calculating the correct context with 100% certainty requires too many lines of code -->
</xsl:call-template>
</xsl:when>
<xsl:when test="matches($year,'^19..$')">
<xsl:call-template name="meta">
<xsl:with-param name="property" select="'dc:date.available'"/>
<xsl:with-param name="value" select="$registered"/>
<xsl:with-param name="controlfield_position" select="'00-05'"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:if>
<xsl:choose>
<xsl:when test="$POS21 = 'a'"><!-- "Årbok": Not in use; ignore for now --></xsl:when>
<xsl:when test="$POS21 = 'm'"><!-- "Monografiserie": Not in use; ignore for now --></xsl:when>
<xsl:when test="$POS21 = 'n'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Periodika'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Serial'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Avis'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Newspaper'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="nlb:prefixed-property('periodical')"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="nlb:prefixed-property('newspaper')"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS21 = 'p'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Periodika'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Serial'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Tidsskrift'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Magazine'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="nlb:prefixed-property('periodical')"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'21'"/><xsl:with-param name="property" select="nlb:prefixed-property('magazine')"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS21 = 'z'"><!-- "Andre typer periodika": Not in use; ignore for now --></xsl:when>
</xsl:choose>
<xsl:variable name="tag385sub0_contexts" select="../*:datafield[@tag='385']/*:subfield[@code='0' and replace(text(), '^.*/', '') = ('TG1000', 'TG1001', 'TG1002', 'TG1003', 'TG1004', 'TG1005', 'TG1015', 'TG1016')]" as="element()*"/>
<xsl:variable name="tag385sub0" select="$tag385sub0_contexts/text()" as="xs:string*"/>
<xsl:variable name="ageRangesFrom385sub0" as="xs:string*">
<xsl:for-each select="$tag385sub0">
<xsl:choose>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1000'">
<xsl:sequence select="'0-2'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1001'">
<xsl:sequence select="'3-5'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1002'">
<xsl:sequence select="'6-8'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1003'">
<xsl:sequence select="'9-10'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1004'">
<xsl:sequence select="'11-12'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1005'">
<xsl:sequence select="'13-15'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1015'">
<xsl:sequence select="'16-17'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1016'">
<xsl:sequence select="'18-INF'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="audienceFrom385sub0" as="xs:string*">
<xsl:for-each select="$tag385sub0">
<xsl:choose>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1000'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1001'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1002'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1003'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1004'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1005'">
<xsl:sequence select="'Adolescent'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1015'">
<xsl:sequence select="'Adolescent'"/>
</xsl:when>
<xsl:when test=".='https://schema.nb.no/Bibliographic/Values/TG1016'">
<xsl:sequence select="'Adult'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="ageRangesFrom008POS22" as="xs:string*">
<xsl:for-each select="$POS22">
<xsl:choose>
<xsl:when test=".='a'">
<xsl:sequence select="'0-5'"/>
</xsl:when>
<xsl:when test=".='b'">
<xsl:sequence select="'6-8'"/>
</xsl:when>
<xsl:when test=".='c'">
<xsl:sequence select="'9-13'"/>
</xsl:when>
<xsl:when test=".='d'">
<xsl:sequence select="'14-17'"/>
</xsl:when>
<xsl:when test=".='j'">
<xsl:sequence select="'0-15'"/>
</xsl:when>
<xsl:when test=".='e'">
<xsl:sequence select="'18-INF'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="tag019a_context" select="(../*:datafield[@tag='019']/*:subfield[@code='a'])[1]" as="element()?"/>
<xsl:variable name="tag019a" select="../*:datafield[@tag='019']/*:subfield[@code='a']/tokenize(replace(replace(text(), '[\[\]\s]', ''), '[/\.-]', ','), '[,\.\-_]')" as="xs:string*"/>
<xsl:variable name="tag019a" select="for $a in ($tag019a) return if (string-length($a) gt 0) then $a else ()" as="xs:string*"/>
<xsl:variable name="ageRangesFrom019a" as="xs:string*">
<!-- *019$a is a remnant from NORMARC. If there's no *385$0, let's fall back to this instead -->
<xsl:if test="count($tag385sub0) = 0">
<xsl:for-each select="$tag019a">
<xsl:choose>
<xsl:when test=".='a'">
<xsl:sequence select="'0-5'"/>
</xsl:when>
<xsl:when test=".='b'">
<xsl:sequence select="'6-7'"/>
</xsl:when>
<xsl:when test=".='bu'">
<xsl:sequence select="'8-10'"/>
</xsl:when>
<xsl:when test=".='u'">
<xsl:sequence select="'11-12'"/>
</xsl:when>
<xsl:when test=".='mu'">
<xsl:sequence select="'13-16'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:if>
</xsl:variable>
<xsl:variable name="audienceFrom019a" as="xs:string*">
<!-- *019$a is a remnant from NORMARC. If there's no *385$0, let's fall back to this instead -->
<xsl:if test="count($tag385sub0) = 0">
<xsl:for-each select="$tag019a">
<xsl:choose>
<xsl:when test=".='a'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='b'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='bu'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='u'">
<xsl:sequence select="'Child'"/>
</xsl:when>
<xsl:when test=".='mu'">
<xsl:sequence select="'Adolescent'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:if>
</xsl:variable>
<xsl:variable name="ageRanges" select="if (count($ageRangesFrom385sub0)) then $ageRangesFrom385sub0 else if (count($ageRangesFrom019a)) then $ageRangesFrom019a else $ageRangesFrom008POS22"/>
<xsl:variable name="ageRangeFrom" select="if (count($ageRanges) = 0) then '' else xs:integer(min(for $range in ($ageRanges) return xs:double(tokenize($range,'-')[1])))"/>
<xsl:variable name="ageMax" select="if (count($ageRanges) = 0) then '' else max(for $range in ($ageRanges) return xs:double(tokenize($range,'-')[2]))"/>
<xsl:variable name="ageRangeTo" select="if ($ageMax and $ageMax = xs:double('INF') or $POS22 = 'e') then '' else $ageMax"/>
<xsl:if test="$ageRangeFrom or $ageRangeTo">
<xsl:call-template name="meta">
<xsl:with-param name="property" select="nlb:prefixed-property('typicalAgeRange')"/>
<xsl:with-param name="value" select="concat($ageRangeFrom,'-',$ageRangeTo)"/>
<xsl:with-param name="context" select="($tag385sub0_contexts, $tag019a_context, .)[1]"/>
<xsl:with-param name="controlfield_position" select="if (($tag385sub0_contexts, $tag019a_context, .)[1] = .) then '22' else ()"/>
</xsl:call-template>
</xsl:if>
<!--
- if *008/22 is 'e', then use "Adult"
- else if *OO8/22 is 'd', then use "Adolescent"
- else if *008/22 is 'j' and *385$0 points to adult (https://schema.nb.no/Bibliographic/Values/TG1016), then use "Adolescent"
- else if *385$0 points to an audience, then use that (vu/mu=Adolescent, u/bu/b/a/aa=Child)
- else if *019$a points to an audience, then use that (mu=Adolescent, u/bu/b/a=Child)
- else if *008/22 is 'j', then use "Child"
- else use "Adult"
-->
<xsl:choose>
<xsl:when test="$POS22='e'">
<xsl:call-template name="meta">
<xsl:with-param name="controlfield_position" select="'22'"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adult'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$POS22='d'">
<xsl:call-template name="meta">
<xsl:with-param name="controlfield_position" select="'22'"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adolescent'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$POS22='j' and $audienceFrom385sub0 = 'Adult'">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$tag385sub0_contexts[1]"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adolescent'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$audienceFrom385sub0 = 'Adolescent'">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$tag385sub0_contexts[1]"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adolescent'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$audienceFrom385sub0 = 'Child'">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$tag385sub0_contexts[1]"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Child'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$audienceFrom019a = 'Adolescent'">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$tag019a_context"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adolescent'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$audienceFrom019a = 'Child'">
<xsl:call-template name="meta">
<xsl:with-param name="context" select="$tag019a_context"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Child'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$POS22='j'">
<xsl:call-template name="meta">
<xsl:with-param name="controlfield_position" select="'22'"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Child'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="meta">
<xsl:with-param name="controlfield_position" select="'22'"/>
<xsl:with-param name="property" select="nlb:prefixed-property('audience')"/>
<xsl:with-param name="value" select="'Adult'"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$POS33='0'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'33'"/><xsl:with-param name="property" select="'dc:type.fiction'"/><xsl:with-param name="value" select="'false'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'33'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Non-fiction'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS33='1'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'33'"/><xsl:with-param name="property" select="'dc:type.fiction'"/><xsl:with-param name="value" select="'true'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'33'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Fiction'"/></xsl:call-template>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$POS34='a'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Biography'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Autobiography'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS34='b'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Biography'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Individual biography'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS34='c'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Biography'"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Collective biography'"/></xsl:call-template>
</xsl:when>
<xsl:when test="$POS34='d'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Biography'"/></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<!-- ('0', ' ') -->
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="'Non-biography'"/></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$POS34 = ('a', 'b', 'c', 'd')">
<xsl:variable name="subject-id" select="'subject-008'"/>
<xsl:variable name="bibliofil-id" select="'19880600'"/> <!-- unfortunately hardcoded here - if we had a good way to do it we could look for *655$aBiografisk in data.aut.txt and use $_ from there. -->
<xsl:variable name="context" select="."/>
<xsl:variable name="mainGenre" select="'Biografisk'"/>
<xsl:variable name="genre" select="$mainGenre"/>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre'"/><xsl:with-param name="value" select="$genre"/><xsl:with-param name="id" select="$subject-id"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.genre.no'"/><xsl:with-param name="value" select="$genre"/><xsl:with-param name="refines" select="$subject-id"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="'dc:type.mainGenre'"/><xsl:with-param name="value" select="$mainGenre"/><xsl:with-param name="refines" select="$subject-id"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'34'"/><xsl:with-param name="property" select="nlb:prefixed-property('bibliofil-id')"/><xsl:with-param name="value" select="$bibliofil-id"/><xsl:with-param name="refines" select="$subject-id"/></xsl:call-template>
</xsl:if>
<xsl:choose>
<xsl:when test="normalize-space($POS35-37) and normalize-space($POS35-37) != 'mul'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'35-37'"/><xsl:with-param name="property" select="'dc:language'"/><xsl:with-param name="value" select="$POS35-37"/></xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="*:controlfield[@tag='009']">
<xsl:variable name="POS05" select="substring(text(),6,1)"/>
<xsl:if test="$POS05 = 'd'">
<xsl:call-template name="meta"><xsl:with-param name="controlfield_position" select="'05'"/><xsl:with-param name="property" select="nlb:prefixed-property('availability')"/><xsl:with-param name="value" select="'deleted'"/></xsl:call-template>
</xsl:if>
</xsl:template>
<!-- 010 - 04X KONTROLLNUMMER OG KODER -->
<xsl:template match="*:datafield[@tag='015']">
<!--<xsl:message select="'NORMARC-felt ignorert: 015 ANDRE BIBLIOGRAFISKE KONTROLLNUMMER'"/>-->
</xsl:template>
<xsl:template match="*:datafield[@tag='019']">
<!-- *019$a handled in template for *008 -->
<xsl:variable name="b" as="element()*">
<xsl:for-each select="*:subfield[@code='b']">
<xsl:variable name="context" select="."/>
<xsl:for-each select="tokenize(replace(text(),'\s',''),'[,\.\-_]')">
<xsl:choose>
<xsl:when test=".='a'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kartografisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Cartographic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ab'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kartografisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Cartographic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Atlas'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Atlas'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='aj'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kartografisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Cartographic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kart'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Map'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='b'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Manuskripter'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Manuscripts'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='c'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Musikktrykk'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Sheet music'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format'"/><xsl:with-param name="value" select="'Braille'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.no'"/><xsl:with-param name="value" select="'Punktskrift'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='d'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='da'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Grammofonplate'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Gramophone record'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='db'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kassett'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Cassette'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dc'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'CD (kompaktplate)'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Compact Disk'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format'"/><xsl:with-param name="value" select="'DAISY 2.02'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:type.audio'"/><xsl:with-param name="value" select="'true'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dd'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Avspiller med lydfil'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Player with audio file'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='de'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Digikort'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Digikort'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dg'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Musikk'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Music'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dh'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Språkkurs'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Language course'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='di'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydbok'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio book'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dj'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Annen tale/annet'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Other voice/other'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format'"/><xsl:with-param name="value" select="'DAISY 2.02'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:type.audio'"/><xsl:with-param name="value" select="'true'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='dk'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Lydopptak'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Audio recording'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kombidokument'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Combined document'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='e'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ec'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Filmspole'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video tape'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ed'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Videokassett (VHS)'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'VHS'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ee'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Videoplate (DVD)'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'DVD'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ef'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Blu-ray-plate'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Blu-ray'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='eg'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Film'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Video'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'3D'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'3D'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='f'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Grafisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Graphic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='fd'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Grafisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Graphic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Dias'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Slides'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='ff'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Grafisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Graphic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Fotografi'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Photography'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='fi'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Grafisk materiale'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Graphic materials'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Kunstreproduksjon'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Art reproduction'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='g'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Elektronisk ressurs'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Electronic resource'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format'"/><xsl:with-param name="value" select="'XHTML'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:type.text'"/><xsl:with-param name="value" select="'true'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='gb'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Elektronisk ressurs'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Electronic resource'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Diskett'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Floppy'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='gc'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Elektronisk ressurs'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Electronic resource'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'DVD-ROM'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'DVD'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
</xsl:when>
<xsl:when test=".='gd'">
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'Elektronisk ressurs'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'Electronic resource'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other.no'"/><xsl:with-param name="value" select="'CD-ROM'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>
<xsl:call-template name="meta"><xsl:with-param name="property" select="'dc:format.other'"/><xsl:with-param name="value" select="'CD'"/><xsl:with-param name="context" select="$context"/></xsl:call-template>