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 189-195
Link Here
|
189 |
<span class="results_summary series"><span class="label">Series: </span> |
190 |
<span class="results_summary series"><span class="label">Series: </span> |
190 |
<!-- 440 --> |
191 |
<!-- 440 --> |
191 |
<xsl:for-each select="marc:datafield[@tag=440]"> |
192 |
<xsl:for-each select="marc:datafield[@tag=440]"> |
192 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
193 |
<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> |
193 |
<xsl:call-template name="chopPunctuation"> |
194 |
<xsl:call-template name="chopPunctuation"> |
194 |
<xsl:with-param name="chopString"> |
195 |
<xsl:with-param name="chopString"> |
195 |
<xsl:call-template name="subfieldSelect"> |
196 |
<xsl:call-template name="subfieldSelect"> |
Lines 204-210
Link Here
|
204 |
|
205 |
|
205 |
<!-- 490 Series not traced, Ind1 = 0 --> |
206 |
<!-- 490 Series not traced, Ind1 = 0 --> |
206 |
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> |
207 |
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> |
207 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
208 |
<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> |
208 |
<xsl:call-template name="chopPunctuation"> |
209 |
<xsl:call-template name="chopPunctuation"> |
209 |
<xsl:with-param name="chopString"> |
210 |
<xsl:with-param name="chopString"> |
210 |
<xsl:call-template name="subfieldSelect"> |
211 |
<xsl:call-template name="subfieldSelect"> |
Lines 221-227
Link Here
|
221 |
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> |
222 |
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> |
222 |
<xsl:choose> |
223 |
<xsl:choose> |
223 |
<xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> |
224 |
<xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> |
224 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}"> |
225 |
<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> |
225 |
<xsl:call-template name="chopPunctuation"> |
226 |
<xsl:call-template name="chopPunctuation"> |
226 |
<xsl:with-param name="chopString"> |
227 |
<xsl:with-param name="chopString"> |
227 |
<xsl:call-template name="subfieldSelect"> |
228 |
<xsl:call-template name="subfieldSelect"> |
Lines 232-238
Link Here
|
232 |
</a> |
233 |
</a> |
233 |
</xsl:when> |
234 |
</xsl:when> |
234 |
<xsl:otherwise> |
235 |
<xsl:otherwise> |
235 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
236 |
<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> |
236 |
<xsl:call-template name="chopPunctuation"> |
237 |
<xsl:call-template name="chopPunctuation"> |
237 |
<xsl:with-param name="chopString"> |
238 |
<xsl:with-param name="chopString"> |
238 |
<xsl:call-template name="subfieldSelect"> |
239 |
<xsl:call-template name="subfieldSelect"> |
Lines 262-268
Link Here
|
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> |
263 |
<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> |
263 |
</xsl:when> |
264 |
</xsl:when> |
264 |
<xsl:otherwise> |
265 |
<xsl:otherwise> |
265 |
<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> |
266 |
<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> |
266 |
</xsl:otherwise> |
267 |
</xsl:otherwise> |
267 |
</xsl:choose> |
268 |
</xsl:choose> |
268 |
<xsl:text>Show analytics</xsl:text> |
269 |
<xsl:text>Show analytics</xsl:text> |
Lines 279-285
Link Here
|
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> |
280 |
<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> |
280 |
</xsl:when> |
281 |
</xsl:when> |
281 |
<xsl:otherwise> |
282 |
<xsl:otherwise> |
282 |
<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> |
283 |
<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> |
283 |
</xsl:otherwise> |
284 |
</xsl:otherwise> |
284 |
</xsl:choose> |
285 |
</xsl:choose> |
285 |
<xsl:text>Show volumes</xsl:text> |
286 |
<xsl:text>Show volumes</xsl:text> |
Lines 297-303
Link Here
|
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> |
298 |
<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> |
298 |
</xsl:when> |
299 |
</xsl:when> |
299 |
<xsl:otherwise> |
300 |
<xsl:otherwise> |
300 |
<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> |
301 |
<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> |
301 |
</xsl:otherwise> |
302 |
</xsl:otherwise> |
302 |
</xsl:choose> |
303 |
</xsl:choose> |
303 |
<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" /> |
304 |
<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" /> |
Lines 337-343
Link Here
|
337 |
</xsl:if> |
338 |
</xsl:if> |
338 |
<xsl:text> </xsl:text> |
339 |
<xsl:text> </xsl:text> |
339 |
<xsl:if test="marc:subfield[@code='b']"> |
340 |
<xsl:if test="marc:subfield[@code='b']"> |
340 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}"> |
341 |
<a> |
|
|
342 |
<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> |
341 |
<xsl:call-template name="subfieldSelect"> |
343 |
<xsl:call-template name="subfieldSelect"> |
342 |
<xsl:with-param name="codes">b</xsl:with-param> |
344 |
<xsl:with-param name="codes">b</xsl:with-param> |
343 |
</xsl:call-template> |
345 |
</xsl:call-template> |
Lines 694-706
Link Here
|
694 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
696 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
695 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
697 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
696 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
698 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
699 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
697 |
</xsl:call-template> |
700 |
</xsl:call-template> |
698 |
</xsl:attribute> |
701 |
</xsl:attribute> |
699 |
</xsl:when> |
702 |
</xsl:when> |
700 |
|
703 |
|
701 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
704 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
702 |
<xsl:otherwise> |
705 |
<xsl:otherwise> |
703 |
<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> |
706 |
<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> |
704 |
</xsl:otherwise> |
707 |
</xsl:otherwise> |
705 |
</xsl:choose> |
708 |
</xsl:choose> |
706 |
|
709 |
|
Lines 752-757
Link Here
|
752 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
755 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
753 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
756 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
754 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
757 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
758 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
755 |
</xsl:call-template> |
759 |
</xsl:call-template> |
756 |
</xsl:attribute> |
760 |
</xsl:attribute> |
757 |
</xsl:when> |
761 |
</xsl:when> |
Lines 1000-1006
Link Here
|
1000 |
</a> |
1004 |
</a> |
1001 |
</xsl:when> |
1005 |
</xsl:when> |
1002 |
<xsl:otherwise> |
1006 |
<xsl:otherwise> |
1003 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> |
1007 |
<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> |
1004 |
<xsl:value-of select="$f773"/> |
1008 |
<xsl:value-of select="$f773"/> |
1005 |
</a> |
1009 |
</a> |
1006 |
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> |
1010 |
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> |
Lines 1061-1067
Link Here
|
1061 |
<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> |
1065 |
<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> |
1062 |
</xsl:when> |
1066 |
</xsl:when> |
1063 |
<xsl:otherwise> |
1067 |
<xsl:otherwise> |
1064 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute> |
1068 |
<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> |
1065 |
</xsl:otherwise> |
1069 |
</xsl:otherwise> |
1066 |
</xsl:choose> |
1070 |
</xsl:choose> |
1067 |
<xsl:call-template name="subfieldSelect"> |
1071 |
<xsl:call-template name="subfieldSelect"> |
Lines 1120-1126
Link Here
|
1120 |
</a> |
1124 |
</a> |
1121 |
</xsl:when> |
1125 |
</xsl:when> |
1122 |
<xsl:otherwise> |
1126 |
<xsl:otherwise> |
1123 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute> |
1127 |
<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> |
1124 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1128 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1125 |
</a> |
1129 |
</a> |
1126 |
</xsl:otherwise> |
1130 |
</xsl:otherwise> |
Lines 1182-1188
Link Here
|
1182 |
</a> |
1186 |
</a> |
1183 |
</xsl:when> |
1187 |
</xsl:when> |
1184 |
<xsl:otherwise> |
1188 |
<xsl:otherwise> |
1185 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute> |
1189 |
<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> |
1186 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1190 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1187 |
</a> |
1191 |
</a> |
1188 |
</xsl:otherwise> |
1192 |
</xsl:otherwise> |
Lines 1291-1300
Link Here
|
1291 |
<a> |
1295 |
<a> |
1292 |
<xsl:choose> |
1296 |
<xsl:choose> |
1293 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1297 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1294 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
1298 |
<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> |
1295 |
</xsl:when> |
1299 |
</xsl:when> |
1296 |
<xsl:otherwise> |
1300 |
<xsl:otherwise> |
1297 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
1301 |
<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> |
1298 |
</xsl:otherwise> |
1302 |
</xsl:otherwise> |
1299 |
</xsl:choose> |
1303 |
</xsl:choose> |
1300 |
<xsl:choose> |
1304 |
<xsl:choose> |
Lines 1519-1524
Link Here
|
1519 |
<xsl:param name="subdivDelimiter"/> |
1523 |
<xsl:param name="subdivDelimiter"/> |
1520 |
<xsl:param name="prefix"/> |
1524 |
<xsl:param name="prefix"/> |
1521 |
<xsl:param name="suffix"/> |
1525 |
<xsl:param name="suffix"/> |
|
|
1526 |
<xsl:param name="urlencode"/> |
1522 |
<xsl:variable name="str"> |
1527 |
<xsl:variable name="str"> |
1523 |
<xsl:for-each select="marc:subfield"> |
1528 |
<xsl:for-each select="marc:subfield"> |
1524 |
<xsl:if test="contains($codes, @code)"> |
1529 |
<xsl:if test="contains($codes, @code)"> |
Lines 1529-1535
Link Here
|
1529 |
</xsl:if> |
1534 |
</xsl:if> |
1530 |
</xsl:for-each> |
1535 |
</xsl:for-each> |
1531 |
</xsl:variable> |
1536 |
</xsl:variable> |
1532 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1537 |
<xsl:choose> |
|
|
1538 |
<xsl:when test="$urlencode=1"> |
1539 |
<xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/> |
1540 |
</xsl:when> |
1541 |
<xsl:otherwise> |
1542 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1543 |
</xsl:otherwise> |
1544 |
</xsl:choose> |
1533 |
</xsl:template> |
1545 |
</xsl:template> |
1534 |
|
1546 |
|
1535 |
</xsl:stylesheet> |
1547 |
</xsl:stylesheet> |