Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
3 |
<!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com --> |
4 |
<!DOCTYPE stylesheet> |
5 |
<xsl:stylesheet version="1.0" |
6 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
7 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
8 |
xmlns:str="http://exslt.org/strings" |
9 |
exclude-result-prefixes="marc str"> |
10 |
|
11 |
<xsl:template name="show-title-245"> |
12 |
<!-- get leader 18: --> |
13 |
<xsl:variable name="leader" select="marc:leader"/> |
14 |
<xsl:variable name="leader18" select="substring($leader,19,1)"/> |
15 |
<!-- if $leader18 == c or n: add punctuation --> |
16 |
|
17 |
<!--Bug 13381 --> |
18 |
<xsl:if test="marc:datafield[@tag=245]"> |
19 |
<!-- |
20 |
<h1 class="title" property="name"> |
21 |
--> |
22 |
<xsl:for-each select="marc:datafield[@tag=245]"> |
23 |
<xsl:call-template name="subfieldSelect"> |
24 |
<xsl:with-param name="codes">a</xsl:with-param> |
25 |
</xsl:call-template> |
26 |
<xsl:text> </xsl:text> |
27 |
<!-- 13381 add additional subfields--> |
28 |
<!-- bug17625 adding f and g subfields --> |
29 |
<xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]"> |
30 |
<xsl:choose> |
31 |
<xsl:when test="@code='b'"> |
32 |
<!-- 13381 Span class around subfield h so it can be suppressed via css --> |
33 |
<span class="title_remainder"> |
34 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text> : </xsl:text> </xsl:if> |
35 |
<xsl:apply-templates/> <xsl:text> </xsl:text> </span> |
36 |
</xsl:when> |
37 |
<xsl:when test="@code='c'"> |
38 |
<!-- 13381 Span class around subfield c so it can be suppressed via css --> |
39 |
<span class="title_resp_stmt"> |
40 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text> / </xsl:text> </xsl:if> |
41 |
<xsl:apply-templates/> <xsl:text> </xsl:text> </span> |
42 |
</xsl:when> |
43 |
<xsl:when test="@code='f'"> |
44 |
<span class="title_incldat"> |
45 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>, </xsl:text> </xsl:if> |
46 |
<xsl:apply-templates/></span> |
47 |
</xsl:when> |
48 |
<xsl:when test="@code='g'"> |
49 |
<span class="title_bulkdat"> |
50 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>, </xsl:text> </xsl:if> |
51 |
<xsl:apply-templates/></span> |
52 |
</xsl:when> |
53 |
<xsl:when test="@code='h'"> |
54 |
<!-- 13381 Span class around subfield h so it can be suppressed via css --> |
55 |
<span class="title_medium"> |
56 |
<xsl:text> </xsl:text> |
57 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>[</xsl:text> </xsl:if> |
58 |
<xsl:apply-templates/> |
59 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>]</xsl:text> </xsl:if> |
60 |
</span> |
61 |
</xsl:when> |
62 |
|
63 |
<xsl:when test="@code='k'"> |
64 |
<span class="title_form"> |
65 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text> : </xsl:text> </xsl:if> |
66 |
<xsl:apply-templates/> <xsl:text> </xsl:text> </span> |
67 |
</xsl:when> |
68 |
<xsl:when test="@code='n'"> |
69 |
<span class="title_n"> |
70 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text> : </xsl:text> </xsl:if> |
71 |
<xsl:apply-templates/></span> |
72 |
</xsl:when> |
73 |
<xsl:when test="@code='p'"> |
74 |
<span class="title_p"> |
75 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>, </xsl:text> </xsl:if> |
76 |
<xsl:apply-templates/></span> |
77 |
</xsl:when> |
78 |
<xsl:when test="@code='s'"> |
79 |
<span class="title_s"> |
80 |
<xsl:if test="$leader18='c' or $leader18='n'"> <xsl:text>. </xsl:text> </xsl:if> |
81 |
<xsl:apply-templates/></span> |
82 |
</xsl:when> |
83 |
|
84 |
<xsl:otherwise> |
85 |
<xsl:apply-templates/> |
86 |
<xsl:text> </xsl:text> |
87 |
</xsl:otherwise> |
88 |
</xsl:choose> |
89 |
</xsl:for-each> |
90 |
</xsl:for-each> |
91 |
<!-- |
92 |
</h1> |
93 |
--> |
94 |
</xsl:if> |
95 |
</xsl:template> |
96 |
|
97 |
</xsl:stylesheet> |