Lines 15-20
Link Here
|
15 |
<xsl:key name="index_control_field_tag" match="kohaidx:index_control_field" use="@tag"/> |
15 |
<xsl:key name="index_control_field_tag" match="kohaidx:index_control_field" use="@tag"/> |
16 |
<xsl:key name="index_subfields_tag" match="kohaidx:index_subfields" use="@tag"/> |
16 |
<xsl:key name="index_subfields_tag" match="kohaidx:index_subfields" use="@tag"/> |
17 |
<xsl:key name="index_heading_tag" match="kohaidx:index_heading" use="@tag"/> |
17 |
<xsl:key name="index_heading_tag" match="kohaidx:index_heading" use="@tag"/> |
|
|
18 |
<xsl:key name="index_data_field_tag" match="kohaidx:index_data_field" use="@tag"/> |
18 |
<xsl:key name="index_match_heading_tag" match="kohaidx:index_match_heading" use="@tag"/> |
19 |
<xsl:key name="index_match_heading_tag" match="kohaidx:index_match_heading" use="@tag"/> |
19 |
|
20 |
|
20 |
<xsl:template match="kohaidx:index_defs"> |
21 |
<xsl:template match="kohaidx:index_defs"> |
Lines 30-35
authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
Link Here
|
30 |
<xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/> |
31 |
<xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/> |
31 |
<xslo:template match="text()"/> |
32 |
<xslo:template match="text()"/> |
32 |
<xslo:template match="text()" mode="index_subfields"/> |
33 |
<xslo:template match="text()" mode="index_subfields"/> |
|
|
34 |
<xslo:template match="text()" mode="index_data_field"/> |
33 |
<xslo:template match="text()" mode="index_heading"/> |
35 |
<xslo:template match="text()" mode="index_heading"/> |
34 |
<xslo:template match="text()" mode="index_match_heading"/> |
36 |
<xslo:template match="text()" mode="index_match_heading"/> |
35 |
<xslo:template match="text()" mode="index_subject_thesaurus"/> |
37 |
<xslo:template match="text()" mode="index_subject_thesaurus"/> |
Lines 50-55
authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
Link Here
|
50 |
<xslo:attribute name="z:id"><xslo:value-of select="$controlField001"/></xslo:attribute> |
52 |
<xslo:attribute name="z:id"><xslo:value-of select="$controlField001"/></xslo:attribute> |
51 |
<xslo:apply-templates/> |
53 |
<xslo:apply-templates/> |
52 |
<xslo:apply-templates mode="index_subfields"/> |
54 |
<xslo:apply-templates mode="index_subfields"/> |
|
|
55 |
<xslo:apply-templates mode="index_data_field"/> |
53 |
<xslo:apply-templates mode="index_heading"/> |
56 |
<xslo:apply-templates mode="index_heading"/> |
54 |
<xslo:apply-templates mode="index_match_heading"/> |
57 |
<xslo:apply-templates mode="index_match_heading"/> |
55 |
<xslo:apply-templates mode="index_subject_thesaurus"/> |
58 |
<xslo:apply-templates mode="index_subject_thesaurus"/> |
Lines 59-64
authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
Link Here
|
59 |
<xsl:call-template name="handle-index-leader"/> |
62 |
<xsl:call-template name="handle-index-leader"/> |
60 |
<xsl:call-template name="handle-index-control-field"/> |
63 |
<xsl:call-template name="handle-index-control-field"/> |
61 |
<xsl:call-template name="handle-index-subfields"/> |
64 |
<xsl:call-template name="handle-index-subfields"/> |
|
|
65 |
<xsl:call-template name="handle-index-data-field"/> |
62 |
<xsl:call-template name="handle-index-heading"/> |
66 |
<xsl:call-template name="handle-index-heading"/> |
63 |
<xsl:call-template name="handle-index-match-heading"/> |
67 |
<xsl:call-template name="handle-index-match-heading"/> |
64 |
<xsl:apply-templates/> |
68 |
<xsl:apply-templates/> |
Lines 260-265
authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
Link Here
|
260 |
</xslo:for-each> |
264 |
</xslo:for-each> |
261 |
</xsl:template> |
265 |
</xsl:template> |
262 |
|
266 |
|
|
|
267 |
<xsl:template name="handle-index-data-field"> |
268 |
<xsl:for-each select="//kohaidx:index_data_field[generate-id() = generate-id(key('index_data_field_tag', @tag)[1])]"> |
269 |
<xslo:template mode="index_data_field"> |
270 |
<xsl:attribute name="match"> |
271 |
<xsl:text>marc:datafield[@tag='</xsl:text> |
272 |
<xsl:value-of select="@tag"/> |
273 |
<xsl:text>']</xsl:text> |
274 |
</xsl:attribute> |
275 |
<xsl:for-each select="key('index_data_field_tag', @tag)"> |
276 |
<xsl:call-template name="handle-one-data-field"/> |
277 |
</xsl:for-each> |
278 |
</xslo:template> |
279 |
</xsl:for-each> |
280 |
</xsl:template> |
281 |
|
282 |
<xsl:template name="handle-one-data-field"> |
283 |
<xsl:variable name="indexes"> |
284 |
<xsl:call-template name="get-target-indexes"/> |
285 |
</xsl:variable> |
286 |
<z:index> |
287 |
<xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute> |
288 |
<xslo:variable name="raw_heading"> |
289 |
<xslo:for-each select="marc:subfield"> |
290 |
<xslo:if test="position() > 1"> |
291 |
<xslo:value-of select="substring(' ', 1, 1)"/> <!-- FIXME surely there's a better way to specify a space --> |
292 |
</xslo:if> |
293 |
<xslo:value-of select="."/> |
294 |
</xslo:for-each> |
295 |
</xslo:variable> |
296 |
<xslo:value-of select="normalize-space($raw_heading)"/> |
297 |
</z:index> |
298 |
</xsl:template> |
299 |
|
263 |
<xsl:template name="handle-index-heading"> |
300 |
<xsl:template name="handle-index-heading"> |
264 |
<xsl:for-each select="//kohaidx:index_heading[generate-id() = generate-id(key('index_heading_tag', @tag)[1])]"> |
301 |
<xsl:for-each select="//kohaidx:index_heading[generate-id() = generate-id(key('index_heading_tag', @tag)[1])]"> |
265 |
<xslo:template mode="index_heading"> |
302 |
<xslo:template mode="index_heading"> |
266 |
- |
|
|