View | Details | Raw Unified | Return to bug 5079
Collapse All | Expand All

(-)a/C4/XSLT.pm (-5 / +14 lines)
Lines 227-238 sub buildKohaItemsNamespace { Link Here
227
    my ($biblionumber, $hidden_items) = @_;
227
    my ($biblionumber, $hidden_items) = @_;
228
228
229
    my @items = C4::Items::GetItemsInfo($biblionumber);
229
    my @items = C4::Items::GetItemsInfo($biblionumber);
230
230
    if ($hidden_items && @$hidden_items) {
231
    if ($hidden_items && @$hidden_items) {
231
        my %hi = map {$_ => 1} @$hidden_items;
232
        my %hi = map {$_ => 1} @$hidden_items;
232
        @items = grep { !$hi{$_->{itemnumber}} } @items;
233
        @items = grep { !$hi{$_->{itemnumber}} } @items;
233
    }
234
    }
235
236
    my $shelflocations =GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac');
237
234
    my $branches = GetBranches();
238
    my $branches = GetBranches();
235
    my $itemtypes = GetItemTypes();
239
    my $itemtypes = GetItemTypes();
240
    my $location = "";
236
    my $xml = '';
241
    my $xml = '';
237
    for my $item (@items) {
242
    for my $item (@items) {
238
        my $status;
243
        my $status;
Lines 271-282 sub buildKohaItemsNamespace { Link Here
271
            $status = "available";
276
            $status = "available";
272
        }
277
        }
273
        my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):'';
278
        my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):'';
274
	    my $itemcallnumber = xml_escape($item->{itemcallnumber});
279
	if(C4::Context->preference("OpacItemLocation") && defined $item->{'location'}) {
280
	    $location = xml_escape($shelflocations->{$item->{location}});
281
	}
282
	my $itemcallnumber = xml_escape($item->{itemcallnumber});
275
        $xml.= "<item><homebranch>$homebranch</homebranch>".
283
        $xml.= "<item><homebranch>$homebranch</homebranch>".
276
		"<status>$status</status>".
284
	    "<location>$location</location>".
277
		"<itemcallnumber>".$itemcallnumber."</itemcallnumber>"
285
	    "<status>$status</status>".
278
        . "</item>";
286
	    "<itemcallnumber>".$itemcallnumber."</itemcallnumber>"
279
287
	    . "</item>";
288
	
280
    }
289
    }
281
    $xml = "<items xmlns=\"http://www.koha-community.org/items\">".$xml."</items>";
290
    $xml = "<items xmlns=\"http://www.koha-community.org/items\">".$xml."</items>";
282
    return $xml;
291
    return $xml;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 95-100 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
95
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
95
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
96
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserjs','','Define custom javascript for inclusion in OPAC','70|10','Textarea');
96
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserjs','','Define custom javascript for inclusion in OPAC','70|10','Textarea');
97
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserlogin',1,'Enable or disable display of user login features',NULL,'YesNo');
97
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserlogin',1,'Enable or disable display of user login features',NULL,'YesNo');
98
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacItemLocation',0,'Show the shelving location of items in the opac',NULL,'YesNo');
98
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('patronimages',0,'Enable patron images for the Staff Client',NULL,'YesNo');
99
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('patronimages',0,'Enable patron images for the Staff Client',NULL,'YesNo');
99
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACpatronimages',0,'Enable patron images in the OPAC',NULL,'YesNo');
100
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACpatronimages',0,'Enable patron images in the OPAC',NULL,'YesNo');
100
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('printcirculationslips',1,'If ON, enable printing circulation receipts','','YesNo');
101
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('printcirculationslips',1,'If ON, enable printing circulation receipts','','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 5212-5217 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5212
    SetVersion($DBversion);
5212
    SetVersion($DBversion);
5213
}
5213
}
5214
5214
5215
$DBversion = '3.07.00.0081';
5216
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
5217
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacItemLocation',1,'Show the shelving location of items in the opac',NULL,'YesNo');");
5218
    print "Upgrade to $DBversion done (Add OpacItemLocation syspref)\n";
5219
    SetVersion ($DBversion);
5220
}
5221
5215
=head1 FUNCTIONS
5222
=head1 FUNCTIONS
5216
5223
5217
=head2 TableExists($table)
5224
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 229-234 OPAC: Link Here
229
                  no: "Don't allow"
229
                  no: "Don't allow"
230
            - patrons to log in to their accounts on the OPAC.
230
            - patrons to log in to their accounts on the OPAC.
231
        -
231
        -
232
            - pref: OpacItemLocation
233
              choices:
234
                  yes: Show
235
                  no: "Don't Show"
236
            - the shelving location of items in opac results.
237
        -
232
            - pref: OpacPasswordChange
238
            - pref: OpacPasswordChange
233
              choices:
239
              choices:
234
                  yes: Allow
240
                  yes: Allow
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl (-1017 / +1057 lines)
Lines 2-24 Link Here
2
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
2
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
4
<xsl:stylesheet version="1.0"
4
<xsl:stylesheet version="1.0"
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
5
		xmlns:marc="http://www.loc.gov/MARC21/slim"
6
  xmlns:items="http://www.koha-community.org/items"
6
		xmlns:items="http://www.koha-community.org/items"
7
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
  exclude-result-prefixes="marc items">
8
		exclude-result-prefixes="marc items">
9
    <xsl:import href="MARC21slimUtils.xsl"/>
9
  <xsl:import href="MARC21slimUtils.xsl"/>
10
    <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
10
  <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
11
    <xsl:key name="item-by-status" match="items:item" use="items:status"/>
11
  <xsl:key name="item-by-status" match="items:item" use="items:status"/>
12
    <xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
12
  <xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
13
13
  <xsl:key name="item-by-status-and-location" match="items:item" use="concat(items:status, ' ', items:location)"/>
14
    <xsl:template match="/">
14
  
15
            <xsl:apply-templates/>
15
  <xsl:template match="/">
16
    </xsl:template>
16
    <xsl:apply-templates/>
17
    <xsl:template match="marc:record">
17
  </xsl:template>
18
18
  <xsl:template match="marc:record">
19
        <!-- Option: Display Alternate Graphic Representation (MARC 880)  -->
19
    
20
        <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
20
    <!-- Option: Display Alternate Graphic Representation (MARC 880)  -->
21
21
    <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22
    
22
    <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
23
    <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
23
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24
    <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25
    <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
Lines 27-866 Link Here
27
    <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/>
28
    <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/>
28
    <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
29
    <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
29
    <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
30
    <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
30
        <xsl:variable name="leader" select="marc:leader"/>
31
    <xsl:variable name="leader" select="marc:leader"/>
31
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
32
    <xsl:variable name="leader6" select="substring($leader,7,1)"/>
32
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
33
    <xsl:variable name="leader7" select="substring($leader,8,1)"/>
33
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
34
    <xsl:variable name="leader19" select="substring($leader,20,1)"/>
34
        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
35
    <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
35
        <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
36
    <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
36
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
37
    <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
37
        <xsl:variable name="typeOf008">
38
    <xsl:variable name="typeOf008">
38
            <xsl:choose>
39
      <xsl:choose>
39
                <xsl:when test="$leader19='a'">ST</xsl:when>
40
	<xsl:when test="$leader19='a'">ST</xsl:when>
40
                <xsl:when test="$leader6='a'">
41
	<xsl:when test="$leader6='a'">
41
                    <xsl:choose>
42
	  <xsl:choose>
42
                        <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
43
	    <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
43
                        <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">CR</xsl:when>
44
	    <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">CR</xsl:when>
44
                    </xsl:choose>
45
	  </xsl:choose>
45
                </xsl:when>
46
	</xsl:when>
46
                <xsl:when test="$leader6='t'">BK</xsl:when>
47
	<xsl:when test="$leader6='t'">BK</xsl:when>
47
                <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
48
	<xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
48
                <xsl:when test="$leader6='m'">CF</xsl:when>
49
	<xsl:when test="$leader6='m'">CF</xsl:when>
49
                <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
50
	<xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
50
                <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
51
	<xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
51
                <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
52
	<xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
52
                <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
53
	<xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
53
            </xsl:choose>
54
      </xsl:choose>
54
        </xsl:variable>
55
    </xsl:variable>
55
        <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
56
    <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
56
        <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
57
    <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
57
        <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
58
    <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
58
        <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
59
    <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
59
        <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
60
    <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
60
        <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
61
    <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
61
        <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
62
    <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
62
        <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
63
    <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
63
        <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
64
    <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
64
65
    
65
        <xsl:variable name="physicalDescription">
66
    <xsl:variable name="physicalDescription">
66
            <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
67
      <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
67
                reformatted digital
68
	reformatted digital
68
            </xsl:if>
69
      </xsl:if>
69
            <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
70
      <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
70
                digitized microfilm
71
	digitized microfilm
71
            </xsl:if>
72
      </xsl:if>
72
            <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
73
      <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
73
                digitized other analog
74
	digitized other analog
74
            </xsl:if>
75
      </xsl:if>
75
76
      
76
            <xsl:variable name="check008-23">
77
      <xsl:variable name="check008-23">
77
                <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='CR' or $typeOf008='MX'">
78
	<xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='CR' or $typeOf008='MX'">
78
                    <xsl:value-of select="true()"></xsl:value-of>
79
	  <xsl:value-of select="true()"></xsl:value-of>
79
                </xsl:if>
80
	</xsl:if>
80
            </xsl:variable>
81
      </xsl:variable>
81
            <xsl:variable name="check008-29">
82
      <xsl:variable name="check008-29">
82
                <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
83
	<xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
83
                    <xsl:value-of select="true()"></xsl:value-of>
84
	  <xsl:value-of select="true()"></xsl:value-of>
84
                </xsl:if>
85
	</xsl:if>
85
            </xsl:variable>
86
      </xsl:variable>
86
            <xsl:choose>
87
      <xsl:choose>
87
                <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
88
	<xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
88
                    braille
89
	  braille
89
                </xsl:when>
90
	</xsl:when>
90
                <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='CR') and ($controlField008-23=' ' or $controlField008='r'))">
91
	<xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='CR') and ($controlField008-23=' ' or $controlField008='r'))">
91
                    print
92
	  print
92
                </xsl:when>
93
	</xsl:when>
93
                <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
94
	<xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
94
                    electronic
95
	  electronic
95
                </xsl:when>
96
	</xsl:when>
96
                <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
97
	<xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
97
                    microfiche
98
	  microfiche
98
                </xsl:when>
99
	</xsl:when>
99
                <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
100
	<xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
100
                    microfilm
101
	  microfilm
101
                </xsl:when>
102
	</xsl:when>
102
            </xsl:choose>
103
      </xsl:choose>
103
<!--
104
      <!--
104
            <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
105
	  <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
105
                    <xsl:call-template name="chopBrackets">
106
	  <xsl:call-template name="chopBrackets">
106
                        <xsl:with-param name="chopString">
107
	  <xsl:with-param name="chopString">
107
                            <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
108
	  <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
108
                        </xsl:with-param>
109
	  </xsl:with-param>
109
                    </xsl:call-template>
110
	  </xsl:call-template>
110
            </xsl:if>
111
	  </xsl:if>
111
            <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
112
	  <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
112
                    <xsl:call-template name="chopBrackets">
113
	  <xsl:call-template name="chopBrackets">
113
                        <xsl:with-param name="chopString">
114
	  <xsl:with-param name="chopString">
114
                            <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
115
	  <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
115
                        </xsl:with-param>
116
	  </xsl:with-param>
116
                    </xsl:call-template>
117
	  </xsl:call-template>
117
            </xsl:if>
118
	  </xsl:if>
118
            <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
119
	  <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
119
                    <xsl:call-template name="chopBrackets">
120
	  <xsl:call-template name="chopBrackets">
120
                        <xsl:with-param name="chopString">
121
	  <xsl:with-param name="chopString">
121
                            <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
122
	  <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
122
                        </xsl:with-param>
