Lines 3-8
Link Here
|
3 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
3 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
4 |
|
4 |
|
5 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
5 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
|
|
6 |
<!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com --> |
6 |
<xsl:stylesheet version="1.0" |
7 |
<xsl:stylesheet version="1.0" |
7 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
8 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
8 |
xmlns:items="http://www.koha-community.org/items" |
9 |
xmlns:items="http://www.koha-community.org/items" |
Lines 530-540
Link Here
|
530 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
531 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
531 |
<a> |
532 |
<a> |
532 |
<xsl:choose> |
533 |
<xsl:choose> |
|
|
534 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
533 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
535 |
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> |
534 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
536 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
535 |
</xsl:when> |
537 |
</xsl:when> |
536 |
<xsl:when test="$TraceSubjectSubdivisions='1'"> |
538 |
<xsl:when test="$TraceSubjectSubdivisions='1'"> |
537 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect"> |
539 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject"> |
538 |
<xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param> |
540 |
<xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param> |
539 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
541 |
<xsl:with-param name="delimeter"> AND </xsl:with-param> |
540 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
542 |
<xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> |
Lines 542-549
Link Here
|
542 |
</xsl:call-template> |
544 |
</xsl:call-template> |
543 |
</xsl:attribute> |
545 |
</xsl:attribute> |
544 |
</xsl:when> |
546 |
</xsl:when> |
|
|
547 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
545 |
<xsl:otherwise> |
548 |
<xsl:otherwise> |
546 |
<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> |
549 |
<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> |
547 |
</xsl:otherwise> |
550 |
</xsl:otherwise> |
548 |
</xsl:choose> |
551 |
</xsl:choose> |
549 |
<xsl:call-template name="chopPunctuation"> |
552 |
<xsl:call-template name="chopPunctuation"> |
Lines 985-988
Link Here
|
985 |
</xsl:if> |
988 |
</xsl:if> |
986 |
</xsl:template> |
989 |
</xsl:template> |
987 |
|
990 |
|
|
|
991 |
<!-- #1807 Strip unwanted parenthesis from subjects for searching --> |
992 |
<xsl:template name="subfieldSelectSubject"> |
993 |
<xsl:param name="codes"/> |
994 |
<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param> |
995 |
<xsl:param name="subdivCodes"/> |
996 |
<xsl:param name="subdivDelimiter"/> |
997 |
<xsl:param name="prefix"/> |
998 |
<xsl:param name="suffix"/> |
999 |
<xsl:variable name="str"> |
1000 |
<xsl:for-each select="marc:subfield"> |
1001 |
<xsl:if test="contains($codes, @code)"> |
1002 |
<xsl:if test="contains($subdivCodes, @code)"> |
1003 |
<xsl:value-of select="$subdivDelimiter"/> |
1004 |
</xsl:if> |
1005 |
<xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/> |
1006 |
</xsl:if> |
1007 |
</xsl:for-each> |
1008 |
</xsl:variable> |
1009 |
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/> |
1010 |
</xsl:template> |
1011 |
|
988 |
</xsl:stylesheet> |
1012 |
</xsl:stylesheet> |