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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-18 / +30 lines)
Lines 8-14 Link Here
8
  xmlns:marc="http://www.loc.gov/MARC21/slim"
8
  xmlns:marc="http://www.loc.gov/MARC21/slim"
9
  xmlns:items="http://www.koha-community.org/items"
9
  xmlns:items="http://www.koha-community.org/items"
10
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11
  exclude-result-prefixes="marc items">
11
  xmlns:str="http://exslt.org/strings"
12
  exclude-result-prefixes="marc items str">
12
    <xsl:import href="MARC21slimUtils.xsl"/>
13
    <xsl:import href="MARC21slimUtils.xsl"/>
13
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14
    <xsl:template match="/">
15
    <xsl:template match="/">
Lines 188-194 Link Here
188
        <span class="results_summary series"><span class="label">Series: </span>
189
        <span class="results_summary series"><span class="label">Series: </span>
189
        <!-- 440 -->
190
        <!-- 440 -->
190
        <xsl:for-each select="marc:datafield[@tag=440]">
191
        <xsl:for-each select="marc:datafield[@tag=440]">
191
            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
192
            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
192
            <xsl:call-template name="chopPunctuation">
193
            <xsl:call-template name="chopPunctuation">
193
                            <xsl:with-param name="chopString">
194
                            <xsl:with-param name="chopString">
194
                                <xsl:call-template name="subfieldSelect">
195
                                <xsl:call-template name="subfieldSelect">
Lines 203-209 Link Here
203
204
204
        <!-- 490 Series not traced, Ind1 = 0 -->
205
        <!-- 490 Series not traced, Ind1 = 0 -->
205
        <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
206
        <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
206
            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
207
            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
207
                        <xsl:call-template name="chopPunctuation">
208
                        <xsl:call-template name="chopPunctuation">
208
                            <xsl:with-param name="chopString">
209
                            <xsl:with-param name="chopString">
209
                                <xsl:call-template name="subfieldSelect">
210
                                <xsl:call-template name="subfieldSelect">
Lines 220-226 Link Here
220
            <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
221
            <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
221
                <xsl:choose>
222
                <xsl:choose>
222
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
223
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
223
                        <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
224
                        <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
224
                            <xsl:call-template name="chopPunctuation">
225
                            <xsl:call-template name="chopPunctuation">
225
                                <xsl:with-param name="chopString">
226
                                <xsl:with-param name="chopString">
226
                                    <xsl:call-template name="subfieldSelect">
227
                                    <xsl:call-template name="subfieldSelect">
Lines 231-237 Link Here
231
                        </a>
232
                        </a>
232
                    </xsl:when>
233
                    </xsl:when>
233
                    <xsl:otherwise>
234
                    <xsl:otherwise>
234
                        <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
235
                        <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
235
                            <xsl:call-template name="chopPunctuation">
236
                            <xsl:call-template name="chopPunctuation">
236
                                <xsl:with-param name="chopString">
237
                                <xsl:with-param name="chopString">
237
                                    <xsl:call-template name="subfieldSelect">
238
                                    <xsl:call-template name="subfieldSelect">
Lines 261-267 Link Here
261
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
262
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
262
            </xsl:when>
263
            </xsl:when>
263
            <xsl:otherwise>
264
            <xsl:otherwise>
264
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
265
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
265
            </xsl:otherwise>
266
            </xsl:otherwise>
266
            </xsl:choose>
267
            </xsl:choose>
267
            <xsl:text>Show analytics</xsl:text>
268
            <xsl:text>Show analytics</xsl:text>
Lines 278-284 Link Here
278
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
279
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
279
            </xsl:when>
280
            </xsl:when>
280
            <xsl:otherwise>
281
            <xsl:otherwise>
281
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
282
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
282
            </xsl:otherwise>
283
            </xsl:otherwise>
283
            </xsl:choose>
284
            </xsl:choose>
284
            <xsl:text>Show volumes</xsl:text>
285
            <xsl:text>Show volumes</xsl:text>
Lines 296-302 Link Here
296
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
297
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
297
            </xsl:when>
298
            </xsl:when>
298
            <xsl:otherwise>
299
            <xsl:otherwise>
299
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
300
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
300
            </xsl:otherwise>
301
            </xsl:otherwise>
301
            </xsl:choose>
302
            </xsl:choose>
302
            <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
303
            <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
Lines 336-342 Link Here
336
                        </xsl:if>
337
                        </xsl:if>
337
                        <xsl:text> </xsl:text>
338
                        <xsl:text> </xsl:text>
338
                        <xsl:if test="marc:subfield[@code='b']">
