<xsl:keyname="pactols-by-type"match="index-term[@vocab='pactols' and not(ancestor::fn)]"use="@index-type"/>
<xsl:keyname="index-by-type"match="index-term[@index-type and not(@vocab) and not(child::index-term[@vocab]) and not(ancestor::fn)]"use="@index-type"/>
<xsl:keyname="index-by-term-and-level"match="term[not(@xml:lang or descendant::term[@xml:lang]) and not(ancestor::fn)]"use="concat(text(), '|' , count(ancestor::index-term))"/>