Skip to content

Commit 35f2900

Browse files
committed
Output correct indicator value when it is 630 hub; allow names as paired 880s.
1 parent 66176f0 commit 35f2900

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

rules/08-6XX.xml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
</switch>
7777
</var>
7878

79-
<!--
79+
8080
<var name="v880Script">
8181
<switch>
8282
<case test="self::node()/*/rdfs:label/@xml:lang">
@@ -121,7 +121,6 @@
121121
</xsl:if>
122122
</transform>
123123
</var>
124-
-->
125124

126125
<var name="vShared0and1">
127126
<switch>
@@ -242,7 +241,7 @@
242241
</ind1>
243242
<ind2 default="4">
244243
<switch>
245-
<case test="contains($relURI, '/subjects/') or contains($relURI, '/names/')">0</case>
244+
<case test="contains($relURI, '/subjects/') or contains($relURI, '/names/') or contains($relURI, '/resources/hubs/')">0</case>
246245
<case test="contains($relURI, '/childrensSubjects/')">1</case>
247246
<case test="contains($relURI, '/mesh/')">2</case>
248247
<case test="contains($relURI, '/nalt/')">3</case>
@@ -268,12 +267,16 @@
268267
<case test="bf:source[@rdf:resource='http://id.loc.gov/vocabulary/subjectSchemes/rvm']">6</case>
269268
</switch>
270269
</ind2>
271-
<!--<switch>
272-
<case test="$vNameVariant//marc:record">
273-
<!-\- We have a variant, so we need to create an 880 link. -\->
270+
<switch>
271+
<case test="(
272+
$vSubjectTag='600' or
273+
$vSubjectTag='610' or
274+
$vSubjectTag='611'
275+
) and $vNameVariant//marc:record">
276+
<!-- We have a variant, so we need to create an 880 link. -->
274277
<sf code="6"><transform><xsl:value-of select="concat('880-', $vOccurrenceNumber)"/></transform></sf>
275278
</case>
276-
</switch>-->
279+
</switch>
277280
<transform>
278281
<xsl:for-each select="$vRelResource//marc:datafield[starts-with(@tag, '1')]/marc:subfield[contains($vValidSubfields,@code)]">
279282
<marc:subfield>
@@ -310,10 +313,13 @@
310313
</sf>
311314
<transform><xsl:copy-of select="$vShared0and1" /></transform>
312315
</df>
313-
314-
<!-- 880
316+
315317
<switch>
316-
<case test="$vNameVariant//marc:record">
318+
<case test="(
319+
$vSubjectTag='600' or
320+
$vSubjectTag='610' or
321+
$vSubjectTag='611'
322+
) and $vNameVariant//marc:record">
317323
<df tag="880">
318324
<ind1 default=" ">
319325
<switch>
@@ -330,7 +336,7 @@
330336
</ind1>
331337
<ind2 default="4">
332338
<switch>
333-
<case test="contains($relURI, '/subjects/') or contains($relURI, '/names/')">0</case>
339+
<case test="contains($relURI, '/subjects/') or contains($relURI, '/names/') or contains($relURI, '/resources/hubs/')">0</case>
334340
<case test="contains($relURI, '/childrensSubjects/')">1</case>
335341
<case test="contains($relURI, '/mesh/')">2</case>
336342
<case test="contains($relURI, '/nalt/')">3</case>
@@ -351,7 +357,7 @@
351357
</ind2>
352358
<switch>
353359
<case test="$vNameVariant//marc:record">
354-
<!-\- We have a variant, so we need to create an 880 link. -\->
360+
<!-- We have a variant, so we need to create an 880 link. -->
355361
<sf code="6"><transform><xsl:value-of select="concat($vSubjectTag, '-', $vOccurrenceNumber, '/', $v880Script)"/></transform></sf>
356362
</case>
357363
</switch>
@@ -381,7 +387,7 @@
381387
</transform>
382388
<sf code="2">
383389
<switch>
384-
<!-\- <case test="contains($relURI, '/names/')">naf</case> -\->
390+
<!-- <case test="contains($relURI, '/names/')">naf</case> -->
385391
<case test="contains($relURI, '/genreForms/')">lcgft</case>
386392
<case test="contains($relURI, '/demogrpahicTerms/')">lcdgt</case>
387393
<case test="contains($relURI, '/graphicMaterials/')">lctgm</case>
@@ -393,7 +399,7 @@
393399
</df>
394400
</case>
395401
</switch>
396-
-->
402+
397403
</case>
398404
<case test="self::node()[
399405
not(@rdf:resource) and

0 commit comments

Comments
 (0)