339
                        <xsl:if test="marc:subfield[@code='b']">
339
                        <a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}">
340
                        <a>
341
                            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/>"</xsl:attribute>
340
                            <xsl:call-template name="subfieldSelect">
342
                            <xsl:call-template name="subfieldSelect">
341
                                <xsl:with-param name="codes">b</xsl:with-param>
343
                                <xsl:with-param name="codes">b</xsl:with-param>
342
                            </xsl:call-template>
344
                            </xsl:call-template>
Lines 693-704 Link Here
693
                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
695
                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
694
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
696
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
695
                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
697
                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
698
                        <xsl:with-param name="urlencode">1</xsl:with-param>
696
                    </xsl:call-template>
699
                    </xsl:call-template>
697
                </xsl:attribute>
700
                </xsl:attribute>
698
            </xsl:when>
701
            </xsl:when>
699
            <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
702
            <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
700
            <xsl:otherwise>
703
            <xsl:otherwise>
701
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
704
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
702
            </xsl:otherwise>
705
            </xsl:otherwise>
703
            </xsl:choose>
706
            </xsl:choose>
704
            <xsl:call-template name="chopPunctuation">
707
            <xsl:call-template name="chopPunctuation">
Lines 735-740 Link Here
735
                                    <xsl:with-param name="delimeter"> AND </xsl:with-param>
738
                                    <xsl:with-param name="delimeter"> AND </xsl:with-param>
736
                                    <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
739
                                    <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
737
                                    <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
740
                                    <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
741
                                    <xsl:with-param name="urlencode">1</xsl:with-param>
738
                                </xsl:call-template>
742
                                </xsl:call-template>
739
                                </xsl:attribute>
743
                                </xsl:attribute>
740
                            </xsl:when>
744
                            </xsl:when>
Lines 840-846 Link Here
840
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
844
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
841
        <xsl:for-each select="marc:datafield[@tag=856]">
845
        <xsl:for-each select="marc:datafield[@tag=856]">
842
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
846
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
843
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
847
                                   <a><xsl:attribute name="href"><xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/></xsl:attribute>
844
                                    <xsl:choose>
848
                                    <xsl:choose>
845
                                    <xsl:when test="($Show856uAsImage='Details' 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')">
849
                                    <xsl:when test="($Show856uAsImage='Details' 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')">
846
                                        <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>
850
                                        <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>
Lines 983-989 Link Here
983
                    </a>
987
                    </a>
984
                </xsl:when>
988
                </xsl:when>
985
                <xsl:otherwise>
989
                <xsl:otherwise>
986
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
990
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
987
                        <xsl:value-of select="$f773"/>
991
                        <xsl:value-of select="$f773"/>
988
                    </a>
992
                    </a>
989
                    <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
993
                    <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
Lines 1044-1050 Link Here
1044
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
1048
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
1045
            </xsl:when>
1049
            </xsl:when>
1046
            <xsl:otherwise>
1050
            <xsl:otherwise>
1047
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
1051
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1048
            </xsl:otherwise>
1052
            </xsl:otherwise>
1049
            </xsl:choose>
1053
            </xsl:choose>
1050
            <xsl:call-template name="subfieldSelect">
1054
            <xsl:call-template name="subfieldSelect">
Lines 1103-1109 Link Here
1103
                    </a>
1107
                    </a>
1104
                </xsl:when>
1108
                </xsl:when>
1105
                <xsl:otherwise>
1109
                <xsl:otherwise>
1106
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1110
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1107
                        <xsl:value-of select="translate($f780, '()', '')"/>
1111
                        <xsl:value-of select="translate($f780, '()', '')"/>
1108
                    </a>
1112
                    </a>
1109
                </xsl:otherwise>
1113
                </xsl:otherwise>
Lines 1165-1171 Link Here
1165
                    </a>
1169
                    </a>
1166
                </xsl:when>
1170
                </xsl:when>
1167
                <xsl:otherwise>
1171
                <xsl:otherwise>
1168
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1172
                    <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1169
                        <xsl:value-of select="translate($f785, '()', '')"/>
1173
                        <xsl:value-of select="translate($f785, '()', '')"/>
1170
                    </a>
1174
                    </a>
1171
                </xsl:otherwise>
1175
                </xsl:otherwise>
Lines 1274-1283 Link Here
1274
        <a>
1278
        <a>
1275
        <xsl:choose>
1279
        <xsl:choose>
1276
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1280
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1277
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1281
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1278
            </xsl:when>
1282
            </xsl:when>
1279
            <xsl:otherwise>
1283
            <xsl:otherwise>
