From: Bob Stayton Date: Sun, 14 May 2006 04:33:40 +0000 (+0000) Subject: Integrate support for three indexing methods: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58c1a054276e1177f34eeab8a03294ccf26cda9b;p=docbook-dsssl Integrate support for three indexing methods: - the original English-only method. - Jirka Kosek's method using EXSLT extensions. - Eliot Kimber's method using Saxon extensions. Use the 'index.method' parameter to select. --- diff --git a/xsl/fo/autoidx.xsl b/xsl/fo/autoidx.xsl index 1d549ba02..0c99fe16f 100644 --- a/xsl/fo/autoidx.xsl +++ b/xsl/fo/autoidx.xsl @@ -4,11 +4,15 @@ - - - + + + + + + + @@ -17,6 +21,13 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" + xmlns:i="urn:cz-kosek:functions:index" + xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" + xmlns:func="http://exslt.org/functions" + xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService" + xmlns:exslt="http://exslt.org/common" + extension-element-prefixes="func exslt" + exclude-result-prefixes="func exslt i l k" version="1.0"> - + + + + @@ -54,15 +68,53 @@ + use="concat(&primary;, &sep;, + &secondary;, &sep;, + &tertiary;, &sep;, seealso)"/> + use="concat(&primary;, &sep;, + &secondary;, &sep;, + &tertiary;, &sep;, see)"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -76,19 +128,22 @@ + select="//indexterm + [count(.|key('letter', + translate(substring(&primary;, 1, 1), + &lowercase;, + &uppercase;)) + [&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> - + @@ -106,15 +161,17 @@ - + + &lowercase;,&uppercase;)) + [&scope;][1]) = 1]" + mode="index-div-english"> @@ -123,13 +180,166 @@ - + + + + + + + ERROR: the 'kosek' index method does not + work with the xsltproc XSLT processor. + + + + + + + ERROR: the 'kosek' index method requires the + exslt:node-set() function. Use a processor that + has it, or use a different index method. + + + + + + ERROR: the 'kosek' index method requires the + index extension functions be imported: + xsl:import href="common/autoidx-ng.xsl" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ERROR: the 'kimber' index method requires the + Saxon version 6 XSLT processor. + + + + + + ERROR: the 'kimber' index method requires the + Innodata Isogen Java extensions for + internationalized indexes. Install those + extensions, or use a different index method. + For more information, see: + http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport + + + + + + ERROR: the 'kimber' index method requires the + index extension functions be imported: + xsl:import href="common/autoidx-ng.xsl" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select="translate(substring(&primary;, 1, 1), + &lowercase;,&uppercase;)"/> @@ -143,7 +353,8 @@ @@ -174,6 +385,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +