Koha/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
Joshua Ferraro aabea3417b WARNING: Updates to Index Defs for Authorities
This commit is a partial fix to authority control for MARC21,
and better authority handling in general (for UNIMARC too).
Before this patch, authority searching, editing, saving, was
not functioning, or was extremely buggy.

WARNING: You will need to re-index your authority database after
applying this commit.

The following changes have been made:

  * Normalizing record.abs index names (in both MARC21 and UNIMARC)
  * Synching authorities/bib1.att, ccl.properties, AuthoritiesMarc.pm
    with new indexes (UNIMARC too)
  * Clean up biblios/bib1.att (remove duplicate att defs)
  * Clean up authorities-* templates to conform to new styles
  * Fixed search failure when using Default framework (now searches
    All)

Also included are several fixes to the built-in SRU server for
Authority and Biblio, it's recommended that you update your
koha-conf.xml file:

  * adding explain-authorities.xml and explain-biblios.xml
  * adding necessary info to koha-conf.xml to enable SRU/W
  * adding several example XSLT stylesheets, that can be used
    for SRU on-the-fly transformations (to MODS, DC, RDF, etc.)

Still remaining for 3.0 are the following tasks:

  * update MARC21 frameworks (authority and cross-reference bib)
  * update display code/templates in authority results list
  * update search code/templates to utilize index points
  * implement 'grouping' of authtypes for searching (Name, Title, Subject)
  * repair utility to import auths and perform matching
  * repair bibliographic import to match auths and warn if no match

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 00:28:40 -06:00

65 lines
No EOL
2.5 KiB
XML

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="datafield">
<xsl:param name="tag"/>
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
<xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>
<xsl:param name="subfields"/>
<xsl:element name="datafield">
<xsl:attribute name="tag">
<xsl:value-of select="$tag"/>
</xsl:attribute>
<xsl:attribute name="ind1">
<xsl:value-of select="$ind1"/>
</xsl:attribute>
<xsl:attribute name="ind2">
<xsl:value-of select="$ind2"/>
</xsl:attribute>
<xsl:copy-of select="$subfields"/>
</xsl:element>
</xsl:template>
<xsl:template name="subfieldSelect">
<xsl:param name="codes"/>
<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
<xsl:variable name="str">
<xsl:for-each select="marc:subfield">
<xsl:if test="contains($codes, @code)">
<xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
</xsl:template>
<xsl:template name="buildSpaces">
<xsl:param name="spaces"/>
<xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
<xsl:if test="$spaces>0">
<xsl:value-of select="$char"/>
<xsl:call-template name="buildSpaces">
<xsl:with-param name="spaces" select="$spaces - 1"/>
<xsl:with-param name="char" select="$char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="chopPunctuation">
<xsl:param name="chopString"/>
<xsl:variable name="length" select="string-length($chopString)"/>
<xsl:choose>
<xsl:when test="$length=0"/>
<xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="not($chopString)"/>
<xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->