00b587e5cc
In some XSLT, "items" namespace is used in exclude-result-prefixes but is not defined. This patch add this namespace where missing. Also corrects a koha.org, instead of koha-community.org, in one namespace URL. Test plan : - Enable XSLT on search results - Perform a search => Look at error logs to check that there is no xsl error like : [Fri Feb 08 15:35:06 2013] [error] [client 127.0.0.1] [Fri Feb 8 15:35:06 2013] opac-search.pl: compilation error: file koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl line 8 element stylesheet, referer: http://opac.master.community.localhost/cgi-bin/koha/opac-detail.pl?biblionumber=299 [Fri Feb 08 15:35:06 2013] [error] [client 127.0.0.1] [Fri Feb 8 15:35:06 2013] opac-search.pl: xsl:exclude-result-prefixes : undefined namespace items, referer: http://opac.master.community.localhost/cgi-bin/koha/opac-detail.pl?biblionumber=299 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> With comment on Bugzilla. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
69 lines
2.7 KiB
XML
69 lines
2.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
|
xmlns:items="http://www.koha-community.org/items"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
exclude-result-prefixes="marc items">
|
|
<xsl:import href="UNIMARCslimUtils.xsl"/>
|
|
<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-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
|
|
|
|
<xsl:template match="/">
|
|
<xsl:apply-templates/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="marc:record">
|
|
<xsl:variable name="leader" select="marc:leader"/>
|
|
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
|
|
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
|
|
<xsl:variable name="biblionumber" select="marc:controlfield[@tag=001]"/>
|
|
<xsl:variable name="isbn" select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/>
|
|
|
|
<xsl:if test="marc:datafield[@tag=200]">
|
|
<xsl:for-each select="marc:datafield[@tag=200]">
|
|
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
|
|
</xsl:attribute>
|
|
<xsl:variable name="title" select="marc:subfield[@code='a']"/>
|
|
<xsl:variable name="ntitle"
|
|
select="translate($title, '˜œ슜슛슘슈슉','')"/>
|
|
<xsl:value-of select="$ntitle" />
|
|
</a>
|
|
<xsl:if test="marc:subfield[@code='e']">
|
|
<xsl:text> : </xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='e']"/>
|
|
</xsl:if>
|
|
<xsl:if test="marc:subfield[@code='b']">
|
|
<xsl:text> [</xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='b']"/>
|
|
<xsl:text>]</xsl:text>
|
|
</xsl:if>
|
|
<xsl:if test="marc:subfield[@code='h']">
|
|
<xsl:text> : </xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='h']"/>
|
|
</xsl:if>
|
|
<xsl:if test="marc:subfield[@code='i']">
|
|
<xsl:text> : </xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='i']"/>
|
|
</xsl:if>
|
|
<xsl:if test="marc:subfield[@code='f']">
|
|
<xsl:text> / </xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='f']"/>
|
|
</xsl:if>
|
|
<xsl:if test="marc:subfield[@code='g']">
|
|
<xsl:text> ; </xsl:text>
|
|
<xsl:value-of select="marc:subfield[@code='g']"/>
|
|
</xsl:if>
|
|
<xsl:text> </xsl:text>
|
|
</xsl:for-each>
|
|
</xsl:if>
|
|
|
|
<xsl:call-template name="tag_4xx" />
|
|
|
|
<xsl:call-template name="tag_210" />
|
|
|
|
<xsl:call-template name="tag_215" />
|
|
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|