Bug 14716: URI-encode URLs in NORMARC xsl templates.
https://bugs.koha-community.org/show_bug.cgi?id=14716 Test plan: 1. Catalog a record with series name "Series & more" 2. Find the record 3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
8bdde43465
commit
a140843721
6 changed files with 55 additions and 42 deletions
|
@ -7,7 +7,8 @@
|
||||||
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
||||||
xmlns:items="http://www.koha-community.org/items"
|
xmlns:items="http://www.koha-community.org/items"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
exclude-result-prefixes="marc items">
|
xmlns:str="http://exslt.org/strings"
|
||||||
|
exclude-result-prefixes="marc items str">
|
||||||
<xsl:import href="NORMARCslimUtils.xsl"/>
|
<xsl:import href="NORMARCslimUtils.xsl"/>
|
||||||
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDQ"/></a>
|
<xsl:call-template name="nameABCDQ"/></a>
|
||||||
|
@ -123,7 +124,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDN"/></a>
|
<xsl:call-template name="nameABCDN"/></a>
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameACDEQ"/></a>
|
<xsl:call-template name="nameACDEQ"/></a>
|
||||||
|
@ -170,8 +171,9 @@
|
||||||
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
|
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
|
||||||
<span class="results_summary"><span class="label">Series: </span>
|
<span class="results_summary"><span class="label">Series: </span>
|
||||||
<xsl:for-each select="marc:datafield[@tag=440]">
|
<xsl:for-each select="marc:datafield[@tag=440]">
|
||||||
<a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
|
<a>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
|
<xsl:call-template name="chopPunctuation">
|
||||||
<xsl:with-param name="chopString">
|
<xsl:with-param name="chopString">
|
||||||
<xsl:call-template name="subfieldSelect">
|
<xsl:call-template name="subfieldSelect">
|
||||||
<xsl:with-param name="codes">av</xsl:with-param>
|
<xsl:with-param name="codes">av</xsl:with-param>
|
||||||
|
@ -184,7 +186,8 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
<xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
|
<xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
|
||||||
<a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
|
<a>
|
||||||
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:call-template name="chopPunctuation">
|
||||||
<xsl:with-param name="chopString">
|
<xsl:with-param name="chopString">
|
||||||
<xsl:call-template name="subfieldSelect">
|
<xsl:call-template name="subfieldSelect">
|
||||||
|
@ -205,10 +208,10 @@
|
||||||
<a>
|
<a>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
||||||
<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>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>Show analytics</xsl:text>
|
<xsl:text>Show analytics</xsl:text>
|
||||||
|
@ -250,7 +253,7 @@
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
|
<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>
|
||||||
<xsl:value-of select="$f773"/>
|
<xsl:value-of select="$f773"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
||||||
|
@ -418,7 +421,7 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
|
<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(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:call-template name="chopPunctuation">
|
||||||
|
@ -537,7 +540,7 @@
|
||||||
<xsl:with-param name="codes">a_t</xsl:with-param>
|
<xsl:with-param name="codes">a_t</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="translate($f780, '()', '')"/>
|
<xsl:value-of select="translate($f780, '()', '')"/>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -588,7 +591,7 @@
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="translate($f785, '()', '')"/>
|
<xsl:value-of select="translate($f785, '()', '')"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
||||||
xmlns:items="http://www.koha-community.org/items"
|
xmlns:items="http://www.koha-community.org/items"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
exclude-result-prefixes="marc items">
|
xmlns:str="http://exslt.org/strings"
|
||||||
|
exclude-result-prefixes="marc items str">
|
||||||
<xsl:import href="NORMARCslimUtils.xsl"/>
|
<xsl:import href="NORMARCslimUtils.xsl"/>
|
||||||
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
||||||
<xsl:key name="item-by-status" match="items:item" use="items:status"/>
|
<xsl:key name="item-by-status" match="items:item" use="items:status"/>
|
||||||
|
@ -308,7 +309,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDQ"/></a>
|
<xsl:call-template name="nameABCDQ"/></a>
|
||||||
|
@ -323,7 +324,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDN"/></a>
|
<xsl:call-template name="nameABCDN"/></a>
|
||||||
|
@ -345,7 +346,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameACDEQ"/></a>
|
<xsl:call-template name="nameACDEQ"/></a>
|
||||||
|
@ -407,10 +408,10 @@
|
||||||
<a>
|
<a>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
||||||
<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>
|
<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>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>Show analytics</xsl:text>
|
<xsl:text>Show analytics</xsl:text>
|
||||||
|
@ -452,10 +453,10 @@
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
|
<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>
|
||||||
<xsl:value-of select="$f773"/>
|
<xsl:value-of select="$f773"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="str:encode-uri(marc:subfield[@code='g'], true())"/></xsl:if>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
|
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:str="http://exslt.org/strings">
|
||||||
<xsl:template name="datafield">
|
<xsl:template name="datafield">
|
||||||
<xsl:param name="tag"/>
|
<xsl:param name="tag"/>
|
||||||
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
|
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
|
||||||
|
@ -227,7 +230,7 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="boolean($index)">
|
<xsl:when test="boolean($index)">
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="$str"/>
|
<xsl:value-of select="$str"/>
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
xmlns:items="http://www.koha-community.org/items"
|
xmlns:items="http://www.koha-community.org/items"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:str="http://exslt.org/strings"
|
xmlns:str="http://exslt.org/strings"
|
||||||
exclude-result-prefixes="marc items">
|
exclude-result-prefixes="marc items str">
|
||||||
<xsl:import href="NORMARCslimUtils.xsl"/>
|
<xsl:import href="NORMARCslimUtils.xsl"/>
|
||||||
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDQ"/></a>
|
<xsl:call-template name="nameABCDQ"/></a>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameABCDN"/></a>
|
<xsl:call-template name="nameABCDN"/></a>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="nameACDEQ"/></a>
|
<xsl:call-template name="nameACDEQ"/></a>
|
||||||
|
@ -200,8 +200,9 @@
|
||||||
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
|
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
|
||||||
<span class="results_summary"><span class="label">Series: </span>
|
<span class="results_summary"><span class="label">Series: </span>
|
||||||
<xsl:for-each select="marc:datafield[@tag=440]">
|
<xsl:for-each select="marc:datafield[@tag=440]">
|
||||||
<a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
|
<a>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
|
<xsl:call-template name="chopPunctuation">
|
||||||
<xsl:with-param name="chopString">
|
<xsl:with-param name="chopString">
|
||||||
<xsl:call-template name="subfieldSelect">
|
<xsl:call-template name="subfieldSelect">
|
||||||
<xsl:with-param name="codes">av</xsl:with-param>
|
<xsl:with-param name="codes">av</xsl:with-param>
|
||||||
|
@ -214,7 +215,8 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
<xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
|
<xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
|
||||||
<a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
|
<a>
|
||||||
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:call-template name="chopPunctuation">
|
||||||
<xsl:with-param name="chopString">
|
<xsl:with-param name="chopString">
|
||||||
<xsl:call-template name="subfieldSelect">
|
<xsl:call-template name="subfieldSelect">
|
||||||
|
@ -235,10 +237,10 @@
|
||||||
<a>
|
<a>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
||||||
<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>
|
<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>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>Show analytics</xsl:text>
|
<xsl:text>Show analytics</xsl:text>
|
||||||
|
@ -280,7 +282,7 @@
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="$f773"/>
|
<xsl:value-of select="$f773"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
||||||
|
@ -448,7 +450,7 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:call-template name="chopPunctuation">
|
<xsl:call-template name="chopPunctuation">
|
||||||
|
@ -600,7 +602,7 @@
|
||||||
<xsl:with-param name="codes">a_t</xsl:with-param>
|
<xsl:with-param name="codes">a_t</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="translate($f780, '()', '')"/>
|
<xsl:value-of select="translate($f780, '()', '')"/>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -651,7 +653,7 @@
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="translate($f785, '()', '')"/>
|
<xsl:value-of select="translate($f785, '()', '')"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
xmlns:items="http://www.koha-community.org/items"
|
xmlns:items="http://www.koha-community.org/items"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:str="http://exslt.org/strings"
|
xmlns:str="http://exslt.org/strings"
|
||||||
exclude-result-prefixes="marc items">
|
exclude-result-prefixes="marc items str">
|
||||||
<xsl:import href="NORMARCslimUtils.xsl"/>
|
<xsl:import href="NORMARCslimUtils.xsl"/>
|
||||||
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
|
||||||
<xsl:key name="item-by-status" match="items:item" use="items:status"/>
|
<xsl:key name="item-by-status" match="items:item" use="items:status"/>
|
||||||
|
@ -396,10 +396,10 @@
|
||||||
<a>
|
<a>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
<xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
|
||||||
<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>
|
<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>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<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>
|
<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>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>Show analytics</xsl:text>
|
<xsl:text>Show analytics</xsl:text>
|
||||||
|
@ -441,7 +441,7 @@
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
|
<a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="$f773"/>
|
<xsl:value-of select="$f773"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
<xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<?xml version='1.0'?>
|
<?xml version='1.0'?>
|
||||||
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
|
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
|
||||||
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:str="http://exslt.org/strings"
|
||||||
|
exclude-result-prefixes="str">
|
||||||
<xsl:template name="datafield">
|
<xsl:template name="datafield">
|
||||||
<xsl:param name="tag"/>
|
<xsl:param name="tag"/>
|
||||||
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
|
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
|
||||||
|
@ -223,7 +227,7 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="boolean($index)">
|
<xsl:when test="boolean($index)">
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
|
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute>
|
||||||
<xsl:value-of select="$str"/>
|
<xsl:value-of select="$str"/>
|
||||||
</a>
|
</a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
Loading…
Reference in a new issue