-
Notifications
You must be signed in to change notification settings - Fork 5
/
00-LDR.xml
94 lines (93 loc) · 5.42 KB
/
00-LDR.xml
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
<?xml version='1.0'?>
<rules xmlns="http://www.loc.gov/bf2marc"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:bf="http://id.loc.gov/ontologies/bibframe/"
xmlns:bflc="http://id.loc.gov/ontologies/bflc/"
xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<cf tag="LDR">
<fixed-field>
<!-- 00-04 -->
<position default=" "/>
<!-- 05 -->
<position default="n">
<switch>
<case test="$vAdminMetadata/bf:status[@rdf:resource='http://id.loc.gov/vocabulary/mstatus/d'] or
$vAdminMetadata/bf:status/bf:Status[@rdf:about='http://id.loc.gov/vocabulary/mstatus/d']">
<transform><xsl:value-of select="'d'"/></transform>
</case>
<case test="$vAdminMetadata/bf:status[@rdf:resource='http://id.loc.gov/vocabulary/mstatus/c'] or
$vAdminMetadata/bf:status/bf:Status[@rdf:about='http://id.loc.gov/vocabulary/mstatus/c']">
<transform><xsl:value-of select="'c'"/></transform>
</case>
<case test="$vAdminMetadata/bf:status[@rdf:resource] or
$vAdminMetadata/bf:status/bf:Status[@rdf:about]">
<select xpath="$vAdminMetadata/bf:status/@rdf:resource |
$vAdminMetadata/bf:status/bf:Status/@rdf:about">
<transform>
<xsl:variable name="vStatusCode">
<xsl:call-template name="tUriCode">
<xsl:with-param name="pUri" select="."/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="substring($vStatusCode, 1,1)"/></transform>
</select>
</case>
<case test="string-length($vAdminMetadata/bf:status/bf:Status/bf:code) = 1">
<select xpath="$vAdminMetadata/bf:status/bf:Status/bf:code"/>
</case>
</switch>
</position>
<!-- 06 -->
<position default="a">
<switch>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/NotatedMusic'] and bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Manuscript']">d</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/NotatedMusic']">c</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Cartography'] and bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Manuscript']">f</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Cartography']">e</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/MovingImage']">g</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/NonMusicAudio']">i</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/MusicAudio']">j</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/StillImage']">k</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Multimedia']">m</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/MixedMaterial']">p</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Object']">r</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Text'] and bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Manuscript']">t</case>
</switch>
</position>
<!-- 07 -->
<position default="m">
<switch>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Collection']">c</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Integrating']">i</case>
<case test="bf:Work/rdf:type[@rdf:resource='http://id.loc.gov/ontologies/bibframe/Serial']">s</case>
</switch>
</position>
<!-- 08-16 -->
<position default=" a22 "/>
<!-- 17 -->
<position default=" ">
<switch>
<case test="$vAdminMetadata/bflc:encodingLevel[@rdf:resource] or
$vAdminMetadata/bflc:encodingLevel/bflc:EncodingLevel[@rdf:about] or
$vAdminMetadata/bflc:encodingLevel/bflc:EncodingLevel[not(@rdf:about) and bf:code]">
<select xpath="$vAdminMetadata/bflc:encodingLevel/@rdf:resource |
$vAdminMetadata/bflc:encodingLevel/bflc:EncodingLevel/@rdf:about |
$vAdminMetadata/bflc:encodingLevel/bflc:EncodingLevel[not(@rdf:about)]/bf:code">
<var name="vLdr17" xpath="substring(.,string-length(.))"/>
<switch>
<case test="$vLdr17='f'"><transform><xsl:value-of select="' '"/></transform></case>
<case test="$vLdr17!=''"><transform><xsl:value-of select="$vLdr17"/></transform></case>
<case test="$vLdr17=''"><transform><xsl:value-of select="' '"/></transform></case>
</switch>
</select>
</case>
</switch>
</position>
<!-- 18-23 -->
<position default="i 4500"/>
</fixed-field>
</cf>
</rules>