[Koha-bugs] [Bug 8252] Error in DOM biblio for UNIMARC (no range for fields 1xx)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 24 14:17:41 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8252

--- Comment #29 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
Galen, Frederic : 
Hopefully I wrote down the problem in comment 8, because I did not remember it
this morning ;-)

In MARC21, indexing substrings is needed for controled field (001-009, with no
subfields)
But in UNIMARC it is needed for subfields of 1XX fields too.

etc/zebdradb/xml/koha-indexdefs-to-zebra.xsl does only support indexing a
position within a subfield in handle-one-index-control-field and
"kohaidx:index_leader" mode="secondary" templates.
It is good for MARC21, but not for UNIMARC.
We need a template to index position within a subfield for UNIMARC 1XX fields
too.

Current code for handle-one-index-control-field
xsl:template name="handle-one-index-control-field">
 214         <xsl:variable name="offset"><xsl:value-of
select="@offset"/></xsl:variable>
 215         <xsl:variable name="length"><xsl:value-of
select="@length"/></xsl:variable>
 216         <xsl:variable name="indexes">
 217             <xsl:call-template name="get-target-indexes"/>
 218         </xsl:variable>
 219         <z:index>
 220             <xsl:attribute name="name"><xsl:value-of
select="normalize-space($indexes)"/></xsl:attribute>
 221             <xslo:value-of>
 222                 <xsl:attribute name="select">
 223                     <xsl:choose>
 224                         <xsl:when test="@length">
 225                             <xsl:text>substring(., </xsl:text>
 226                             <xsl:value-of select="$offset + 1" />
 227                             <xsl:text>, </xsl:text>
 228                             <xsl:value-of select="$length"/>
 229                             <xsl:text>)</xsl:text>
 230                         </xsl:when>
 231                         <xsl:otherwise>
 232                             <xsl:text>.</xsl:text>
 233                         </xsl:otherwise>
 234                     </xsl:choose>
 235                 </xsl:attribute>
 236             </xslo:value-of>
 237         </z:index>
 238     </xsl:template>


Mathieu

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list