1280
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1284
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1281
            </xsl:otherwise>
1285
            </xsl:otherwise>
1282
        </xsl:choose>
1286
        </xsl:choose>
1283
        <xsl:choose>
1287
        <xsl:choose>
Lines 1502-1507 Link Here
1502
        <xsl:param name="subdivDelimiter"/>
1506
        <xsl:param name="subdivDelimiter"/>
1503
        <xsl:param name="prefix"/>
1507
        <xsl:param name="prefix"/>
1504
        <xsl:param name="suffix"/>
1508
        <xsl:param name="suffix"/>
1509
        <xsl:param name="urlencode"/>
1505
        <xsl:variable name="str">
1510
        <xsl:variable name="str">
1506
            <xsl:for-each select="marc:subfield">
1511
            <xsl:for-each select="marc:subfield">
1507
                <xsl:if test="contains($codes, @code)">
1512
                <xsl:if test="contains($codes, @code)">
Lines 1512-1518 Link Here
1512
                </xsl:if>
1517
                </xsl:if>
1513
            </xsl:for-each>
1518
            </xsl:for-each>
1514
        </xsl:variable>
1519
        </xsl:variable>
1515
        <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1520
        <xsl:choose>
1521
            <xsl:when test="urlencode=1">
1522
                <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1523
            </xsl:when>
1524
            <xsl:otherwise>
1525
                <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1526
            </xsl:otherwise>
1527
        </xsl:choose>
1516
    </xsl:template>
1528
    </xsl:template>
1517
1529
1518
</xsl:stylesheet>
1530
</xsl:stylesheet>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-3 / +4 lines)
Lines 5-11 Link Here
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
  xmlns:str="http://exslt.org/strings"
9
  exclude-result-prefixes="marc items str">
9
    <xsl:import href="MARC21slimUtils.xsl"/>
10
    <xsl:import href="MARC21slimUtils.xsl"/>
10
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
11
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
11
    <xsl:key name="item-by-status" match="items:item" use="items:status"/>
12
    <xsl:key name="item-by-status" match="items:item" use="items:status"/>
Lines 355-361 Link Here
355
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
356
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
356
                    </xsl:when>
357
                    </xsl:when>
357
                    <xsl:otherwise>
358
                    <xsl:otherwise>
358
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
359
                        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
359
                    </xsl:otherwise>
360
                    </xsl:otherwise>
360
                </xsl:choose>
361
                </xsl:choose>
361
                <xsl:call-template name="chopPunctuation">
362
                <xsl:call-template name="chopPunctuation">
Lines 963-969 Link Here
963
			   <span class="label">Online access: </span>
964
			   <span class="label">Online access: </span>
964
                            <xsl:for-each select="marc:datafield[@tag=856]">
965
                            <xsl:for-each select="marc:datafield[@tag=856]">
965
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
966
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
966
				   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
967
                                <a><xsl:attribute name="href"><xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/></xsl:attribute>
967
                                    <xsl:choose>
968
                                    <xsl:choose>
968
                                     <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')">
969
                                     <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')">
969
                                        <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>
970
                                        <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>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-2 / +14 lines)
Lines 1-6 Link Here
1
<?xml version='1.0'?>
1
<?xml version='1.0'?>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
3
<xsl:stylesheet version="1.0" 
4
  xmlns:marc="http://www.loc.gov/MARC21/slim"
5
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6
  xmlns:str="http://exslt.org/strings"
7
  exclude-result-prefixes="marc">
4
	<xsl:template name="datafield">
8
	<xsl:template name="datafield">
5
		<xsl:param name="tag"/>
9
		<xsl:param name="tag"/>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
10
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
Lines 27-32 Link Here
27
		<xsl:param name="subdivDelimiter"/>
31
		<xsl:param name="subdivDelimiter"/>
28
        <xsl:param name="prefix"/>
32
        <xsl:param name="prefix"/>
29
        <xsl:param name="suffix"/>
33
        <xsl:param name="suffix"/>
34
        <xsl:param name="urlencode"/>
30
		<xsl:variable name="str">
35
		<xsl:variable name="str">
31
			<xsl:for-each select="marc:subfield">
36
			<xsl:for-each select="marc:subfield">
32
				<xsl:if test="contains($codes, @code)">
37
				<xsl:if test="contains($codes, @code)">
Lines 37-43 Link Here
37
				</xsl:if>
42
				</xsl:if>
38
			</xsl:for-each>
43
			</xsl:for-each>
39
		</xsl:variable>
44
		</xsl:variable>
40
		<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
45
        <xsl:choose>