123
	  </xsl:with-param>
123
                    </xsl:call-template>
124
	  </xsl:call-template>
124
            </xsl:if>
125
	  </xsl:if>
125
            <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
126
	  <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
126
                    <xsl:call-template name="chopBrackets">
127
	  <xsl:call-template name="chopBrackets">
127
                        <xsl:with-param name="chopString">
128
	  <xsl:with-param name="chopString">
128
                            <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
129
	  <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
129
                        </xsl:with-param>
130
	  </xsl:with-param>
130
                    </xsl:call-template>
131
	  </xsl:call-template>
131
            </xsl:if>
132
	  </xsl:if>
132
            <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
133
	  <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
133
                    <xsl:call-template name="chopBrackets">
134
	  <xsl:call-template name="chopBrackets">
134
                        <xsl:with-param name="chopString">
135
	  <xsl:with-param name="chopString">
135
                            <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
136
	  <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
136
                        </xsl:with-param>
137
	  </xsl:with-param>
137
                    </xsl:call-template>
138
	  </xsl:call-template>
138
            </xsl:if>
139
	  </xsl:if>
139
            <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
140
	  <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
140
                    <xsl:call-template name="chopBrackets">
141
	  <xsl:call-template name="chopBrackets">
141
                        <xsl:with-param name="chopString">
142
	  <xsl:with-param name="chopString">
142
                            <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
143
	  <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
143
                        </xsl:with-param>
144
	  </xsl:with-param>
144
                    </xsl:call-template>
145
	  </xsl:call-template>
145
            </xsl:if>
146
	  </xsl:if>
146
            <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
147
	  <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
147
                    <xsl:value-of select="."></xsl:value-of>
148
	  <xsl:value-of select="."></xsl:value-of>
148
            </xsl:for-each>
149
	  </xsl:for-each>
149
            <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
150
	  <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
150
                <xsl:choose>
151
	  <xsl:choose>
151
                    <xsl:when test="substring(text(),14,1)='a'">
152
	  <xsl:when test="substring(text(),14,1)='a'">
152
                        access
153
	  access
153
                    </xsl:when>
154
	  </xsl:when>
154
                    <xsl:when test="substring(text(),14,1)='p'">
155
	  <xsl:when test="substring(text(),14,1)='p'">
155
                        preservation
156
	  preservation
156
                    </xsl:when>
157
	  </xsl:when>
157
                    <xsl:when test="substring(text(),14,1)='r'">
158
	  <xsl:when test="substring(text(),14,1)='r'">
158
                        replacement
159
	  replacement
159
                    </xsl:when>
160
	  </xsl:when>
160
                </xsl:choose>
161
	  </xsl:choose>
161
            </xsl:for-each>
162
	  </xsl:for-each>
162
-->
163
      -->
163
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
164
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
164
                chip cartridge
165
	chip cartridge
165
            </xsl:if>
166
      </xsl:if>
166
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
167
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
167
                <img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="computer optical disc cartridge" title="computer optical disc cartridge" class="format"/>
168
	<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="computer optical disc cartridge" title="computer optical disc cartridge" class="format"/>
168
            </xsl:if>
169
      </xsl:if>
169
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
170
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
170
                magnetic disc
171
	magnetic disc
171
            </xsl:if>
172
      </xsl:if>
172
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
173
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
173
                magneto-optical disc
174
	magneto-optical disc
174
            </xsl:if>
175
      </xsl:if>
175
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
176
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
176
                <img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="optical disc" title="optical disc" class="format"/>
177
	<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="optical disc" title="optical disc" class="format"/>
177
            </xsl:if>
178
      </xsl:if>
178
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
179
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
179
		available online
180
	available online
180
                <img src="/opac-tmpl/prog/famfamfam/silk/drive_web.png" alt="remote" title="remote" class="format"/>
181
	<img src="/opac-tmpl/prog/famfamfam/silk/drive_web.png" alt="remote" title="remote" class="format"/>
181
            </xsl:if>
182
      </xsl:if>
182
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
183
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
183
                tape cartridge
184
	tape cartridge
184
            </xsl:if>
185
      </xsl:if>
185
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
186
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
186
                tape cassette
187
	tape cassette
187
            </xsl:if>
188
      </xsl:if>
188
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
189
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
189
                tape reel
190
	tape reel
190
            </xsl:if>
191
      </xsl:if>
191
192
      
192
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
193
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
193
                <img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="celestial globe" title="celestial globe" class="format"/>
194
	<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="celestial globe" title="celestial globe" class="format"/>
194
            </xsl:if>
195
      </xsl:if>
195
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
196
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
196
                <img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="earth moon globe" title="earth moon globe" class="format"/>
197
	<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="earth moon globe" title="earth moon globe" class="format"/>
197
            </xsl:if>
198
      </xsl:if>
198
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
199
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
199
                <img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="planetary or lunar globe" title="planetary or lunar globe" class="format"/>
200
	<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="planetary or lunar globe" title="planetary or lunar globe" class="format"/>
200
            </xsl:if>
201
      </xsl:if>
201
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
202
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
202
                <img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="terrestrial globe" title="terrestrial globe" class="format"/>
203
	<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="terrestrial globe" title="terrestrial globe" class="format"/>
203
            </xsl:if>
204
      </xsl:if>
204
205
      
205
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
206
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
206
                kit
207
	kit
207
            </xsl:if>
208
      </xsl:if>
208
209
      
209
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
210
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
210
                atlas
211
	atlas
211
            </xsl:if>
212
      </xsl:if>
212
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
213
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
213
                diagram
214
	diagram
214
            </xsl:if>
215
      </xsl:if>
215
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
216
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
216
                map
217
	map
217
            </xsl:if>
218
      </xsl:if>
218
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
219
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
219
                model
220
	model
220
            </xsl:if>
221
      </xsl:if>
221
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
222
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
222
                profile
223
	profile
223
            </xsl:if>
224
      </xsl:if>
224
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
225
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
225
                remote-sensing image
226
	remote-sensing image
226
            </xsl:if>
227
      </xsl:if>
227
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
228
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
228
                section
229
	section
229
            </xsl:if>
230
      </xsl:if>
230
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
231
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
231
                view
232
	view
232
            </xsl:if>
233
      </xsl:if>
234
      
235
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
236
	aperture card
237
      </xsl:if>
238
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
239
	microfiche
240
      </xsl:if>
241
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
242
	microfiche cassette
243
      </xsl:if>
244
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
245
	microfilm cartridge
246
      </xsl:if>
247
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
248
	microfilm cassette
249
      </xsl:if>
250
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
251
	microfilm reel
252
      </xsl:if>
253
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
254
	microopaque
255
      </xsl:if>
256
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
257
	film cartridge
258
      </xsl:if>
259
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
260
	film cassette
261
      </xsl:if>
262
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
263
	film reel
264
      </xsl:if>
265
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
266
	<img src="/opac-tmpl/prog/famfamfam/silk/chart_curve.png" alt="chart" title="chart" class="format"/>
267
      </xsl:if>
268
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
269
	collage
270
      </xsl:if>
271
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
272
	<img src="/opac-tmpl/prog/famfamfam/silk/pencil.png" alt="drawing" title="drawing" class="format"/>
273
      </xsl:if>
274
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
275
	<img src="/opac-tmpl/prog/famfamfam/silk/note.png" alt="flash card" title="flash card" class="format"/>
276
      </xsl:if>
277
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
278
	<img src="/opac-tmpl/prog/famfamfam/silk/paintbrush.png" alt="painting" title="painting" class="format"/>
279
      </xsl:if>
280
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
281
	photomechanical print
282
      </xsl:if>
283
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
284
	photonegative
285
      </xsl:if>
286
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
287
	photoprint
288
      </xsl:if>
289
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
290
	<img src="/opac-tmpl/prog/famfamfam/silk/picture.png" alt="picture" title="picture" class="format"/>
291
      </xsl:if>
292
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
293
	print
294
      </xsl:if>
295
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
296
	technical drawing
297
      </xsl:if>
298
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
299
	<img src="/opac-tmpl/prog/famfamfam/silk/script.png" alt="notated music" title="notated music" class="format"/>
300
      </xsl:if>
301
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
302
	filmslip
303
      </xsl:if>
304
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
305
	filmstrip cartridge
306
      </xsl:if>
307
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
308
	filmstrip roll
309
      </xsl:if>
310
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
311
	other filmstrip type
312
      </xsl:if>
313
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
314
	<img src="/opac-tmpl/prog/famfamfam/silk/pictures.png" alt="slide" title="slide" class="format"/>
315
      </xsl:if>
316
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
317
	transparency
318
      </xsl:if>
319
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
320
	remote-sensing image
321
      </xsl:if>
322
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
323
	cylinder
324
      </xsl:if>
325
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
326
	roll
327
      </xsl:if>
328
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
329
	sound cartridge
330
      </xsl:if>
331
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
332
	sound cassette
333
      </xsl:if>
334
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
335
	<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="sound disc" title="sound disc" class="format"/>
336
      </xsl:if>
337
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
338
	sound-tape reel
339
      </xsl:if>
340
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
341
	sound-track film
342
      </xsl:if>
343
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
344
	wire recording
345
      </xsl:if>
346
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
347
	braille
348
      </xsl:if>
349
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
350
	combination
351
      </xsl:if>
352
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
353
	moon
354
      </xsl:if>
355
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
356
	tactile, with no writing system
357
      </xsl:if>
358
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
359
	braille
360
      </xsl:if>
361
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
362
	<img src="/opac-tmpl/prog/famfamfam/silk/magnifier.png" alt="large print" title="large print" class="format"/>
363
      </xsl:if>
364
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
365
	regular print
366
      </xsl:if>
367
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
368
	text in looseleaf binder
369
      </xsl:if>
370
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
371
	videocartridge
372
      </xsl:if>
373
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
374
	videocassette
375
      </xsl:if>
376
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
377
	<img src="/opac-tmpl/prog/famfamfam/silk/dvd.png" alt="videodisc" title="videodisc" class="format"/>
378
      </xsl:if>
379
      <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
380
	videoreel
381
      </xsl:if>
382
      <!--
383
	  <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
384
	  <xsl:value-of select="."></xsl:value-of>
385
	  </xsl:for-each>
386
	  <xsl:for-each select="marc:datafield[@tag=300]">
387
	  <xsl:call-template name="subfieldSelect">
388
	  <xsl:with-param name="codes">abce</xsl:with-param>
389
	  </xsl:call-template>
390
	  </xsl:for-each>
391
      -->
392
    </xsl:variable>
233
393
234
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
394
    <!-- Title Statement: Alternate Graphic Representation (MARC 880) -->
235
                aperture card
395
    <xsl:if test="$display880">
236
            </xsl:if>
396
      <xsl:call-template name="m880Select">
237
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
397
	<xsl:with-param name="basetags">245</xsl:with-param>
238
                microfiche
398
	<xsl:with-param name="codes">abhfgknps</xsl:with-param>
239
            </xsl:if>
399
	<xsl:with-param name="bibno"><xsl:value-of  select="$biblionumber"/></xsl:with-param>
240
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
400
      </xsl:call-template>
241
                microfiche cassette
401
    </xsl:if>
242
            </xsl:if>
243
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
244
                microfilm cartridge
245
            </xsl:if>
246
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
247
                microfilm cassette
248
            </xsl:if>
249
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
250
                microfilm reel
251
            </xsl:if>
252
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
253
                microopaque
254
            </xsl:if>
255
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
256
                film cartridge
257
            </xsl:if>
258
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
259
                film cassette
260
            </xsl:if>
261
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
262
                film reel
263
            </xsl:if>
264
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
265
                <img src="/opac-tmpl/prog/famfamfam/silk/chart_curve.png" alt="chart" title="chart" class="format"/>
266
            </xsl:if>
267
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
268
                collage
269
            </xsl:if>
270
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
271
                 <img src="/opac-tmpl/prog/famfamfam/silk/pencil.png" alt="drawing" title="drawing" class="format"/>
