Lines 14-19
Link Here
|
14 |
<!-- Keys on tags referenced in the index definitions --> |
14 |
<!-- Keys on tags referenced in the index definitions --> |
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_group_of_subfields_tag" match="kohaidx:index_group_of_subfields" use="@tag"/> |
17 |
<xsl:key name="index_heading_tag" match="kohaidx:index_heading" use="@tag"/> |
18 |
<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"/> |
19 |
<xsl:key name="index_data_field_tag" match="kohaidx:index_data_field" use="@tag"/> |
19 |
<xsl:key name="index_heading_conditional_tag" match="kohaidx:index_heading_conditional" use="@tag"/> |
20 |
<xsl:key name="index_heading_conditional_tag" match="kohaidx:index_heading_conditional" use="@tag"/> |
Lines 67-72
definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
Link Here
|
67 |
|
68 |
|
68 |
<xsl:call-template name="handle-index-leader"/> |
69 |
<xsl:call-template name="handle-index-leader"/> |
69 |
<xsl:call-template name="handle-index-control-field"/> |
70 |
<xsl:call-template name="handle-index-control-field"/> |
|
|
71 |
<xsl:call-template name="handle-index-group-of-subfields"/> |
70 |
<xsl:call-template name="handle-index-subfields"/> |
72 |
<xsl:call-template name="handle-index-subfields"/> |
71 |
<xsl:call-template name="handle-index-data-field"/> |
73 |
<xsl:call-template name="handle-index-data-field"/> |
72 |
<xsl:call-template name="handle-index-heading"/> |
74 |
<xsl:call-template name="handle-index-heading"/> |
Lines 237-242
definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
Link Here
|
237 |
</z:index> |
239 |
</z:index> |
238 |
</xsl:template> |
240 |
</xsl:template> |
239 |
|
241 |
|
|
|
242 |
<xsl:template name="handle-index-group-of-subfields"> |
243 |
<xsl:for-each select="//kohaidx:index_group_of_subfields[generate-id() = generate-id(key('index_group_of_subfields_tag', @tag)[1])]"> |
244 |
<xslo:template mode="index_subfields"> |
245 |
<xsl:attribute name="match"> |
246 |
<xsl:text>marc:datafield[@tag='</xsl:text> |
247 |
<xsl:value-of select="@tag"/> |
248 |
<xsl:text>']</xsl:text> |
249 |
</xsl:attribute> |
250 |
<xsl:for-each select="key('index_group_of_subfields_tag', @tag)"> |
251 |
<xsl:call-template name="handle-one-group-of-subfields"/> |
252 |
</xsl:for-each> |
253 |
</xslo:template> |
254 |
</xsl:for-each> |
255 |
</xsl:template> |
256 |
|
257 |
<xsl:template name="handle-one-group-of-subfields"> |
258 |
<xsl:variable name="indexes"> |
259 |
<xsl:call-template name="get-target-indexes"/> |
260 |
</xsl:variable> |
261 |
<z:index> |
262 |
<xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute> |
263 |
<xslo:variable name="group_of_subfields"> |
264 |
<xslo:for-each select="marc:subfield"> |
265 |
<xslo:if> |
266 |
<xsl:attribute name="test"> |
267 |
<xsl:text>contains('</xsl:text> |
268 |
<xsl:value-of select="@subfields"/> |
269 |
<xsl:text>', @code)</xsl:text> |
270 |
</xsl:attribute> |
271 |
<xslo:value-of select="."/> |
272 |
<xslo:if test="position() != last()"> |
273 |
<xslo:value-of select="substring(' ', 1, 1)"/> <!-- FIXME surely there's a better way to specify a space --> |
274 |
</xslo:if> |
275 |
</xslo:if> |
276 |
</xslo:for-each> |
277 |
</xslo:variable> |
278 |
<xslo:value-of select="normalize-space($group_of_subfields)"/> |
279 |
</z:index> |
280 |
</xsl:template> |
281 |
|
240 |
<xsl:template name="handle-index-subfields"> |
282 |
<xsl:template name="handle-index-subfields"> |
241 |
<xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]"> |
283 |
<xsl:for-each select="//kohaidx:index_subfields[generate-id() = generate-id(key('index_subfields_tag', @tag)[1])]"> |
242 |
<xslo:template mode="index_subfields"> |
284 |
<xslo:template mode="index_subfields"> |
243 |
- |
|
|