46
            <xsl:when test="urlencode=1">
47
                <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter))    )"/>
48
            </xsl:when>
49
            <xsl:otherwise>
50
                <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
51
            </xsl:otherwise>
52
        </xsl:choose>            
41
	</xsl:template>
53
	</xsl:template>
42
54
43
    <xsl:template name="subfieldSelectSpan">
55
    <xsl:template name="subfieldSelectSpan">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-16 / +25 lines)
Lines 7-13 Link Here
7
  xmlns:items="http://www.koha-community.org/items"
7
  xmlns:items="http://www.koha-community.org/items"
8
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9
  xmlns:str="http://exslt.org/strings"
9
  xmlns:str="http://exslt.org/strings"
10
  exclude-result-prefixes="marc items">
10
  exclude-result-prefixes="marc items str">
11
    <xsl:import href="MARC21slimUtils.xsl"/>
11
    <xsl:import href="MARC21slimUtils.xsl"/>
12
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
12
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13
13
Lines 206-212 Link Here
206
        <span class="results_summary series"><span class="label">Series: </span>
206
        <span class="results_summary series"><span class="label">Series: </span>
207
        <!-- 440 -->
207
        <!-- 440 -->
208
        <xsl:for-each select="marc:datafield[@tag=440]">
208
        <xsl:for-each select="marc:datafield[@tag=440]">
209
            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
209
            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
210
            <xsl:call-template name="chopPunctuation">
210
            <xsl:call-template name="chopPunctuation">
211
                            <xsl:with-param name="chopString">
211
                            <xsl:with-param name="chopString">
212
                                <xsl:call-template name="subfieldSelect">
212
                                <xsl:call-template name="subfieldSelect">
Lines 221-227 Link Here
221
221
222
        <!-- 490 Series not traced, Ind1 = 0 -->
222
        <!-- 490 Series not traced, Ind1 = 0 -->
223
        <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
223
        <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
224
            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
224
            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
225
                        <xsl:call-template name="chopPunctuation">
225
                        <xsl:call-template name="chopPunctuation">
226
                            <xsl:with-param name="chopString">
226
                            <xsl:with-param name="chopString">
227
                                <xsl:call-template name="subfieldSelect">
227
                                <xsl:call-template name="subfieldSelect">
Lines 238-244 Link Here
238
            <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
238
            <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
239
                <xsl:choose>
239
                <xsl:choose>
240
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
240
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
241
                        <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
241
                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
242
                            <xsl:call-template name="chopPunctuation">
242
                            <xsl:call-template name="chopPunctuation">
243
                                <xsl:with-param name="chopString">
243
                                <xsl:with-param name="chopString">
244
                                    <xsl:call-template name="subfieldSelect">
244
                                    <xsl:call-template name="subfieldSelect">
Lines 249-255 Link Here
249
                        </a>
249
                        </a>
250
                    </xsl:when>
250
                    </xsl:when>
251
                    <xsl:otherwise>
251
                    <xsl:otherwise>
252
                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
252
                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
253
                            <xsl:call-template name="chopPunctuation">
253
                            <xsl:call-template name="chopPunctuation">
254
                                <xsl:with-param name="chopString">
254
                                <xsl:with-param name="chopString">
255
                                    <xsl:call-template name="subfieldSelect">
255
                                    <xsl:call-template name="subfieldSelect">
Lines 275-284 Link Here
275
            <a>
275
            <a>
276
            <xsl:choose>
276
            <xsl:choose>
277
            <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
277
            <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
278
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
278
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
279
            </xsl:when>
279
            </xsl:when>
280
            <xsl:otherwise>
280
            <xsl:otherwise>
281
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
281
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
282
            </xsl:otherwise>
282
            </xsl:otherwise>
283
            </xsl:choose>
283
            </xsl:choose>
284
            <xsl:text>Show analytics</xsl:text>
284
            <xsl:text>Show analytics</xsl:text>
Lines 292-301 Link Here
292
            <a>
292
            <a>
293
            <xsl:choose>
293
            <xsl:choose>
294
            <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
294
            <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
295
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
295
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
296
            </xsl:when>
296
            </xsl:when>
297
            <xsl:otherwise>
297
            <xsl:otherwise>
298
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
298
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
299
            </xsl:otherwise>
299
            </xsl:otherwise>
300
            </xsl:choose>
300
            </xsl:choose>
301
            <xsl:text>Show volumes</xsl:text>
301
            <xsl:text>Show volumes</xsl:text>
Lines 313-319 Link Here
313
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
313
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
314
            </xsl:when>
314
            </xsl:when>