272
            </xsl:if>
273
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
274
                <img src="/opac-tmpl/prog/famfamfam/silk/note.png" alt="flash card" title="flash card" class="format"/>
275
            </xsl:if>
276
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
277
                <img src="/opac-tmpl/prog/famfamfam/silk/paintbrush.png" alt="painting" title="painting" class="format"/>
278
            </xsl:if>
279
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
280
                photomechanical print
281
            </xsl:if>
282
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
283
                photonegative
284
            </xsl:if>
285
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
286
                photoprint
287
            </xsl:if>
288
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
289
                <img src="/opac-tmpl/prog/famfamfam/silk/picture.png" alt="picture" title="picture" class="format"/>
290
            </xsl:if>
291
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
292
                print
293
            </xsl:if>
294
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
295
                technical drawing
296
            </xsl:if>
297
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
298
                <img src="/opac-tmpl/prog/famfamfam/silk/script.png" alt="notated music" title="notated music" class="format"/>
299
            </xsl:if>
300
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
301
                filmslip
302
            </xsl:if>
303
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
304
                filmstrip cartridge
305
            </xsl:if>
306
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
307
                filmstrip roll
308
            </xsl:if>
309
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
310
                other filmstrip type
311
            </xsl:if>
312
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
313
                <img src="/opac-tmpl/prog/famfamfam/silk/pictures.png" alt="slide" title="slide" class="format"/>
314
            </xsl:if>
315
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
316
                transparency
317
            </xsl:if>
318
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
319
                remote-sensing image
320
            </xsl:if>
321
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
322
                cylinder
323
            </xsl:if>
324
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
325
                roll
326
            </xsl:if>
327
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
328
                sound cartridge
329
            </xsl:if>
330
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
331
                sound cassette
332
            </xsl:if>
333
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
334
                <img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="sound disc" title="sound disc" class="format"/>
335
            </xsl:if>
336
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
337
                sound-tape reel
338
            </xsl:if>
339
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
340
                sound-track film
341
            </xsl:if>
342
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
343
                wire recording
344
            </xsl:if>
345
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
346
                braille
347
            </xsl:if>
348
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
349
                combination
350
            </xsl:if>
351
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
352
                moon
353
            </xsl:if>
354
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
355
                tactile, with no writing system
356
            </xsl:if>
357
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
358
                braille
359
            </xsl:if>
360
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
361
                <img src="/opac-tmpl/prog/famfamfam/silk/magnifier.png" alt="large print" title="large print" class="format"/>
362
            </xsl:if>
363
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
364
                regular print
365
            </xsl:if>
366
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
367
                text in looseleaf binder
368
            </xsl:if>
369
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
370
                videocartridge
371
            </xsl:if>
372
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
373
                videocassette
374
            </xsl:if>
375
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
376
                <img src="/opac-tmpl/prog/famfamfam/silk/dvd.png" alt="videodisc" title="videodisc" class="format"/>
377
            </xsl:if>
378
            <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
379
                videoreel
380
            </xsl:if>
381
<!--
382
            <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
383
                    <xsl:value-of select="."></xsl:value-of>
384
            </xsl:for-each>
385
            <xsl:for-each select="marc:datafield[@tag=300]">
386
                    <xsl:call-template name="subfieldSelect">
387
                        <xsl:with-param name="codes">abce</xsl:with-param>
388
                    </xsl:call-template>
389
            </xsl:for-each>
390
-->
391
        </xsl:variable>
392
393
        <!-- Title Statement: Alternate Graphic Representation (MARC 880) -->
394
        <xsl:if test="$display880">
395
           <xsl:call-template name="m880Select">
396
              <xsl:with-param name="basetags">245</xsl:with-param>
397
              <xsl:with-param name="codes">abhfgknps</xsl:with-param>
398
              <xsl:with-param name="bibno"><xsl:value-of  select="$biblionumber"/></xsl:with-param>
399
           </xsl:call-template>
400
        </xsl:if>
401
402
402
        <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
403
    <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
403
404
404
        <xsl:if test="marc:datafield[@tag=245]">
405
    <xsl:if test="marc:datafield[@tag=245]">
405
        <xsl:for-each select="marc:datafield[@tag=245]">
406
      <xsl:for-each select="marc:datafield[@tag=245]">
406
            <xsl:variable name="title">
407
	<xsl:variable name="title">
407
                     <xsl:call-template name="subfieldSelect">
408
	  <xsl:call-template name="subfieldSelect">
408
                        <xsl:with-param name="codes">a</xsl:with-param>
409
	    <xsl:with-param name="codes">a</xsl:with-param>
409
                    </xsl:call-template>
410
	  </xsl:call-template>
410
                    <xsl:if test="marc:subfield[@code='b']">
411
	  <xsl:if test="marc:subfield[@code='b']">
411
                        <xsl:text> </xsl:text>
412
	    <xsl:text> </xsl:text>
412
                        <xsl:call-template name="subfieldSelect">
413
	    <xsl:call-template name="subfieldSelect">
413
                            <xsl:with-param name="codes">b</xsl:with-param>
414
	      <xsl:with-param name="codes">b</xsl:with-param>
414
                        </xsl:call-template>
415
	    </xsl:call-template>
415
                    </xsl:if>
416
	  </xsl:if>
416
                    <xsl:if test="marc:subfield[@code='h']">
417
	  <xsl:if test="marc:subfield[@code='h']">
417
                        <xsl:text> </xsl:text>
418
	    <xsl:text> </xsl:text>
418
                        <xsl:call-template name="subfieldSelect">
419
	    <xsl:call-template name="subfieldSelect">
419
                            <xsl:with-param name="codes">h</xsl:with-param>
420
	      <xsl:with-param name="codes">h</xsl:with-param>
420
                        </xsl:call-template>
421
	    </xsl:call-template>
421
                    </xsl:if>
422
	  </xsl:if>
422
                <xsl:text> </xsl:text>
423
	  <xsl:text> </xsl:text>
423
                    <xsl:call-template name="subfieldSelect">
424
	  <xsl:call-template name="subfieldSelect">
424
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
425
	    <xsl:with-param name="codes">fgknps</xsl:with-param>
425
                     </xsl:call-template>
426
	  </xsl:call-template>
426
            </xsl:variable>
427
	</xsl:variable>
427
            <xsl:variable name="titleChop">
428
	<xsl:variable name="titleChop">
428
                <xsl:call-template name="chopPunctuation">
429
	  <xsl:call-template name="chopPunctuation">
429
                    <xsl:with-param name="chopString">
430
	    <xsl:with-param name="chopString">
430
                        <xsl:value-of select="$title"/>
431
	      <xsl:value-of select="$title"/>
431
                    </xsl:with-param>
432
	    </xsl:with-param>
432
                </xsl:call-template>
433
	  </xsl:call-template>
433
            </xsl:variable>
434
	</xsl:variable>
434
            <xsl:value-of select="$titleChop"/>
435
	<xsl:value-of select="$titleChop"/>
435
        </xsl:for-each>
436
      </xsl:for-each>
436
        </xsl:if>
437
    </xsl:if>
437
    </a>
438
    </a>
438
    <p>
439
    <p>
439
440
440
    <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
441
      <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
441
    <xsl:if test="$display880">
442
      <xsl:if test="$display880">
442
      <xsl:call-template name="m880Select">
443
	<xsl:call-template name="m880Select">
443
      <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
444
	  <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
444
      <xsl:with-param name="codes">abc</xsl:with-param>
445
	  <xsl:with-param name="codes">abc</xsl:with-param>
445
      </xsl:call-template>
446
	</xsl:call-template>
446
    </xsl:if>
447
      </xsl:if>
447
448
448
    <xsl:choose>
449
      <xsl:choose>
449
    <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
450
	<xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
450
451
451
    by <span class="author">
452
	  by <span class="author">
452
        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
453
	  <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
453
            <xsl:choose>
454
            <xsl:choose>
454
            <xsl:when test="position()=last()">
455
	      <xsl:when test="position()=last()">
455
                <xsl:call-template name="nameABCDQ"/>.
456
                <xsl:call-template name="nameABCDQ"/>.
456
            </xsl:when>
457
	      </xsl:when>
457
            <xsl:otherwise>
458
	      <xsl:otherwise>
458
                <xsl:call-template name="nameABCDQ"/>;
459
                <xsl:call-template name="nameABCDQ"/>;
459
            </xsl:otherwise>
460
	      </xsl:otherwise>
460
            </xsl:choose>
461
            </xsl:choose>
461
        </xsl:for-each>
462
	  </xsl:for-each>
462
463
463
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
464
	  <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
464
            <xsl:choose>
465
            <xsl:choose>
465
            <xsl:when test="position()=1">
466
	      <xsl:when test="position()=1">
466
		<xsl:text> -- </xsl:text>
467
		<xsl:text> -- </xsl:text>
467
            </xsl:when>
468
	      </xsl:when>
468
            </xsl:choose>
469
            </xsl:choose>
469
            <xsl:choose>
470
            <xsl:choose>
470
            <xsl:when test="position()=last()">
471
	      <xsl:when test="position()=last()">
471
                <xsl:call-template name="nameABCDN"/> 
472
                <xsl:call-template name="nameABCDN"/> 
472
            </xsl:when>
473
	      </xsl:when>
473
            <xsl:otherwise>
474
	      <xsl:otherwise>
474
                <xsl:call-template name="nameABCDN"/>;
475
                <xsl:call-template name="nameABCDN"/>;
475
            </xsl:otherwise>
476
	      </xsl:otherwise>
476
            </xsl:choose>
477
            </xsl:choose>
477
        </xsl:for-each>
478
	  </xsl:for-each>
478
479
479
        <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
480
	  <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
480
            <xsl:choose>
481
            <xsl:choose>
481
            <xsl:when test="position()=1">
482
	      <xsl:when test="position()=1">
482
		<xsl:text> -- </xsl:text>
483
		<xsl:text> -- </xsl:text>
483
            </xsl:when>
484
	      </xsl:when>
484
            </xsl:choose>
485
            </xsl:choose>
485
            <xsl:choose>
486
            <xsl:choose>
486
            <xsl:when test="marc:subfield[@code='n']">
487
	      <xsl:when test="marc:subfield[@code='n']">
487
               <xsl:text> </xsl:text>
488
		<xsl:text> </xsl:text>
488
               <xsl:call-template name="subfieldSelect">
489
		<xsl:call-template name="subfieldSelect">
489
                  <xsl:with-param name="codes">n</xsl:with-param> 
490
                  <xsl:with-param name="codes">n</xsl:with-param> 
490
               </xsl:call-template>
491
		</xsl:call-template>
491
               <xsl:text> </xsl:text>
492
		<xsl:text> </xsl:text>
492
            </xsl:when>
493
	      </xsl:when>
493
            </xsl:choose>
494
            </xsl:choose>
494
            <xsl:choose>
495
            <xsl:choose>
495
            <xsl:when test="position()=last()">
496
	      <xsl:when test="position()=last()">
496
                <xsl:call-template name="nameACDEQ"/>.
497
                <xsl:call-template name="nameACDEQ"/>.
497
            </xsl:when>
498
	      </xsl:when>
498
            <xsl:otherwise>
499
	      <xsl:otherwise>
499
                <xsl:call-template name="nameACDEQ"/>;
500
                <xsl:call-template name="nameACDEQ"/>;
500
            </xsl:otherwise>
501
	      </xsl:otherwise>
501
            </xsl:choose>
502
            </xsl:choose>
502
        </xsl:for-each>
503
	  </xsl:for-each>
503
    </span>
504
	</span>
504
    </xsl:when>
505
	</xsl:when>
505
    </xsl:choose>
506
      </xsl:choose>
506
    </p>
507
    </p>
507
508
508
    <xsl:if test="marc:datafield[@tag=250]">
509
    <xsl:if test="marc:datafield[@tag=250]">
509
	<span class="results_summary">
510
      <span class="results_summary">
510
    <span class="label">Edition: </span>
