1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:xhtml="http://www.w3.org/1999/xhtml"
6 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7 xmlns:marc="http://www.loc.gov/MARC21/slim"
8 xmlns:hold="http://open-ils.org/spec/holdings/v1"
10 <xsl:output method="html" doctype-public="-//W3C/DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
11 <xsl:template match="/">
14 <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
15 <link href="{$base_dir}/htmlcard.css" rel="stylesheet" type="text/css" />
16 <xsl:apply-templates select="/marc:collection/xhtml:link"/>
17 <title><xsl:value-of select="//marc:datafield[@tag='245']/marc:subfield[@code='a']"/></title>
20 <xsl:apply-templates select="//marc:record"/>
25 <xsl:template match="marc:record">
26 <div class="cardimage">
27 <xsl:apply-templates select="marc:datafield[@tag!='082' and @tag!='092' and @tag!='010']"/>
29 <xsl:apply-templates select="xhtml:link[@rel='otherFormat' and contains(@href,'format=')]"/>
30 <xsl:apply-templates select="marc:controlfield[@tag='001']"/>
31 <xsl:apply-templates select="marc:datafield[@tag='082' or @tag='092' or @tag='010']"/>
33 <xsl:apply-templates select="xhtml:abbr[@class='unapi-id']"/>
36 <xsl:apply-templates select="hold:volumes"/>
40 <xsl:template match="xhtml:abbr">
42 <xsl:attribute name="title">
43 <xsl:value-of select="@title"/>
45 <xsl:attribute name="class">
46 <xsl:value-of select="@class"/>
48 <xsl:value-of select="."/>
52 <xsl:template match="xhtml:link">
54 <xsl:when test="@title='unapi'">
55 <link rel="unapi-server" title="unAPI" type="application/xml">
56 <xsl:attribute name="href">
57 <xsl:value-of select="@href"/>
61 <xsl:when test="@rel='otherFormat' and contains(@href,'format=')">
63 <xsl:attribute name="href">
64 <xsl:value-of select="@href"/>
66 <xsl:value-of select="@title"/>
73 <xsl:template match="hold:volumes">
74 <xsl:if test="count(hold:volume/hold:uris/hold:uri) > 0">
77 <xsl:apply-templates select="hold:volume/hold:uris/hold:uri"/>
80 <xsl:if test="count(hold:volume/hold:copies/hold:copy) > 0">
83 <xsl:apply-templates select="hold:volume">
84 <xsl:sort select="@lib"/>
85 </xsl:apply-templates>
90 <xsl:template match="hold:volume">
94 <xsl:attribute name="href">
95 <xsl:value-of select="concat('/opac/extras/browse/html/call_number/',@lib,'/',@label)"/>
97 <xsl:value-of select="./@label"/>
100 <xsl:apply-templates select="hold:copies"/>
104 <xsl:template match="hold:uri">
107 <xsl:attribute name="href">
108 <xsl:value-of select="@href"/>
110 <xsl:value-of select="@label"/>
112 <xsl:if test="@use_restriction != ''">
113 <span> (Use Restriction: </span>
114 <xsl:value-of select="@use_restriction"/>
120 <xsl:template match="hold:copies">
122 <xsl:apply-templates select="hold:copy">
123 <xsl:sort select="hold:location"/>
124 </xsl:apply-templates>
128 <xsl:template match="hold:copy">
129 <li> <xsl:value-of select="@barcode"/>
131 <li>Circulating from <b><xsl:value-of select="hold:circlib"/></b></li>
132 <li>Located at <b><xsl:value-of select="hold:location"/></b></li>
133 <li>Status is <b><xsl:value-of select="hold:status"/></b></li>
134 <xsl:apply-templates select="hold:statcats"/>
139 <xsl:template match="hold:statcats">
140 <xsl:if test="count(hold:statcat) > 0">
141 <li>Statistical Catagories
143 <xsl:apply-templates select="hold:statcat">
144 <xsl:sort select="@name"/>
145 </xsl:apply-templates>
151 <xsl:template match="hold:statcat">
152 <li> <b><xsl:value-of select="@name"/></b>: <xsl:value-of select="."/> </li>
155 <xsl:template match="marc:controlfield">
156 <span class="oclc">#<xsl:value-of select="substring(.,4)"/></span>
159 <xsl:template match="marc:datafield">
160 <xsl:if test="starts-with(@tag, '1')">
161 <p class="mainheading">
163 <xsl:attribute name="href">
164 <xsl:value-of select="concat('/opac/extras/opensearch/1.1/-/html-full/author?searchTerms=',.)"/>
166 <xsl:value-of select="."/>
171 <xsl:if test="starts-with(@tag, '24') and /marc:record/marc:datafield[@tag='100']">
172 <span class="title"><xsl:value-of select="."/></span>
175 <xsl:if test="starts-with(@tag, '24') and not(/marc:record/marc:datafield[@tag='100'])">
176 <span class="titlemain"><xsl:value-of select="."/></span><br/>
179 <xsl:if test="@tag='260'">
180 <xsl:value-of select="."/>
183 <xsl:if test="@tag='300'">
184 <p class="extent"><xsl:value-of select="."/></p>
187 <xsl:if test="starts-with(@tag, '5')">
188 <p class="note"><xsl:value-of select="."/></p>
191 <xsl:if test="@tag='600'">
192 <span class='counter'><xsl:number count="marc:datafield[@tag='600']"/>.</span> <xsl:apply-templates select="marc:subfield"/>
195 <xsl:if test="@tag='650'">
196 <span class='counter'><xsl:number count="marc:datafield[@tag='650']"/>.</span> <xsl:apply-templates select="marc:subfield"/>
199 <xsl:if test="@tag='653'">
200 <span class="counter"><xsl:number format="i" count="marc:datafield[@tag='653']"/>.</span> <xsl:apply-templates select="marc:subfield"/>
203 <xsl:if test="@tag='010'">
204 <xsl:variable name="LCCN.nospace" select="translate(., ' ', '')"/>
205 <xsl:variable name="LCCN.length" select="string-length($LCCN.nospace)"/>
206 <xsl:variable name="LCCN.display" select="concat(substring($LCCN.nospace, 1, $LCCN.length - 6), '-', format-number(substring($LCCN.nospace, $LCCN.length - 5),'#'))"/>
207 <span class="LCCN">LCCN:<xsl:value-of select="$LCCN.display"/></span>
210 <xsl:if test="@tag='082' or @tag='092'">
211 <span class="DDC"><xsl:value-of select="marc:subfield[@code='a']"/></span>
214 <xsl:if test="@tag='856' and not(marc:subfield[@code='9'])">
215 <br/><xsl:apply-templates mode="link" select="marc:subfield" />
220 <xsl:template match="marc:subfield" mode="link">
221 <xsl:if test="@code='u'">
223 <a class="url" href="{.}">
225 <xsl:when test="../marc:subfield[@code='y']">
226 <xsl:value-of select="../marc:subfield[@code='y']"/>
228 <xsl:when test="../marc:subfield[@code='3']">
229 <xsl:value-of select="../marc:subfield[@code='3']"/>
232 <xsl:value-of select="."/>
240 <xsl:template match="marc:subfield">
241 <xsl:if test="@code!='2'">
242 <xsl:if test="@code!='a'">--</xsl:if>
244 <xsl:when test="./@code!='v' and ./parent::*[starts-with(@tag,'6')]">
246 <xsl:attribute name="href">
247 <xsl:value-of select="concat('/opac/extras/opensearch/1.1/-/html-full/subject?searchTerms=',.)"/>
249 <xsl:value-of select="."/>
253 <xsl:value-of select="."/>