315
            <xsl:otherwise>
315
            <xsl:otherwise>
316
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
316
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
317
            </xsl:otherwise>
317
            </xsl:otherwise>
318
            </xsl:choose>
318
            </xsl:choose>
319
            <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
319
            <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
Lines 356-362 Link Here
356
                     </xsl:if>
356
                     </xsl:if>
357
                     <xsl:text> </xsl:text>
357
                     <xsl:text> </xsl:text>
358
                     <xsl:if test="marc:subfield[@code='b']">
358
                     <xsl:if test="marc:subfield[@code='b']">
359
                     <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=Provider:{marc:subfield[@code='b']}">
359
                     <span property="name"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute>
360
                         <xsl:call-template name="subfieldSelect">
360
                         <xsl:call-template name="subfieldSelect">
361
                             <xsl:with-param name="codes">b</xsl:with-param>
361
                             <xsl:with-param name="codes">b</xsl:with-param>
362
                         </xsl:call-template>
362
                         </xsl:call-template>
Lines 733-744 Link Here
733
                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
733
                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
734
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
734
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
735
                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
735
                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
736
                        <xsl:with-param name="urlencode">1</xsl:with-param>
736
                    </xsl:call-template>
737
                    </xsl:call-template>
737
                </xsl:attribute>
738
                </xsl:attribute>
738
            </xsl:when>
739
            </xsl:when>
739
                <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
740
                <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
740
            <xsl:otherwise>
741
            <xsl:otherwise>
741
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
742
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
742
            </xsl:otherwise>
743
            </xsl:otherwise>
743
            </xsl:choose>
744
            </xsl:choose>
744
            <xsl:call-template name="chopPunctuation">
745
            <xsl:call-template name="chopPunctuation">
Lines 787-797 Link Here
787
                                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
788
                                        <xsl:with-param name="delimeter"> AND </xsl:with-param>
788
                                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
789
                                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
789
                                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
790
                                        <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
791
                                        <xsl:with-param name="urlencode">1</xsl:with-param>
790
                                    </xsl:call-template>
792
                                    </xsl:call-template>
791
                                    </xsl:attribute>
793
                                    </xsl:attribute>
792
                                </xsl:when>
794
                                </xsl:when>
793
                                <xsl:otherwise>
795
                                <xsl:otherwise>
794
                                    <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
796
                                    <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
795
                                </xsl:otherwise>
797
                                </xsl:otherwise>
796
                            </xsl:choose>
798
                            </xsl:choose>
797
                        <xsl:call-template name="subfieldSelect">
799
                        <xsl:call-template name="subfieldSelect">
Lines 836-842 Link Here
836
                        <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
838
                        <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
837
                        <xsl:call-template name="extractControlNumber">
839
                        <xsl:call-template name="extractControlNumber">
838
                            <xsl:with-param name="subfieldW">
840
                            <xsl:with-param name="subfieldW">
839
                                <xsl:value-of select="marc:subfield[@code='w']"/>
841
                                <xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/>
840
                            </xsl:with-param>
842
                            </xsl:with-param>
841
                        </xsl:call-template>
843
                        </xsl:call-template>
842
                    </xsl:attribute>
844
                    </xsl:attribute>
Lines 1660-1665 Link Here
1660
        <xsl:param name="subdivDelimiter"/>
1662
        <xsl:param name="subdivDelimiter"/>
1661
        <xsl:param name="prefix"/>
1663
        <xsl:param name="prefix"/>
1662
        <xsl:param name="suffix"/>
1664
        <xsl:param name="suffix"/>
1665
        <xsl:param name="urlencode"/>
1663
        <xsl:variable name="str">
1666
        <xsl:variable name="str">
1664
            <xsl:for-each select="marc:subfield">
1667
            <xsl:for-each select="marc:subfield">
1665
                <xsl:if test="contains($codes, @code)">
1668
                <xsl:if test="contains($codes, @code)">
Lines 1670-1675 Link Here
1670
                </xsl:if>
1673
                </xsl:if>
1671
            </xsl:for-each>
1674
            </xsl:for-each>
1672
        </xsl:variable>
1675
        </xsl:variable>
1673
        <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1676
        <xsl:choose>
1677
            <xsl:when test="urlencode=1">
1678
                <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1679
            </xsl:when>
1680
            <xsl:otherwise>
1681
                <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1682
            </xsl:otherwise>
1683
        </xsl:choose>
1674
    </xsl:template>
1684
    </xsl:template>
1675
</xsl:stylesheet>
1685
</xsl:stylesheet>
1676
- 

Return to bug 14716