511
	<span class="label">Edition: </span>
511
            <xsl:for-each select="marc:datafield[@tag=250]">
512
	<xsl:for-each select="marc:datafield[@tag=250]">
512
                    <xsl:call-template name="subfieldSelect">
513
	  <xsl:call-template name="subfieldSelect">
513
                        <xsl:with-param name="codes">ab</xsl:with-param>
514
	    <xsl:with-param name="codes">ab</xsl:with-param>
514
                    </xsl:call-template>
515
	  </xsl:call-template>
515
            </xsl:for-each>
516
	</xsl:for-each>
516
	</span>
517
      </span>
517
    </xsl:if>
518
    </xsl:if>
518
519
519
<xsl:if test="$DisplayOPACiconsXSLT!='0'">
520
    <xsl:if test="$DisplayOPACiconsXSLT!='0'">
520
    <span class="results_summary">
521
      <span class="results_summary">
521
    <xsl:if test="$typeOf008!=''">
522
	<xsl:if test="$typeOf008!=''">
522
        <span class="label">Type: </span>
523
	  <span class="label">Type: </span>
523
            <xsl:choose>
524
	  <xsl:choose>
524
                <xsl:when test="$leader19='a'"><img src="/opac-tmpl/prog/famfamfam/silk/book_link.png" alt="book" title="book" class="materialtype"/> Set</xsl:when>
525
	    <xsl:when test="$leader19='a'"><img src="/opac-tmpl/prog/famfamfam/silk/book_link.png" alt="book" title="book" class="materialtype"/> Set</xsl:when>
525
                <xsl:when test="$leader6='a'">
526
	    <xsl:when test="$leader6='a'">
526
                    <xsl:choose>
527
	      <xsl:choose>
527
                        <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
528
		<xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
528
                        <xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/prog/famfamfam/silk/newspaper.png" alt="serial" title="serial" class="materialtype"/> Continuing Resource</xsl:when>
529
		<xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/prog/famfamfam/silk/newspaper.png" alt="serial" title="serial" class="materialtype"/> Continuing Resource</xsl:when>
529
                        <xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/prog/famfamfam/silk/book_open.png" alt="article" title="article" class="materialtype"/> Article</xsl:when>
530
		<xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/prog/famfamfam/silk/book_open.png" alt="article" title="article" class="materialtype"/> Article</xsl:when>
530
                    </xsl:choose>
531
	      </xsl:choose>
531
                </xsl:when>
532
	    </xsl:when>
532
                <xsl:when test="$leader6='t'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
533
	    <xsl:when test="$leader6='t'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
533
				<xsl:when test="$leader6='o'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="kit" title="kit" class="materialtype"/> Kit</xsl:when>
534
	    <xsl:when test="$leader6='o'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="kit" title="kit" class="materialtype"/> Kit</xsl:when>
534
				<xsl:when test="$leader6='p'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials" class="materialtype"/>Mixed Materials</xsl:when>
535
	    <xsl:when test="$leader6='p'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials" class="materialtype"/>Mixed Materials</xsl:when>
535
                <xsl:when test="$leader6='m'"><img src="/opac-tmpl/prog/famfamfam/silk/computer_link.png" alt="computer file" title="computer file" class="materialtype"/> Computer File</xsl:when>
536
	    <xsl:when test="$leader6='m'"><img src="/opac-tmpl/prog/famfamfam/silk/computer_link.png" alt="computer file" title="computer file" class="materialtype"/> Computer File</xsl:when>
536
                <xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/prog/famfamfam/silk/map.png" alt="map" title="map" class="materialtype"/> Map</xsl:when>
537
	    <xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/prog/famfamfam/silk/map.png" alt="map" title="map" class="materialtype"/> Map</xsl:when>
537
                <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/opac-tmpl/prog/famfamfam/silk/film.png" alt="visual material" title="visual material" class="materialtype"/> Visual Material</xsl:when>
538
	    <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/opac-tmpl/prog/famfamfam/silk/film.png" alt="visual material" title="visual material" class="materialtype"/> Visual Material</xsl:when>
538
                <xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/prog/famfamfam/silk/music.png" alt="score" title="score" class="materialtype"/> Score</xsl:when>
539
	    <xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/prog/famfamfam/silk/music.png" alt="score" title="score" class="materialtype"/> Score</xsl:when>
539
                <xsl:when test="$leader6='i'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="sound" title="sound" class="materialtype"/> Sound</xsl:when>
540
	    <xsl:when test="$leader6='i'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="sound" title="sound" class="materialtype"/> Sound</xsl:when>
540
                <xsl:when test="$leader6='j'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="music" title="music" class="materialtype"/> Music</xsl:when>
541
	    <xsl:when test="$leader6='j'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="music" title="music" class="materialtype"/> Music</xsl:when>
541
            </xsl:choose>
542
	  </xsl:choose>
542
    </xsl:if>
543
	</xsl:if>
543
    <xsl:if test="string-length(normalize-space($physicalDescription))">
544
	<xsl:if test="string-length(normalize-space($physicalDescription))">
544
        <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
545
	  <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
545
    </xsl:if>
546
	</xsl:if>
546
547
547
        <xsl:if test="$controlField008-21 or $controlField008-22 or $controlField008-24 or $controlField008-26 or $controlField008-29 or $controlField008-34 or $controlField008-33 or $controlField008-30-31 or $controlField008-33">
548
        <xsl:if test="$controlField008-21 or $controlField008-22 or $controlField008-24 or $controlField008-26 or $controlField008-29 or $controlField008-34 or $controlField008-33 or $controlField008-30-31 or $controlField008-33">
548
549
549
        <xsl:if test="$typeOf008='CR'">
550
	  <xsl:if test="$typeOf008='CR'">
550
        <xsl:if test="$controlField008-21 and $controlField008-21 !='|' and $controlField008-21 !=' '">
551
	    <xsl:if test="$controlField008-21 and $controlField008-21 !='|' and $controlField008-21 !=' '">
551
        <span class="label">; Type of continuing resource: </span>
552
	      <span class="label">; Type of continuing resource: </span>
552
        </xsl:if>
553
	    </xsl:if>
553
            <xsl:choose>
554
            <xsl:choose>
554
                <xsl:when test="$controlField008-21='d'">
555
	      <xsl:when test="$controlField008-21='d'">
555
                     <img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
556
		<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
556
                </xsl:when>
557
	      </xsl:when>
557
                <xsl:when test="$controlField008-21='l'">
558
	      <xsl:when test="$controlField008-21='l'">
558
                    loose-leaf
559
		loose-leaf
559
                </xsl:when>
560
	      </xsl:when>
560
                <xsl:when test="$controlField008-21='m'">
561
	      <xsl:when test="$controlField008-21='m'">
561
                    series
562
		series
562
                </xsl:when>
563
	      </xsl:when>
563
                <xsl:when test="$controlField008-21='n'">
564
	      <xsl:when test="$controlField008-21='n'">
564
                    newspaper
565
		newspaper
565
                </xsl:when>
566
	      </xsl:when>
566
                <xsl:when test="$controlField008-21='p'">
567
	      <xsl:when test="$controlField008-21='p'">
567
                    periodical
568
		periodical
568
                </xsl:when>
569
	      </xsl:when>
569
                <xsl:when test="$controlField008-21='w'">
570
	      <xsl:when test="$controlField008-21='w'">
570
                     <img src="/opac-tmpl/prog/famfamfam/silk/world_link.png" alt="web site" title="web site" class="format"/>
571
		<img src="/opac-tmpl/prog/famfamfam/silk/world_link.png" alt="web site" title="web site" class="format"/>
571
                </xsl:when>
572
	      </xsl:when>
572
            </xsl:choose>
573
            </xsl:choose>
573
        </xsl:if>
574
	  </xsl:if>
574
        <xsl:if test="$typeOf008='BK' or $typeOf008='CR'">
575
	  <xsl:if test="$typeOf008='BK' or $typeOf008='CR'">
575
        <xsl:if test="contains($controlField008-24,'abcdefghijklmnopqrstvwxyz')">
576
	    <xsl:if test="contains($controlField008-24,'abcdefghijklmnopqrstvwxyz')">
576
        <span class="label">; Nature of contents: </span>
577
	      <span class="label">; Nature of contents: </span>
577
        </xsl:if>
578
	    </xsl:if>
578
            <xsl:choose>
579
            <xsl:choose>
579
                <xsl:when test="contains($controlField008-24,'a')">
580
	      <xsl:when test="contains($controlField008-24,'a')">
580
                    abstract or summary
581
		abstract or summary
581
                </xsl:when>
582
	      </xsl:when>
582
                <xsl:when test="contains($controlField008-24,'b')">
583
	      <xsl:when test="contains($controlField008-24,'b')">
583
			bibliography
584
		bibliography
584
                     <img src="/opac-tmpl/prog/famfamfam/silk/text_list_bullets.png" alt="bibliography" title="bibliography" class="natureofcontents"/>
585
		<img src="/opac-tmpl/prog/famfamfam/silk/text_list_bullets.png" alt="bibliography" title="bibliography" class="natureofcontents"/>
585
                </xsl:when>
586
	      </xsl:when>
586
                <xsl:when test="contains($controlField008-24,'c')">
587
	      <xsl:when test="contains($controlField008-24,'c')">
587
                    catalog
588
		catalog
588
                </xsl:when>
589
	      </xsl:when>
589
                <xsl:when test="contains($controlField008-24,'d')">
590
	      <xsl:when test="contains($controlField008-24,'d')">
590
                    dictionary
591
		dictionary
591
                </xsl:when>
592
	      </xsl:when>
592
                <xsl:when test="contains($controlField008-24,'e')">
593
	      <xsl:when test="contains($controlField008-24,'e')">
593
                    encyclopedia
594
		encyclopedia
594
                </xsl:when>
595
	      </xsl:when>
595
                <xsl:when test="contains($controlField008-24,'f')">
596
	      <xsl:when test="contains($controlField008-24,'f')">
596
                    handbook
597
		handbook
597
                </xsl:when>
598
	      </xsl:when>
598
                <xsl:when test="contains($controlField008-24,'g')">
599
	      <xsl:when test="contains($controlField008-24,'g')">
599
                    legal article
600
		legal article
600
                </xsl:when>
601
	      </xsl:when>
601
                <xsl:when test="contains($controlField008-24,'i')">
602
	      <xsl:when test="contains($controlField008-24,'i')">
602
                    index
603
		index
603
                </xsl:when>
604
	      </xsl:when>
604
                <xsl:when test="contains($controlField008-24,'k')">
605
	      <xsl:when test="contains($controlField008-24,'k')">
605
                    discography
606
		discography
606
                </xsl:when>
607
	      </xsl:when>
607
                <xsl:when test="contains($controlField008-24,'l')">
608
	      <xsl:when test="contains($controlField008-24,'l')">
608
                    legislation
609
		legislation
609
                </xsl:when>
610
	      </xsl:when>
610
                <xsl:when test="contains($controlField008-24,'m')">
611
	      <xsl:when test="contains($controlField008-24,'m')">
611
                    theses
612
		theses
612
                </xsl:when>
613
	      </xsl:when>
613
                <xsl:when test="contains($controlField008-24,'n')">
614
	      <xsl:when test="contains($controlField008-24,'n')">
614
                    survey of literature
615
		survey of literature
615
                </xsl:when>
616
	      </xsl:when>
616
                <xsl:when test="contains($controlField008-24,'o')">
617
	      <xsl:when test="contains($controlField008-24,'o')">
617
                    review
618
		review
618
                </xsl:when>
619
	      </xsl:when>
619
                <xsl:when test="contains($controlField008-24,'p')">
620
	      <xsl:when test="contains($controlField008-24,'p')">
620
                    programmed text
621
		programmed text
621
                </xsl:when>
622
	      </xsl:when>
622
                <xsl:when test="contains($controlField008-24,'q')">
623
	      <xsl:when test="contains($controlField008-24,'q')">
623
                    filmography
