View | Details | Raw Unified | Return to bug 14217
Collapse All | Expand All

(-)a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl (-24 / +63 lines)
Lines 262-295 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
262
        <xsl:variable name="indexes">
262
        <xsl:variable name="indexes">
263
            <xsl:call-template name="get-target-indexes"/>
263
            <xsl:call-template name="get-target-indexes"/>
264
        </xsl:variable>
264
        </xsl:variable>
265
            <xslo:for-each select="marc:subfield">
265
266
        <xsl:choose>
267
            <xsl:when test="@condition">
266
                <xslo:if>
268
                <xslo:if>
267
                    <xsl:attribute name="test">
269
                    <xsl:attribute name="test">
268
                        <xsl:text>contains('</xsl:text>
270
                        <xsl:value-of select="@condition"/>
269
                        <xsl:value-of select="@subfields"/>
270
                        <xsl:text>', @code)</xsl:text>
271
                    </xsl:attribute>
271
                    </xsl:attribute>
272
                    <z:index>
272
                    <xslo:for-each select="marc:subfield">
273
                        <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
273
                        <xslo:if>
274
                        <xslo:value-of>
274
                            <xsl:attribute name="test">
275
                            <xsl:attribute name="select">
275
                                <xsl:text>contains('</xsl:text>
276
                                <xsl:choose>
276
                                <xsl:value-of select="@subfields"/>
277
                                    <xsl:when test="@length">
277
                                <xsl:text>', @code)</xsl:text>
278
                                        <xsl:text>substring(., </xsl:text>
279
                                        <xsl:value-of select="$offset + 1" />
280
                                        <xsl:text>, </xsl:text>
281
                                        <xsl:value-of select="$length"/>
282
                                        <xsl:text>)</xsl:text>
283
                                    </xsl:when>
284
                                    <xsl:otherwise>
285
                                        <xsl:text>.</xsl:text>
286
                                    </xsl:otherwise>
287
                                </xsl:choose>
288
                            </xsl:attribute>
278
                            </xsl:attribute>
289
                        </xslo:value-of>
279
                            <z:index>
290
                    </z:index>
280
                                <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
281
                                <xslo:value-of>
282
                                    <xsl:attribute name="select">
283
                                        <xsl:choose>
284
                                            <xsl:when test="@length">
285
                                                <xsl:text>substring(., </xsl:text>
286
                                                <xsl:value-of select="$offset + 1" />
287
                                                <xsl:text>, </xsl:text>
288
                                                <xsl:value-of select="$length"/>
289
                                                <xsl:text>)</xsl:text>
290
                                            </xsl:when>
291
                                            <xsl:otherwise>
292
                                                <xsl:text>.</xsl:text>
293
                                            </xsl:otherwise>
294
                                        </xsl:choose>
295
                                    </xsl:attribute>
296
                                </xslo:value-of>
297
                            </z:index>
298
                        </xslo:if>
299
                    </xslo:for-each>
291
                </xslo:if>
300
                </xslo:if>
292
            </xslo:for-each>
301
            </xsl:when>
302
            <xsl:otherwise>
303
                <xslo:for-each select="marc:subfield">
304
                    <xslo:if>
305
                        <xsl:attribute name="test">
306
                            <xsl:text>contains('</xsl:text>
307
                            <xsl:value-of select="@subfields"/>
308
                            <xsl:text>', @code)</xsl:text>
309
                        </xsl:attribute>
310
                        <z:index>
311
                            <xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
312
                            <xslo:value-of>
313
                                <xsl:attribute name="select">
314
                                    <xsl:choose>
315
                                        <xsl:when test="@length">
316
                                            <xsl:text>substring(., </xsl:text>
317
                                            <xsl:value-of select="$offset + 1" />
318
                                            <xsl:text>, </xsl:text>
319
                                            <xsl:value-of select="$length"/>
320
                                            <xsl:text>)</xsl:text>
321
                                        </xsl:when>
322
                                        <xsl:otherwise>
323
                                            <xsl:text>.</xsl:text>
324
                                        </xsl:otherwise>
325
                                    </xsl:choose>
326
                                </xsl:attribute>
327
                            </xslo:value-of>
328
                        </z:index>
329
                    </xslo:if>
330
                </xslo:for-each>
331
            </xsl:otherwise>
332
        </xsl:choose>
293
    </xsl:template>
333
    </xsl:template>
294
334
295
    <xsl:template name="handle-index-facets">
335
    <xsl:template name="handle-index-facets">
296
- 

Return to bug 14217