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 190-196
Link Here
|
190 |
<span class="results_summary series"><span class="label">Series: </span> |
191 |
<span class="results_summary series"><span class="label">Series: </span> |
191 |
<!-- 440 --> |
192 |
<!-- 440 --> |
192 |
<xsl:for-each select="marc:datafield[@tag=440]"> |
193 |
<xsl:for-each select="marc:datafield[@tag=440]"> |
193 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
194 |
<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> |
194 |
<xsl:call-template name="chopPunctuation"> |
195 |
<xsl:call-template name="chopPunctuation"> |
195 |
<xsl:with-param name="chopString"> |
196 |
<xsl:with-param name="chopString"> |
196 |
<xsl:call-template name="subfieldSelect"> |
197 |
<xsl:call-template name="subfieldSelect"> |
Lines 205-211
Link Here
|
205 |
|
206 |
|
206 |
<!-- 490 Series not traced, Ind1 = 0 --> |
207 |
<!-- 490 Series not traced, Ind1 = 0 --> |
207 |
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> |
208 |
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]"> |
208 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
209 |
<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> |
209 |
<xsl:call-template name="chopPunctuation"> |
210 |
<xsl:call-template name="chopPunctuation"> |
210 |
<xsl:with-param name="chopString"> |
211 |
<xsl:with-param name="chopString"> |
211 |
<xsl:call-template name="subfieldSelect"> |
212 |
<xsl:call-template name="subfieldSelect"> |
Lines 222-228
Link Here
|
222 |
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> |
223 |
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]"> |
223 |
<xsl:choose> |
224 |
<xsl:choose> |
224 |
<xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> |
225 |
<xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> |
225 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}"> |
226 |
<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> |
226 |
<xsl:call-template name="chopPunctuation"> |
227 |
<xsl:call-template name="chopPunctuation"> |
227 |
<xsl:with-param name="chopString"> |
228 |
<xsl:with-param name="chopString"> |
228 |
<xsl:call-template name="subfieldSelect"> |
229 |
<xsl:call-template name="subfieldSelect"> |
Lines 233-239
Link Here
|
233 |
</a> |
234 |
</a> |
234 |
</xsl:when> |
235 |
</xsl:when> |
235 |
<xsl:otherwise> |
236 |
<xsl:otherwise> |
236 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='t']"/>"&q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
237 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute> |
237 |
<xsl:call-template name="chopPunctuation"> |
238 |
<xsl:call-template name="chopPunctuation"> |
238 |
<xsl:with-param name="chopString"> |
239 |
<xsl:with-param name="chopString"> |
239 |
<xsl:call-template name="subfieldSelect"> |
240 |
<xsl:call-template name="subfieldSelect"> |
Lines 263-269
Link Here
|
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> |
264 |
<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> |
264 |
</xsl:when> |
265 |
</xsl:when> |
265 |
<xsl:otherwise> |
266 |
<xsl:otherwise> |
266 |
<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> |
267 |
<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> |
267 |
</xsl:otherwise> |
268 |
</xsl:otherwise> |
268 |
</xsl:choose> |
269 |
</xsl:choose> |
269 |
<xsl:text>Show analytics</xsl:text> |
270 |
<xsl:text>Show analytics</xsl:text> |
Lines 280-286
Link Here
|
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> |
281 |
<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> |
281 |
</xsl:when> |
282 |
</xsl:when> |
282 |
<xsl:otherwise> |
283 |
<xsl:otherwise> |
283 |
<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> |
284 |
<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> |
284 |
</xsl:otherwise> |
285 |
</xsl:otherwise> |
285 |
</xsl:choose> |
286 |
</xsl:choose> |
286 |
<xsl:text>Show volumes</xsl:text> |
287 |
<xsl:text>Show volumes</xsl:text> |
Lines 298-304
Link Here
|
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> |
299 |
<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> |
299 |
</xsl:when> |
300 |
</xsl:when> |
300 |
<xsl:otherwise> |
301 |
<xsl:otherwise> |
301 |
<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> |
302 |
<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> |
302 |
</xsl:otherwise> |
303 |
</xsl:otherwise> |
303 |
</xsl:choose> |
304 |
</xsl:choose> |
304 |
<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" /> |
305 |
<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" /> |
Lines 338-344
Link Here
|
338 |
</xsl:if> |
339 |
</xsl:if> |
339 |
<xsl:text> </xsl:text> |
340 |
<xsl:text> </xsl:text> |
340 |
<xsl:if test="marc:subfield[@code='b']"> |
341 |
<xsl:if test="marc:subfield[@code='b']"> |
341 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}"> |
342 |
<a> |
|
|
343 |
<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> |
342 |
<xsl:call-template name="subfieldSelect"> |
344 |
<xsl:call-template name="subfieldSelect"> |
343 |
<xsl:with-param name="codes">b</xsl:with-param> |
345 |
<xsl:with-param name="codes">b</xsl:with-param> |
344 |
</xsl:call-template> |
346 |
</xsl:call-template> |
Lines 659-671
Link Here
|
659 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
661 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
660 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
662 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
661 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
663 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
664 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
662 |
</xsl:call-template> |
665 |
</xsl:call-template> |
663 |
</xsl:attribute> |
666 |
</xsl:attribute> |
664 |
</xsl:when> |
667 |
</xsl:when> |
665 |
|
668 |
|
666 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
669 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
667 |
<xsl:otherwise> |
670 |
<xsl:otherwise> |
668 |
<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> |
671 |
<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> |
669 |
</xsl:otherwise> |
672 |
</xsl:otherwise> |
670 |
</xsl:choose> |
673 |
</xsl:choose> |
671 |
|
674 |
|
Lines 717-722
Link Here
|
717 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
720 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
718 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
721 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
719 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
722 |
<xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> |
|
|
723 |
<xsl:with-param name="urlencode">1</xsl:with-param> |
720 |
</xsl:call-template> |
724 |
</xsl:call-template> |
721 |
</xsl:attribute> |
725 |
</xsl:attribute> |
722 |
</xsl:when> |
726 |
</xsl:when> |
Lines 968-974
Link Here
|
968 |
</a> |
972 |
</a> |
969 |
</xsl:when> |
973 |
</xsl:when> |
970 |
<xsl:otherwise> |
974 |
<xsl:otherwise> |
971 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> |
975 |
<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> |
972 |
<xsl:value-of select="$f773"/> |
976 |
<xsl:value-of select="$f773"/> |
973 |
</a> |
977 |
</a> |
974 |
</xsl:otherwise> |
978 |
</xsl:otherwise> |
Lines 1031-1037
Link Here
|
1031 |
<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> |
1035 |
<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> |
1032 |
</xsl:when> |
1036 |
</xsl:when> |
1033 |
<xsl:otherwise> |
1037 |
<xsl:otherwise> |
1034 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute> |
1038 |
<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> |
1035 |
</xsl:otherwise> |
1039 |
</xsl:otherwise> |
1036 |
</xsl:choose> |
1040 |
</xsl:choose> |
1037 |
<xsl:call-template name="subfieldSelect"> |
1041 |
<xsl:call-template name="subfieldSelect"> |
Lines 1090-1096
Link Here
|
1090 |
</a> |
1094 |
</a> |
1091 |
</xsl:when> |
1095 |
</xsl:when> |
1092 |
<xsl:otherwise> |
1096 |
<xsl:otherwise> |
1093 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute> |
1097 |
<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> |
1094 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1098 |
<xsl:value-of select="translate($f780, '()', '')"/> |
1095 |
</a> |
1099 |
</a> |
1096 |
</xsl:otherwise> |
1100 |
</xsl:otherwise> |
Lines 1152-1158
Link Here
|
1152 |
</a> |
1156 |
</a> |
1153 |
</xsl:when> |
1157 |
</xsl:when> |
1154 |
<xsl:otherwise> |
1158 |
<xsl:otherwise> |
1155 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute> |
1159 |
<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> |
1156 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1160 |
<xsl:value-of select="translate($f785, '()', '')"/> |
1157 |
</a> |
1161 |
</a> |
1158 |
</xsl:otherwise> |
1162 |
</xsl:otherwise> |
Lines 1261-1270
Link Here
|
1261 |
<a> |
1265 |
<a> |
1262 |
<xsl:choose> |
1266 |
<xsl:choose> |
1263 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1267 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
1264 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
1268 |
<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> |
1265 |
</xsl:when> |
1269 |
</xsl:when> |
1266 |
<xsl:otherwise> |
1270 |
<xsl:otherwise> |
1267 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> |
1271 |
<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> |
1268 |
</xsl:otherwise> |
1272 |
</xsl:otherwise> |
1269 |
</xsl:choose> |
1273 |
</xsl:choose> |
1270 |
<xsl:choose> |
1274 |
<xsl:choose> |
Lines 1489-1494
Link Here
|
1489 |
<xsl:param name="subdivDelimiter"/> |
1493 |
<xsl:param name="subdivDelimiter"/> |
1490 |
<xsl:param name="prefix"/> |
1494 |
<xsl:param name="prefix"/> |
1491 |
<xsl:param name="suffix"/> |
1495 |
<xsl:param name="suffix"/> |
|
|
1496 |
<xsl:param name="urlencode"/> |
1492 |
<xsl:variable name="str"> |
1497 |
<xsl:variable name="str"> |
1493 |
<xsl:for-each select="marc:subfield"> |
1498 |
<xsl:for-each select="marc:subfield"> |
1494 |
<xsl:if test="contains($codes, @code)"> |
1499 |
<xsl:if test="contains($codes, @code)"> |
Lines 1499-1505
Link Here
|
1499 |
</xsl:if> |
1504 |
</xsl:if> |
1500 |
</xsl:for-each> |
1505 |
</xsl:for-each> |
1501 |
</xsl:variable> |
1506 |
</xsl:variable> |
1502 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1507 |
<xsl:choose> |
|
|
1508 |
<xsl:when test="$urlencode=1"> |
1509 |
<xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/> |
1510 |
</xsl:when> |
1511 |
<xsl:otherwise> |
1512 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1513 |
</xsl:otherwise> |
1514 |
</xsl:choose> |
1503 |
</xsl:template> |
1515 |
</xsl:template> |
1504 |
|
1516 |
|
1505 |
</xsl:stylesheet> |
1517 |
</xsl:stylesheet> |