624
		filmography
624
                </xsl:when>
625
	      </xsl:when>
625
                <xsl:when test="contains($controlField008-24,'r')">
626
	      <xsl:when test="contains($controlField008-24,'r')">
626
                    directory
627
		directory
627
                </xsl:when>
628
	      </xsl:when>
628
                <xsl:when test="contains($controlField008-24,'s')">
629
	      <xsl:when test="contains($controlField008-24,'s')">
629
                    statistics
630
		statistics
630
                </xsl:when>
631
	      </xsl:when>
631
                <xsl:when test="contains($controlField008-24,'t')">
632
	      <xsl:when test="contains($controlField008-24,'t')">
632
                     <img src="/opac-tmpl/prog/famfamfam/silk/report.png" alt="technical report" title="technical report" class="natureofcontents"/>
633
		<img src="/opac-tmpl/prog/famfamfam/silk/report.png" alt="technical report" title="technical report" class="natureofcontents"/>
633
                </xsl:when>
634
	      </xsl:when>
634
                <xsl:when test="contains($controlField008-24,'v')">
635
	      <xsl:when test="contains($controlField008-24,'v')">
635
                    legal case and case notes
636
		legal case and case notes
636
                </xsl:when>
637
	      </xsl:when>
637
                <xsl:when test="contains($controlField008-24,'w')">
638
	      <xsl:when test="contains($controlField008-24,'w')">
638
                    law report or digest
639
		law report or digest
639
                </xsl:when>
640
	      </xsl:when>
640
                <xsl:when test="contains($controlField008-24,'z')">
641
	      <xsl:when test="contains($controlField008-24,'z')">
641
                    treaty
642
		treaty
642
                </xsl:when>
643
	      </xsl:when>
643
            </xsl:choose>
644
            </xsl:choose>
644
            <xsl:choose>
645
            <xsl:choose>
645
                <xsl:when test="$controlField008-29='1'">
646
	      <xsl:when test="$controlField008-29='1'">
646
                    conference publication
647
		conference publication
647
                </xsl:when>
648
	      </xsl:when>
648
            </xsl:choose>
649
            </xsl:choose>
649
        </xsl:if>
650
	  </xsl:if>
650
        <xsl:if test="$typeOf008='CF'">
651
	  <xsl:if test="$typeOf008='CF'">
651
            <xsl:if test="$controlField008-26='a' or $controlField008-26='e' or $controlField008-26='f' or $controlField008-26='g'">
652
            <xsl:if test="$controlField008-26='a' or $controlField008-26='e' or $controlField008-26='f' or $controlField008-26='g'">
652
            <span class="label">; Type of computer file: </span>
653
	      <span class="label">; Type of computer file: </span>
653
            </xsl:if>
654
            </xsl:if>
654
            <xsl:choose>
655
            <xsl:choose>
655
                <xsl:when test="$controlField008-26='a'">
656
	      <xsl:when test="$controlField008-26='a'">
656
                    numeric data
657
		numeric data
657
                </xsl:when>
658
	      </xsl:when>
658
                <xsl:when test="$controlField008-26='e'">
659
	      <xsl:when test="$controlField008-26='e'">
659
                     <img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
660
		<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
660
                </xsl:when>
661
	      </xsl:when>
661
                <xsl:when test="$controlField008-26='f'">
662
	      <xsl:when test="$controlField008-26='f'">
662
                     <img src="/opac-tmpl/prog/famfamfam/silk/font.png" alt="font" title="font" class="format"/> 
663
		<img src="/opac-tmpl/prog/famfamfam/silk/font.png" alt="font" title="font" class="format"/> 
663
                </xsl:when>
664
	      </xsl:when>
664
                <xsl:when test="$controlField008-26='g'">
665
	      <xsl:when test="$controlField008-26='g'">
665
                     <img src="/opac-tmpl/prog/famfamfam/silk/controller.png" alt="game" title="game" class="format"/>
666
		<img src="/opac-tmpl/prog/famfamfam/silk/controller.png" alt="game" title="game" class="format"/>
666
                </xsl:when>
667
	      </xsl:when>
667
            </xsl:choose>
668
            </xsl:choose>
668
        </xsl:if>
669
	  </xsl:if>
669
        <xsl:if test="$typeOf008='BK'">
670
	  <xsl:if test="$typeOf008='BK'">
670
            <xsl:if test="(substring($controlField008,25,1)='j') or (substring($controlField008,25,1)='1') or ($controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d')">
671
            <xsl:if test="(substring($controlField008,25,1)='j') or (substring($controlField008,25,1)='1') or ($controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d')">
671
            <span class="label">; Nature of contents: </span>
672
	      <span class="label">; Nature of contents: </span>
672
            </xsl:if>
673
            </xsl:if>
673
            <xsl:if test="substring($controlField008,25,1)='j'">
674
            <xsl:if test="substring($controlField008,25,1)='j'">
674
                patent
675
	      patent
675
            </xsl:if>
676
            </xsl:if>
676
            <xsl:if test="substring($controlField008,31,1)='1'">
677
            <xsl:if test="substring($controlField008,31,1)='1'">
677
                festschrift
678
	      festschrift
678
            </xsl:if>
679
            </xsl:if>
679
            <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
680
            <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
680
                 <img src="/opac-tmpl/prog/famfamfam/silk/user.png" alt="biography" title="biography" class="natureofcontents"/>
681
	      <img src="/opac-tmpl/prog/famfamfam/silk/user.png" alt="biography" title="biography" class="natureofcontents"/>
681
            </xsl:if>
682
            </xsl:if>
682
683
683
            <xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
684
            <xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
684
            <span class="label">; Literary form: </span>
685
	      <span class="label">; Literary form: </span>
685
            </xsl:if>
686
            </xsl:if>
686
            <xsl:choose>
687
            <xsl:choose>
687
                <xsl:when test="$controlField008-33='0'">
688
	      <xsl:when test="$controlField008-33='0'">
688
                    not fiction
689
		not fiction
689
                </xsl:when>
690
	      </xsl:when>
690
                <xsl:when test="$controlField008-33='1'">
691
	      <xsl:when test="$controlField008-33='1'">
691
                    fiction
692
		fiction
692
                </xsl:when> 
693
	      </xsl:when> 
693
                <xsl:when test="$controlField008-33='e'">
694
	      <xsl:when test="$controlField008-33='e'">
694
                    essay
695
		essay
695
                </xsl:when>
696
	      </xsl:when>
696
                <xsl:when test="$controlField008-33='d'">
697
	      <xsl:when test="$controlField008-33='d'">
697
                    drama
698
		drama
698
                </xsl:when>
699
	      </xsl:when>
699
                <xsl:when test="$controlField008-33='c'">
700
	      <xsl:when test="$controlField008-33='c'">
700
                    comic strip
701
		comic strip
701
                </xsl:when>
702
	      </xsl:when>
702
                <xsl:when test="$controlField008-33='l'">
703
	      <xsl:when test="$controlField008-33='l'">
703
                    fiction
704
		fiction
704
                </xsl:when>
705
	      </xsl:when>
705
                <xsl:when test="$controlField008-33='h'">
706
	      <xsl:when test="$controlField008-33='h'">
706
                    humor, satire
707
		humor, satire
707
                </xsl:when>
708
	      </xsl:when>
708
                <xsl:when test="$controlField008-33='i'">
709
	      <xsl:when test="$controlField008-33='i'">
709
                    letter
710
		letter
710
                </xsl:when>
711
	      </xsl:when>
711
                <xsl:when test="$controlField008-33='f'">
712
	      <xsl:when test="$controlField008-33='f'">
712
                    novel
713
		novel
713
                </xsl:when>
714
	      </xsl:when>
714
                <xsl:when test="$controlField008-33='j'">
715
	      <xsl:when test="$controlField008-33='j'">
715
                    short story
716
		short story
716
                </xsl:when>
717
	      </xsl:when>
717
                <xsl:when test="$controlField008-33='s'">
718
	      <xsl:when test="$controlField008-33='s'">
718
                    speech
719
		speech
719
                </xsl:when>
720
	      </xsl:when>
720
            </xsl:choose>
721
            </xsl:choose>
721
        </xsl:if> 
722
	  </xsl:if> 
722
        <xsl:if test="$typeOf008='MU' and $controlField008-30-31 and $controlField008-30-31!='||' and $controlField008-30-31!='  '">
723
	  <xsl:if test="$typeOf008='MU' and $controlField008-30-31 and $controlField008-30-31!='||' and $controlField008-30-31!='  '">
723
            <span class="label">; Literary form: </span> <!-- Literary text for sound recordings -->
724
            <span class="label">; Literary form: </span> <!-- Literary text for sound recordings -->
724
            <xsl:if test="contains($controlField008-30-31,'b')">
725
            <xsl:if test="contains($controlField008-30-31,'b')">
725
                biography
726
	      biography
726
            </xsl:if>
727
            </xsl:if>
727
            <xsl:if test="contains($controlField008-30-31,'c')">
728
            <xsl:if test="contains($controlField008-30-31,'c')">
728
                conference publication
729
	      conference publication
729
            </xsl:if>
730
            </xsl:if>
730
            <xsl:if test="contains($controlField008-30-31,'d')">
731
            <xsl:if test="contains($controlField008-30-31,'d')">
731
                drama
732
	      drama
732
            </xsl:if>
733
            </xsl:if>
733
            <xsl:if test="contains($controlField008-30-31,'e')">
734
            <xsl:if test="contains($controlField008-30-31,'e')">
734
                essay
735
	      essay
735
            </xsl:if>
736
            </xsl:if>
736
            <xsl:if test="contains($controlField008-30-31,'f')">
737
            <xsl:if test="contains($controlField008-30-31,'f')">
737
                fiction
738
	      fiction
738
            </xsl:if>
739
            </xsl:if>
739
            <xsl:if test="contains($controlField008-30-31,'o')">
740
            <xsl:if test="contains($controlField008-30-31,'o')">
740
                folktale
741
	      folktale
741
            </xsl:if>
742
            </xsl:if>
742
            <xsl:if test="contains($controlField008-30-31,'h')">
743
            <xsl:if test="contains($controlField008-30-31,'h')">
743
                history
744
	      history
744
            </xsl:if>
745
            </xsl:if>
745
            <xsl:if test="contains($controlField008-30-31,'k')">
746
            <xsl:if test="contains($controlField008-30-31,'k')">
746
                humor, satire
747
	      humor, satire
747
            </xsl:if>
748
            </xsl:if>
748
            <xsl:if test="contains($controlField008-30-31,'m')">
749
            <xsl:if test="contains($controlField008-30-31,'m')">
749
                memoir
750
	      memoir
750
            </xsl:if>
751
            </xsl:if>
751
            <xsl:if test="contains($controlField008-30-31,'p')">
752
            <xsl:if test="contains($controlField008-30-31,'p')">
752
                poetry
753
	      poetry
753
            </xsl:if>
754
            </xsl:if>
754
            <xsl:if test="contains($controlField008-30-31,'r')">
755
            <xsl:if test="contains($controlField008-30-31,'r')">
755
                rehearsal
756
	      rehearsal
756
            </xsl:if>
757
            </xsl:if>
757
            <xsl:if test="contains($controlField008-30-31,'g')">
758
            <xsl:if test="contains($controlField008-30-31,'g')">
758
                reporting
759
	      reporting
759
            </xsl:if>
760
            </xsl:if>
760
            <xsl:if test="contains($controlField008-30-31,'s')">
761
            <xsl:if test="contains($controlField008-30-31,'s')">
761
                sound
762
	      sound
762
            </xsl:if>
763
            </xsl:if>
763
            <xsl:if test="contains($controlField008-30-31,'l')">
764
            <xsl:if test="contains($controlField008-30-31,'l')">
764
                speech
765
	      speech
765
            </xsl:if>
766
            </xsl:if>
766
        </xsl:if>
767
	  </xsl:if>
767
        <xsl:if test="$typeOf008='VM'">
