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 658-670
Link Here
|
658 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
660 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
659 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
661 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
660 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
662 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
663 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
661 |
</xsl:call-template> |
664 |
</xsl:call-template> |
662 |
</xsl:attribute> |
665 |
</xsl:attribute> |
663 |
</xsl:when> |
666 |
</xsl:when> |
664 |
|
667 |
|
665 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
668 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
666 |
<xsl:otherwise> |
669 |
<xsl:otherwise> |
667 |
<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> |
670 |
<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> |
668 |
</xsl:otherwise> |
671 |
</xsl:otherwise> |
669 |
</xsl:choose> |
672 |
</xsl:choose> |
670 |
|
673 |
|
Lines 716-721
Link Here
|
716 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
719 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
717 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
720 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
718 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
721 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
722 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
719 |
</xsl:call-template> |
723 |
</xsl:call-template> |
720 |
</xsl:attribute> |
724 |
</xsl:attribute> |
721 |
</xsl:when> |
725 |
</xsl:when> |
Lines 964-970
Link Here
|
964 |
</a> |
968 |
</a> |
965 |
</xsl:when> |
969 |
</xsl:when> |
966 |
<xsl:otherwise> |
970 |
<xsl:otherwise> |
967 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> |
971 |
<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> |
968 |
<xsl:value-of select="$f773"/> |
972 |
<xsl:value-of select="$f773"/> |
969 |
</a> |
973 |
</a> |
970 |
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> |
974 |
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if> |
Lines 1025-1031
Link Here
|
1025 |
<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> |
1029 |
<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> |
1026 |
</xsl:when> |
1030 |
</xsl:when> |
1027 |
<xsl:otherwise> |
1031 |
<xsl:otherwise> |
1028 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute> |
1032 |
<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> |
1029 |
</xsl:otherwise> |
1033 |
</xsl:otherwise> |
1030 |
</xsl:choose> |
1034 |
</xsl:choose> |
1031 |
<xsl:call-template name="subfieldSelect"> |
1035 |
<xsl:call-template name="subfieldSelect"> |
Lines 1084-1090
Link Here
|
1084 |
</a> |
1088 |
</a> |
1085 |
</xsl:when> |
1089 |
</xsl:when> |
1086 |
<xsl:otherwise> |
1090 |
<xsl:otherwise> |
1087 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute> |
1091 |
<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> |
1088 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1092 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1089 |
</a> |
1093 |
</a> |
1090 |
</xsl:otherwise> |
1094 |
</xsl:otherwise> |
Lines 1146-1152
Link Here
|
1146 |
</a> |
1150 |
</a> |
1147 |
</xsl:when> |
1151 |
</xsl:when> |
1148 |
<xsl:otherwise> |
1152 |
<xsl:otherwise> |
1149 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute> |
1153 |
<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> |
1150 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1154 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1151 |
</a> |
1155 |
</a> |
1152 |
</xsl:otherwise> |
1156 |
</xsl:otherwise> |
Lines 1255-1264
Link Here
|
1255 |
<a> |
1259 |
<a> |
1256 |
<xsl:choose> |
1260 |
<xsl:choose> |
1257 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1261 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1258 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
1262 |
<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> |
1259 |
</xsl:when> |
1263 |
</xsl:when> |
1260 |
<xsl:otherwise> |
1264 |
<xsl:otherwise> |
1261 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
1265 |
<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> |
1262 |
</xsl:otherwise> |
1266 |
</xsl:otherwise> |
1263 |
</xsl:choose> |
1267 |
</xsl:choose> |
1264 |
<xsl:choose> |
1268 |
<xsl:choose> |
Lines 1483-1488
Link Here
|
1483 |
<xsl:param name="subdivDelimiter"/> |
1487 |
<xsl:param name="subdivDelimiter"/> |
1484 |
<xsl:param name="prefix"/> |
1488 |
<xsl:param name="prefix"/> |
1485 |
<xsl:param name="suffix"/> |
1489 |
<xsl:param name="suffix"/> |
|
|
1490 |
<xsl:param name="urlencode"/> |
1486 |
<xsl:variable name="str"> |
1491 |
<xsl:variable name="str"> |
1487 |
<xsl:for-each select="marc:subfield"> |
1492 |
<xsl:for-each select="marc:subfield"> |
1488 |
<xsl:if test="contains($codes, @code)"> |
1493 |
<xsl:if test="contains($codes, @code)"> |
Lines 1493-1499
Link Here
|
1493 |
</xsl:if> |
1498 |
</xsl:if> |
1494 |
</xsl:for-each> |
1499 |
</xsl:for-each> |
1495 |
</xsl:variable> |
1500 |
</xsl:variable> |
1496 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1501 |
<xsl:choose> |
|
|
1502 |
<xsl:when test="$urlencode=1"> |
1503 |
<xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/> |
1504 |
</xsl:when> |
1505 |
<xsl:otherwise> |
1506 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1507 |
</xsl:otherwise> |
1508 |
</xsl:choose> |
1497 |
</xsl:template> |
1509 |
</xsl:template> |
1498 |
|
1510 |
|
1499 |
</xsl:stylesheet> |
1511 |
</xsl:stylesheet> |