[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Alphabetical index: unstreamable?


Subject: [xsl] Alphabetical index: unstreamable?
From: "Michael Müller-Hillebrand mmh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 May 2014 12:35:08 -0000

Dear all,

In documents the content of what will end up in an alphabetical index is
usually authored in the section to which the index term belongs. That is,
index terms are usually all over the place.

When it is time to create an alphabetical index, I see that the XSLT handling
this uses something like

<xsl:call-template name="index">
  <xsl:with-param name="terms"  select="//indexterm" />
</xsl:call-template>

and inside the called template all the sorting and grouping is handled.

This is not streamable because there is more than a single downward select
(and it is easy to see that you need everything in memory to create the
sequence of all <indexterm>).

How would you tackle this (in XSLT) if the source data does not fit in
memory?

Thanks a lot for hints,

- Michael M|ller-Hillebrand


Current Thread
Keywords