768
	  <xsl:if test="$typeOf008='VM'">
768
            <span class="label">; Type of visual material: </span>
769
            <span class="label">; Type of visual material: </span>
769
            <xsl:choose>
770
            <xsl:choose>
770
                <xsl:when test="$controlField008-33='a'">
771
	      <xsl:when test="$controlField008-33='a'">
771
                    art original
772
		art original
772
                </xsl:when>
773
	      </xsl:when>
773
                <xsl:when test="$controlField008-33='b'">
774
	      <xsl:when test="$controlField008-33='b'">
774
                    kit
775
		kit
775
                </xsl:when>
776
	      </xsl:when>
776
                <xsl:when test="$controlField008-33='c'">
777
	      <xsl:when test="$controlField008-33='c'">
777
                    art reproduction
778
		art reproduction
778
                </xsl:when>
779
	      </xsl:when>
779
                <xsl:when test="$controlField008-33='d'">
780
	      <xsl:when test="$controlField008-33='d'">
780
                    diorama
781
		diorama
781
                </xsl:when>
782
	      </xsl:when>
782
                <xsl:when test="$controlField008-33='f'">
783
	      <xsl:when test="$controlField008-33='f'">
783
                    filmstrip
784
		filmstrip
784
                </xsl:when>
785
	      </xsl:when>
785
                <xsl:when test="$controlField008-33='g'">
786
	      <xsl:when test="$controlField008-33='g'">
786
                    legal article
787
		legal article
787
                </xsl:when>
788
	      </xsl:when>
788
                <xsl:when test="$controlField008-33='i'">
789
	      <xsl:when test="$controlField008-33='i'">
789
                    picture
790
		picture
790
                </xsl:when>
791
	      </xsl:when>
791
                <xsl:when test="$controlField008-33='k'">
792
	      <xsl:when test="$controlField008-33='k'">
792
                    graphic
793
		graphic
793
                </xsl:when>
794
	      </xsl:when>
794
                <xsl:when test="$controlField008-33='l'">
795
	      <xsl:when test="$controlField008-33='l'">
795
                    technical drawing
796
		technical drawing
796
                </xsl:when>
797
	      </xsl:when>
797
                <xsl:when test="$controlField008-33='m'">
798
	      <xsl:when test="$controlField008-33='m'">
798
                    motion picture
799
		motion picture
799
                </xsl:when>
800
	      </xsl:when>
800
                <xsl:when test="$controlField008-33='n'">
801
	      <xsl:when test="$controlField008-33='n'">
801
                    chart
802
		chart
802
                </xsl:when>
803
	      </xsl:when>
803
                <xsl:when test="$controlField008-33='o'">
804
	      <xsl:when test="$controlField008-33='o'">
804
                    flash card
805
		flash card
805
                </xsl:when>
806
	      </xsl:when>
806
                <xsl:when test="$controlField008-33='p'">
807
	      <xsl:when test="$controlField008-33='p'">
807
                    microscope slide
808
		microscope slide
808
                </xsl:when>
809
	      </xsl:when>
809
                <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2
810
	      <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2
810
,1)='q']">
811
			      ,1)='q']">
811
                    model
812
		model
812
                </xsl:when>
813
	      </xsl:when>
813
                <xsl:when test="$controlField008-33='r'">
814
	      <xsl:when test="$controlField008-33='r'">
814
                    realia
815
		realia
815
                </xsl:when>
816
	      </xsl:when>
816
                <xsl:when test="$controlField008-33='s'">
817
	      <xsl:when test="$controlField008-33='s'">
817
                    slide
818
		slide
818
                </xsl:when>
819
	      </xsl:when>
819
                <xsl:when test="$controlField008-33='t'">
820
	      <xsl:when test="$controlField008-33='t'">
820
                    transparency
821
		transparency
821
                </xsl:when>
822
	      </xsl:when>
822
                <xsl:when test="$controlField008-33='v'">
823
	      <xsl:when test="$controlField008-33='v'">
823
                    videorecording
824
		videorecording
824
                </xsl:when>
825
	      </xsl:when>
825
                <xsl:when test="$controlField008-33='w'">
826
	      <xsl:when test="$controlField008-33='w'">
826
                    toy
827
		toy
827
                </xsl:when>
828
	      </xsl:when>
828
            </xsl:choose>
829
            </xsl:choose>
829
        </xsl:if>
830
	  </xsl:if>
830
        </xsl:if> 
831
        </xsl:if> 
831
832
832
    <xsl:if test="($typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM') and ($controlField008-22='a' or $controlField008-22='b' or $controlField008-22='c' or $controlField008-22='d' or $controlField008-22='e' or $controlField008-22='g' or $controlField008-22='j' or $controlField008-22='f')">
833
	<xsl:if test="($typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM') and ($controlField008-22='a' or $controlField008-22='b' or $controlField008-22='c' or $controlField008-22='d' or $controlField008-22='e' or $controlField008-22='g' or $controlField008-22='j' or $controlField008-22='f')">
833
        <span class="label">; Audience: </span>
834
	  <span class="label">; Audience: </span>
834
        <xsl:choose>
835
	  <xsl:choose>
835
            <xsl:when test="$controlField008-22='a'">
836
            <xsl:when test="$controlField008-22='a'">
836
             Preschool;
837
	      Preschool;
837
            </xsl:when>
838
            </xsl:when>
838
            <xsl:when test="$controlField008-22='b'">
839
            <xsl:when test="$controlField008-22='b'">
839
             Primary;
840
	      Primary;
840
            </xsl:when>
841
            </xsl:when>
841
            <xsl:when test="$controlField008-22='c'">
842
            <xsl:when test="$controlField008-22='c'">
842
             Pre-adolescent;
843
	      Pre-adolescent;
843
            </xsl:when>
844
            </xsl:when>
844
            <xsl:when test="$controlField008-22='d'">
845
            <xsl:when test="$controlField008-22='d'">
845
             Adolescent;
846
	      Adolescent;
846
            </xsl:when>
847
            </xsl:when>
847
            <xsl:when test="$controlField008-22='e'">
848
            <xsl:when test="$controlField008-22='e'">
848
             Adult;
849
	      Adult;
849
            </xsl:when>
850
            </xsl:when>
850
            <xsl:when test="$controlField008-22='g'">
851
            <xsl:when test="$controlField008-22='g'">
851
             General;
852
	      General;
852
            </xsl:when>
853
            </xsl:when>
853
            <xsl:when test="$controlField008-22='j'">
854
            <xsl:when test="$controlField008-22='j'">
854
             Juvenile;
855
	      Juvenile;
855
            </xsl:when>
856
            </xsl:when>
856
            <xsl:when test="$controlField008-22='f'">
857
            <xsl:when test="$controlField008-22='f'">
857
             Specialized;
858
	      Specialized;
858
            </xsl:when>
859
            </xsl:when>
859
            </xsl:choose>
860
	  </xsl:choose>
861
	</xsl:if>
862
	<xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 -->
863
      </span>
860
    </xsl:if>
864
    </xsl:if>
861
<xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 -->
862
	</span>
863
</xsl:if>
864
865
865
    <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
866
    <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
866
    <xsl:if test="$display880">
867
    <xsl:if test="$display880">
Lines 887-892 Link Here
887
                    </xsl:call-template>
888
                    </xsl:call-template>
888
                </xsl:if>
889
                </xsl:if>
889
                <xsl:text> </xsl:text>
890
                <xsl:text> </xsl:text>
891
                <xsl:if test="marc:subfield[@code='c']">
892
                    <xsl:call-template name="subfieldSelect">
893
                        <xsl:with-param name="codes">c</xsl:with-param>
894
                    </xsl:call-template>
895
                </xsl:if>
896
                <xsl:text> </xsl:text>
897
                <xsl:if test="marc:subfield[@code='g']">
898
                    <xsl:call-template name="subfieldSelect">
899
                        <xsl:with-param name="codes">g</xsl:with-param>
900
                    </xsl:call-template>
901
                </xsl:if>
902
                <xsl:text> </xsl:text>
890
                <xsl:call-template name="chopPunctuation">
903
                <xsl:call-template name="chopPunctuation">
891
                  <xsl:with-param name="chopString">
904
                  <xsl:with-param name="chopString">
892
                    <xsl:call-template name="subfieldSelect">
905
                    <xsl:call-template name="subfieldSelect">
Lines 901-924 Link Here
901
914
902
    <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
915
    <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
903
    <xsl:if test="$display880">
916
    <xsl:if test="$display880">
904
       <xsl:call-template name="m880Select">
917
      <xsl:call-template name="m880Select">
905
         <xsl:with-param name="basetags">246</xsl:with-param>
918
	<xsl:with-param name="basetags">246</xsl:with-param>
906
         <xsl:with-param name="codes">ab</xsl:with-param>
919
	<xsl:with-param name="codes">ab</xsl:with-param>
907
         <xsl:with-param name="class">results_summary</xsl:with-param>
920
	<xsl:with-param name="class">results_summary</xsl:with-param>
908
         <xsl:with-param name="label">Other Title: </xsl:with-param>
921
	<xsl:with-param name="label">Other Title: </xsl:with-param>
909
       </xsl:call-template>
922
      </xsl:call-template>
910
    </xsl:if>
923
    </xsl:if>
911
        
924
    
912
    <xsl:if test="marc:datafield[@tag=246]">
925
    <xsl:if test="marc:datafield[@tag=246]">
913
	<span class="results_summary">
926
      <span class="results_summary">
914
    <span class="label">Other title: </span>
927
	<span class="label">Other title: </span>
915
            <xsl:for-each select="marc:datafield[@tag=246]">
928
	<xsl:for-each select="marc:datafield[@tag=246]">
916
                    <xsl:call-template name="subfieldSelect">
929
	  <xsl:call-template name="subfieldSelect">
917
                        <xsl:with-param name="codes">ab</xsl:with-param>
930
	    <xsl:with-param name="codes">ab</xsl:with-param>
918
                    </xsl:call-template>
931
	  </xsl:call-template>
919
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
932
	  <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
920
            </xsl:for-each>
933
	</xsl:for-each>
921
	</span>
934
      </span>
922
    </xsl:if>
935
    </xsl:if>
923
    <xsl:if test="marc:datafield[@tag=242]">
936
    <xsl:if test="marc:datafield[@tag=242]">
924
	<span class="results_summary">
937
	<span class="results_summary">
Lines 932-1209 Link Here
932
	</span>
945
	</span>
933
    </xsl:if>
946
    </xsl:if>
934
    <xsl:if test="marc:datafield[@tag=856]">
947
    <xsl:if test="marc:datafield[@tag=856]">
935
         <span class="results_summary">
948
      <span class="results_summary">
936
			   <span class="label">Online Access: </span>
949
	<span class="label">Online Access: </span>
937
                            <xsl:for-each select="marc:datafield[@tag=856]">
950
	<xsl:for-each select="marc:datafield[@tag=856]">
938
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
951
	  <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
939
                            <xsl:if test="$OPACURLOpenInNewWindow='0'">
952
	  <xsl:if test="$OPACURLOpenInNewWindow='0'">
940
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
953
	    <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
941
                                    <xsl:choose>
954
	    <xsl:choose>
942
                                     <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
955
	      <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
943
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
956
		<xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
944
                                    </xsl:when>
957
	      </xsl:when>
945
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
958
	      <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
946
                                        <xsl:call-template name="subfieldSelect">                        
959
		<xsl:call-template name="subfieldSelect">                        
947
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
960
		  <xsl:with-param name="codes">y3z</xsl:with-param>                    
948
                                        </xsl:call-template>
961
		</xsl:call-template>
949
                                    </xsl:when>
962
	      </xsl:when>
950
                                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
963
	      <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
951
					<xsl:choose>
964
		<xsl:choose>
952
					<xsl:when test="$URLLinkText!=''">
965
		  <xsl:when test="$URLLinkText!=''">
953
						<xsl:value-of select="$URLLinkText"/>
966
		    <xsl:value-of select="$URLLinkText"/>
954
					</xsl:when>
967
		  </xsl:when>
955
					<xsl:otherwise>
968
		  <xsl:otherwise>
956
						<xsl:text>Click here to access online</xsl:text>
969
		    <xsl:text>Click here to access online</xsl:text>
957
					</xsl:otherwise>
970
		  </xsl:otherwise>
958
					</xsl:choose>
971
		</xsl:choose>
959
                                    </xsl:when>
972
	      </xsl:when>
960
                                    </xsl:choose>
973
	    </xsl:choose>
961
                                    </a>
974
	    </a>
962
                              </xsl:if>
975
	  </xsl:if>
963
                            <xsl:if test="$OPACURLOpenInNewWindow='1'">
976
	  <xsl:if test="$OPACURLOpenInNewWindow='1'">
964
                                   <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
977
	    <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
965
                                    <xsl:choose>
978
	    <xsl:choose>
966
                                    <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and ($SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
979
	      <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and ($SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
967
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
980
		<xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
968
                                    </xsl:when>
981
	      </xsl:when>
969
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
982
	      <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
970
                                        <xsl:call-template name="subfieldSelect">                        
983
		<xsl:call-template name="subfieldSelect">                        
971
                                        <xsl:with-param name="codes">y3z</xsl:with-param>                    
984
		  <xsl:with-param name="codes">y3z</xsl:with-param>                    
972
                                        </xsl:call-template>
985
		</xsl:call-template>
973
                                    </xsl:when>
986
	      </xsl:when>
974
                                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
987
	      <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
975
					<xsl:choose>
988
		<xsl:choose>
976
					<xsl:when test="$URLLinkText!=''">
989
		  <xsl:when test="$URLLinkText!=''">
977
						<xsl:value-of select="$URLLinkText"/>
990
		    <xsl:value-of select="$URLLinkText"/>
978
					</xsl:when>
991
		  </xsl:when>
979
					<xsl:otherwise>
992
		  <xsl:otherwise>
980
						<xsl:text>Click here to access online</xsl:text>
993
		    <xsl:text>Click here to access online</xsl:text>
981
					</xsl:otherwise>
994
		  </xsl:otherwise>
982
					</xsl:choose>
995
		</xsl:choose>
983
                                    </xsl:when>
996
	      </xsl:when>
984
                                    </xsl:choose>
997
	    </xsl:choose>
985
                                    </a>
998
	    </a>
986
                              </xsl:if>
999
	  </xsl:if>
987
                                    <xsl:choose>
1000
	  <xsl:choose>
988
                                    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1001
	    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
989
                                    <xsl:otherwise> | </xsl:otherwise>
1002
	    <xsl:otherwise> | </xsl:otherwise>
990
                                    </xsl:choose>
1003
	  </xsl:choose>
991
                            </xsl:for-each>
1004
	</xsl:for-each>
992
                            </span>
1005
      </span>
993
                        </xsl:if>
1006
    </xsl:if>
994
                        <span class="results_summary" id="availability">
1007
    <span class="results_summary" id="availability">
995
                        <span class="label">Availability: </span>
1008
      <span class="label">Availability: </span>
996
                        <xsl:choose>
1009
      <xsl:choose>
997
				   <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">
1010
	<xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">
998
                        <xsl:choose>
1011
	  <xsl:choose>
999
                            <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]">
1012
	    <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]">
1000
                            <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/>
1013
	      <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/>
1001
                            <xsl:for-each select="marc:datafield[@tag=$AlternateHoldingsField][1]">
1014
	      <xsl:for-each select="marc:datafield[@tag=$AlternateHoldingsField][1]">
1002
                                <xsl:call-template select="marc:datafield[@tag=$AlternateHoldingsField]" name="subfieldSelect">
1015
		<xsl:call-template select="marc:datafield[@tag=$AlternateHoldingsField]" name="subfieldSelect">
1003
                                    <xsl:with-param name="codes"><xsl:value-of select="$AlternateHoldingsSubfields"/></xsl:with-param>
1016
		  <xsl:with-param name="codes"><xsl:value-of select="$AlternateHoldingsSubfields"/></xsl:with-param>
1004
                                    <xsl:with-param name="delimeter"><xsl:value-of select="$AlternateHoldingsSeparator"/></xsl:with-param>
1017
		  <xsl:with-param name="delimeter"><xsl:value-of select="$AlternateHoldingsSeparator"/></xsl:with-param>
1005
                                </xsl:call-template>
1018
		</xsl:call-template>
1006
                            </xsl:for-each>
1019
	      </xsl:for-each>
1007
                            (<xsl:value-of select="$AlternateHoldingsCount"/>)
1020
	      (<xsl:value-of select="$AlternateHoldingsCount"/>)
1008
                            </xsl:when>
1021
	    </xsl:when>
1009
                            <xsl:otherwise>No copies available </xsl:otherwise>
1022
	    <xsl:otherwise>No copies available </xsl:otherwise>
1010
                        </xsl:choose>
1023
	  </xsl:choose>
1011
				   </xsl:when>
1024
	</xsl:when>
1012
                   <xsl:when test="count(key('item-by-status', 'available'))>0">
1025
	<xsl:when test="count(key('item-by-status', 'available'))>0">
1013
                   <span class="available">
1026
	  <span class="available">	
1014
                       <b><xsl:text>Copies available for loan: </xsl:text></b>
1027
	    <b>
1015
                       <xsl:variable name="available_items"
1028
	      <xsl:value-of select="count(key('item-by-status', 'available'))"/>
1016
                           select="key('item-by-status', 'available')"/>
1029
	      <xsl:choose><xsl:when test="count(key('item-by-status', 'available')) = 1"><xsl:text> copy available for loan at </xsl:text></xsl:when>
1017
                       <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1030
	      <xsl:otherwise><xsl:text> copies available for loan at </xsl:text></xsl:otherwise></xsl:choose>
1018
                           <xsl:value-of select="items:homebranch"/>
1031
	    </b>
1019
						   <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
1032
	    <xsl:variable name="available_items"
1020
                           <xsl:text> (</xsl:text>
1033
			  select="key('item-by-status', 'available')"/>
1021
                           <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
1034
	    <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1022
                           <xsl:text>)</xsl:text>
1035
	      <xsl:value-of select="items:homebranch"/>
1023
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1036
	      <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1024
                       </xsl:for-each>
1037
	    </xsl:for-each>
1025
                   </span>
1038
	  </span>
1026
                   </xsl:when>
1039
	</xsl:when>
1027
				   </xsl:choose>
1040
      </xsl:choose>
1028
1041
      
1029
                   <xsl:choose> <xsl:when test="count(key('item-by-status', 'available'))>0">
1042
      <xsl:choose>
1030
                       <xsl:choose><xsl:when test="count(key('item-by-status', 'reference'))>0">
1043
	<xsl:when test="count(key('item-by-status', 'reference'))>0">
1031
                            <br/>
1044
	  <span class="available">
1032
                       </xsl:when></xsl:choose>
1045
	    <b>
1033
                   </xsl:when> </xsl:choose>
1046
	      <xsl:value-of select="count(key('item-by-status', 'reference'))"/>
1034
1047
	      <xsl:choose><xsl:when test="count(key('item-by-status', 'reference')) = 1"><xsl:text> copy available for reference at </xsl:text></xsl:when>
1035
                   <xsl:choose>
1048
	      <xsl:otherwise><xsl:text> copies available for reference at </xsl:text></xsl:otherwise></xsl:choose>
1036
                   <xsl:when test="count(key('item-by-status', 'reference'))>0">
1049
	    </b>
1037
                   <span class="available">
1050
	    <xsl:variable name="reference_items"
1038
                       <b><xsl:text>Copies available for reference: </xsl:text></b>
1051
			  select="key('item-by-status', 'reference')"/>
1039
                       <xsl:variable name="reference_items"
1052
	    <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1040
                           select="key('item-by-status', 'reference')"/>
1053
	      <xsl:value-of select="items:homebranch"/>
1041
                       <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1054
	      <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1042
                           <xsl:value-of select="items:homebranch"/>
1055
	    </xsl:for-each>
1043
						   <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
1056
	  </span>
1044
                           <xsl:text> (</xsl:text>
1057
	</xsl:when>
1045
                           <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
1058
      </xsl:choose>
1046
                           <xsl:text>)</xsl:text>
1059
      
1047
                   <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1060
      <xsl:if test="count(key('item-by-status', 'Checked out'))>0">
1048
                       </xsl:for-each>
1061
	<span class="unavailable">
1049
                   </span>
1062
	  <xsl:text>Checked out (</xsl:text>
1050
                   </xsl:when>
1063
	  <xsl:value-of select="count(key('item-by-status', 'Checked out'))"/>
1051
                   </xsl:choose>
1064
	  <xsl:text>). </xsl:text>
1065
	</span>
1066
      </xsl:if>
1067
      <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0">
1068
	<span class="unavailable">
1069
	  <xsl:text>Withdrawn (</xsl:text>
1070
	  <xsl:value-of select="count(key('item-by-status', 'Withdrawn'))"/>
1071
	<xsl:text>). </xsl:text>                   </span>
1072
      </xsl:if>
1073
      <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0">
1074
	<span class="unavailable">
1075
	  <xsl:text>Lost (</xsl:text>
1076
	  <xsl:value-of select="count(key('item-by-status', 'Lost'))"/>
1077
	<xsl:text>). </xsl:text>                   </span>
1078
      </xsl:if>
1079
      <xsl:if test="count(key('item-by-status', 'Damaged'))>0">
1080
	<span class="unavailable">
1081
	  <xsl:text>Damaged (</xsl:text>
1082
	  <xsl:value-of select="count(key('item-by-status', 'Damaged'))"/>
1083
	<xsl:text>). </xsl:text>                   </span>
1084
      </xsl:if>
1085
      <xsl:if test="count(key('item-by-status', 'On order'))>0">
1086
	<span class="unavailable">
1087
	  <xsl:text>On order (</xsl:text>
1088
	  <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1089
	<xsl:text>). </xsl:text>                   </span>
1090
      </xsl:if>
1091
      <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1092
	<span class="unavailable">
1093
	  <xsl:text>In transit (</xsl:text>
1094
	  <xsl:value-of select="count(key('item-by-status', 'In transit'))"/>
1095
	<xsl:text>). </xsl:text>                   </span>
1096
      </xsl:if>
1097
      <xsl:if test="count(key('item-by-status', 'Waiting'))>0">
1098
	<span class="unavailable">
1099
	  <xsl:text>On hold (</xsl:text>
1100
	  <xsl:value-of select="count(key('item-by-status', 'Waiting'))"/>
1101
	<xsl:text>). </xsl:text>                   </span>
1102
      </xsl:if>
1103
    </span>
1052
1104
1053
                   <xsl:if test="count(key('item-by-status', 'Checked out'))>0">
1105
    <xsl:choose>
1054
                   <span class="unavailable">
1106
      <xsl:when test="count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0">
1055
                       <xsl:text>Checked out (</xsl:text>
1107
        <span class="results_summary" id="location"> 
1056
                       <xsl:value-of select="count(key('item-by-status', 'Checked out'))"/>
1108
          <span class="label">Location(s): </span>
1057
                       <xsl:text>). </xsl:text>
1109
          <xsl:choose>
1058
				   </span>
1110
	    <xsl:when test="count(key('item-by-status', 'available'))>0">
1059
                   </xsl:if>
1111
	       <span class="available">	
1060
                   <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0">
1112
	          <xsl:variable name="available_items"
1061
                   <span class="unavailable">
1113
			  select="key('item-by-status', 'available')"/>
1062
                       <xsl:text>Withdrawn (</xsl:text>
1114
	          <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1063
                       <xsl:value-of select="count(key('item-by-status', 'Withdrawn'))"/>
1115
	            <b><xsl:value-of select="concat(items:location,' ')"/></b>
1064
                       <xsl:text>). </xsl:text>                   </span>
1116
	            <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1065
				   </xsl:if>
1117
	            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1066
                    <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0">
1118
	          </xsl:for-each>
1067
                   <span class="unavailable">
1119
	       </span>
1068
                       <xsl:text>Lost (</xsl:text>
1120
	    </xsl:when>
1069
                       <xsl:value-of select="count(key('item-by-status', 'Lost'))"/>
1121
          </xsl:choose>
1070
                       <xsl:text>). </xsl:text>                   </span>
1122
          <xsl:choose>
1071
				   </xsl:if>
1123
	     <xsl:when test="count(key('item-by-status', 'reference'))>0">
1072
                    <xsl:if test="count(key('item-by-status', 'Damaged'))>0">
1124
	        <span class="available">
1073
                   <span class="unavailable">
1125
	          <xsl:variable name="reference_items"
1074
                       <xsl:text>Damaged (</xsl:text>
1126
			  select="key('item-by-status', 'reference')"/>
1075
                       <xsl:value-of select="count(key('item-by-status', 'Damaged'))"/>
1127
	           <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1076
                       <xsl:text>). </xsl:text>                   </span>
1128
	             <b><xsl:value-of select="concat(items:location,' ')"/></b>
1077
                   </xsl:if>
1129
	             <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1078
                    <xsl:if test="count(key('item-by-status', 'On order'))>0">
1130
	             <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1079
                   <span class="unavailable">
1131
	           </xsl:for-each>
1080
                       <xsl:text>On order (</xsl:text>
1132
	        </span>
1081
                       <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1133
	     </xsl:when>
1082
                       <xsl:text>). </xsl:text>                   </span>
1134
          </xsl:choose>
1083
                   </xsl:if>
1135
       </span>
1084
                    <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1136
     </xsl:when>
1085
                   <span class="unavailable">
1137
   </xsl:choose>
1086
                       <xsl:text>In transit (</xsl:text>
1138
  </xsl:template>
1087
                       <xsl:value-of select="count(key('item-by-status', 'In transit'))"/>
1088
                       <xsl:text>). </xsl:text>                   </span>
1089
                   </xsl:if>
1090
                    <xsl:if test="count(key('item-by-status', 'Waiting'))>0">
1091
                   <span class="unavailable">
1092
                       <xsl:text>On hold (</xsl:text>
1093
                       <xsl:value-of select="count(key('item-by-status', 'Waiting'))"/>
1094
                       <xsl:text>). </xsl:text>                   </span>
1095
                   </xsl:if>
1096
               </span>
1097
    </xsl:template>
1098
1139
1099
    <xsl:template name="nameABCDQ">
1140
  <xsl:template name="nameABCDQ">
1100
            <xsl:call-template name="chopPunctuation">
1141
    <xsl:call-template name="chopPunctuation">
1101
                <xsl:with-param name="chopString">
1142
      <xsl:with-param name="chopString">
1102
                    <xsl:call-template name="subfieldSelect">
1143
	<xsl:call-template name="subfieldSelect">
1103
                        <xsl:with-param name="codes">aq</xsl:with-param>
1144
	  <xsl:with-param name="codes">aq</xsl:with-param>
1104
                    </xsl:call-template>
1145
	</xsl:call-template>
1105
                </xsl:with-param>
1146
      </xsl:with-param>
1106
                <xsl:with-param name="punctuation">
1147
      <xsl:with-param name="punctuation">
1107
                    <xsl:text>:,;/ </xsl:text>
1148
	<xsl:text>:,;/ </xsl:text>
1108
                </xsl:with-param>
1149
      </xsl:with-param>
1109
            </xsl:call-template>
1150
    </xsl:call-template>
1110
        <xsl:call-template name="termsOfAddress"/>
1151
    <xsl:call-template name="termsOfAddress"/>
1111
    </xsl:template>
1152
  </xsl:template>
1112
1153
1113
    <xsl:template name="nameABCDN">
1154
  <xsl:template name="nameABCDN">
1114
        <xsl:for-each select="marc:subfield[@code='a']">
1155
    <xsl:for-each select="marc:subfield[@code='a']">
1115
                <xsl:call-template name="chopPunctuation">
1156
      <xsl:call-template name="chopPunctuation">
1116
                    <xsl:with-param name="chopString" select="."/>
1157
	<xsl:with-param name="chopString" select="."/>
1117
                </xsl:call-template>
1158
      </xsl:call-template>
1118
        </xsl:for-each>
1159
    </xsl:for-each>
1119
        <xsl:for-each select="marc:subfield[@code='b']">
1160
    <xsl:for-each select="marc:subfield[@code='b']">
1120
                <xsl:value-of select="."/>
1161
      <xsl:value-of select="."/>
1121
        </xsl:for-each>
1162
    </xsl:for-each>
1122
        <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
1163
    <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
1123
                <xsl:call-template name="subfieldSelect">
1164
      <xsl:call-template name="subfieldSelect">
1124
                    <xsl:with-param name="codes">cdn</xsl:with-param>
1165
	<xsl:with-param name="codes">cdn</xsl:with-param>
1125
                </xsl:call-template>
1166
      </xsl:call-template>
1126
        </xsl:if>
1167
    </xsl:if>
1127
    </xsl:template>
1168
  </xsl:template>
1128
1169
1129
    <xsl:template name="nameACDEQ">
1170
  <xsl:template name="nameACDEQ">
1130
            <xsl:call-template name="subfieldSelect">
1171
    <xsl:call-template name="subfieldSelect">
1131
                <xsl:with-param name="codes">acdeq</xsl:with-param>
1172
      <xsl:with-param name="codes">acdeq</xsl:with-param>
1132
            </xsl:call-template>
1173
    </xsl:call-template>
1133
    </xsl:template>
1174
  </xsl:template>
1134
1175
1135
    <xsl:template name="termsOfAddress">
1176
  <xsl:template name="termsOfAddress">
1136
        <xsl:if test="marc:subfield[@code='b' or @code='c']">
1177
    <xsl:if test="marc:subfield[@code='b' or @code='c']">
1137
            <xsl:call-template name="chopPunctuation">
1178
      <xsl:call-template name="chopPunctuation">
1138
                <xsl:with-param name="chopString">
1179
	<xsl:with-param name="chopString">
1139
                    <xsl:call-template name="subfieldSelect">
1180
	  <xsl:call-template name="subfieldSelect">
1140
                        <xsl:with-param name="codes">bc</xsl:with-param>
1181
	    <xsl:with-param name="codes">bc</xsl:with-param>
1141
                    </xsl:call-template>
1182
	  </xsl:call-template>
1142
                </xsl:with-param>
1183
	</xsl:with-param>
1143
            </xsl:call-template>
1184
      </xsl:call-template>
1144
        </xsl:if>
1185
    </xsl:if>
1145
    </xsl:template>
1186
  </xsl:template>
1146
1187
1147
    <xsl:template name="nameDate">
1188
  <xsl:template name="nameDate">
1148
        <xsl:for-each select="marc:subfield[@code='d']">
1189
    <xsl:for-each select="marc:subfield[@code='d']">
1149
            <xsl:call-template name="chopPunctuation">
1190
      <xsl:call-template name="chopPunctuation">
1150
                <xsl:with-param name="chopString" select="."/>
1191
	<xsl:with-param name="chopString" select="."/>
1151
            </xsl:call-template>
1192
      </xsl:call-template>
1152
        </xsl:for-each>
1193
    </xsl:for-each>
1153
    </xsl:template>
1194
  </xsl:template>
1154
1195
1155
    <xsl:template name="role">
1196
  <xsl:template name="role">
1156
        <xsl:for-each select="marc:subfield[@code='e']">
1197
    <xsl:for-each select="marc:subfield[@code='e']">
1157
                    <xsl:value-of select="."/>
1198
      <xsl:value-of select="."/>
1158
        </xsl:for-each>
1199
    </xsl:for-each>
1159
        <xsl:for-each select="marc:subfield[@code='4']">
1200
    <xsl:for-each select="marc:subfield[@code='4']">
1160
                    <xsl:value-of select="."/>
1201
      <xsl:value-of select="."/>
1161
        </xsl:for-each>
1202
    </xsl:for-each>
1162
    </xsl:template>
1203
  </xsl:template>
1163
1204
1164
    <xsl:template name="specialSubfieldSelect">
1205
  <xsl:template name="specialSubfieldSelect">
1165
        <xsl:param name="anyCodes"/>
1206
    <xsl:param name="anyCodes"/>
1166
        <xsl:param name="axis"/>
1207
    <xsl:param name="axis"/>
1167
        <xsl:param name="beforeCodes"/>
1208
    <xsl:param name="beforeCodes"/>
1168
        <xsl:param name="afterCodes"/>
1209
    <xsl:param name="afterCodes"/>
1169
        <xsl:variable name="str">
1210
    <xsl:variable name="str">
1170
            <xsl:for-each select="marc:subfield">
1211
      <xsl:for-each select="marc:subfield">
1171
                <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
1212
	<xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
1172
                    <xsl:value-of select="text()"/>
1213
	  <xsl:value-of select="text()"/>
1173
                    <xsl:text> </xsl:text>
1214
	  <xsl:text> </xsl:text>
1174
                </xsl:if>
1215
	</xsl:if>
1175
            </xsl:for-each>
1216
      </xsl:for-each>
1176
        </xsl:variable>
1217
    </xsl:variable>
1177
        <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1218
    <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1178
    </xsl:template>
1219
  </xsl:template>
1179
1220
1180
    <xsl:template name="subtitle">
1221
  <xsl:template name="subtitle">
1181
        <xsl:if test="marc:subfield[@code='b']">
1222
    <xsl:if test="marc:subfield[@code='b']">
1182
                <xsl:call-template name="chopPunctuation">
1223
      <xsl:call-template name="chopPunctuation">
1183
                    <xsl:with-param name="chopString">
1224
	<xsl:with-param name="chopString">
1184
                        <xsl:value-of select="marc:subfield[@code='b']"/>
1225
	  <xsl:value-of select="marc:subfield[@code='b']"/>
1185
1226
1186
                        <!--<xsl:call-template name="subfieldSelect">
1227
	  <!--<xsl:call-template name="subfieldSelect">
1187
                            <xsl:with-param name="codes">b</xsl:with-param>                                 
1228
	      <xsl:with-param name="codes">b</xsl:with-param>                                 
1188
                        </xsl:call-template>-->
1229
	      </xsl:call-template>-->
1189
                    </xsl:with-param>
1230
	</xsl:with-param>
1190
                </xsl:call-template>
1231
      </xsl:call-template>
1191
        </xsl:if>
1232
    </xsl:if>
1192
    </xsl:template>
1233
  </xsl:template>
1193
1234
1194
    <xsl:template name="chopBrackets">
1235
  <xsl:template name="chopBrackets">
1195
        <xsl:param name="chopString"></xsl:param>
1236
    <xsl:param name="chopString"></xsl:param>
1196
        <xsl:variable name="string">
1237
    <xsl:variable name="string">
1197
            <xsl:call-template name="chopPunctuation">
1238
      <xsl:call-template name="chopPunctuation">
1198
                <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
1239
	<xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
1199
            </xsl:call-template>
1240
      </xsl:call-template>
1200
        </xsl:variable>
1241
    </xsl:variable>
1201
        <xsl:if test="substring($string, 1,1)='['">
1242
    <xsl:if test="substring($string, 1,1)='['">
1202
            <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
1243
      <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
1203
        </xsl:if>
1244
    </xsl:if>
1204
        <xsl:if test="substring($string, 1,1)!='['">
1245
    <xsl:if test="substring($string, 1,1)!='['">
1205
            <xsl:value-of select="$string"></xsl:value-of>
1246
      <xsl:value-of select="$string"></xsl:value-of>
1206
        </xsl:if>
1247
    </xsl:if>
1207
    </xsl:template>
1248
  </xsl:template>
1208
1249
1209
</xsl:stylesheet>
1250
</xsl:stylesheet>
1210
- 

Return to bug 5079