]> granicus.if.org Git - docbook-dsssl/commitdiff
For backward compatability autoidx-ng.xsl is invoking "kosek" indexing method again.
authorJirka Kosek <jirka@kosek.cz>
Tue, 10 Oct 2006 14:10:29 +0000 (14:10 +0000)
committerJirka Kosek <jirka@kosek.cz>
Tue, 10 Oct 2006 14:10:29 +0000 (14:10 +0000)
xsl/common/autoidx-ng.xsl [deleted file]
xsl/fo/autoidx-kosek.xsl
xsl/fo/autoidx-ng.xsl
xsl/html/autoidx-kosek.xsl
xsl/html/autoidx-ng.xsl

diff --git a/xsl/common/autoidx-ng.xsl b/xsl/common/autoidx-ng.xsl
deleted file mode 100644 (file)
index 272ab9a..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
-<!-- Documents using the kimber index method must have a lang attribute -->
-<!-- Only one of these should be present in the entity -->
-
-<!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'>
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0"
-                xmlns:func="http://exslt.org/functions"
-                xmlns:exslt="http://exslt.org/common"
-                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-                xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService"
-                extension-element-prefixes="func exslt"
-                exclude-result-prefixes="func exslt i l k"
-                xmlns:i="urn:cz-kosek:functions:index">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     and other information.
-
-     ******************************************************************** -->
-
-<!-- Returns index group code for given term  -->
-<func:function name="i:group-index">
-  <xsl:param name="term"/>
-  
-  <xsl:variable name="letters-rtf">
-    <xsl:variable name="lang">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:variable>
-    
-    <xsl:variable name="local.l10n.letters"
-      select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
-    
-    <xsl:variable name="l10n.letters"
-      select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
-    
-    <xsl:choose>
-      <xsl:when test="count($local.l10n.letters) &gt; 0">
-        <xsl:copy-of select="$local.l10n.letters"/>
-      </xsl:when>
-      <xsl:when test="count($l10n.letters) &gt; 0">
-        <xsl:copy-of select="$l10n.letters"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>No "</xsl:text>
-          <xsl:value-of select="$lang"/>
-          <xsl:text>" localization of index grouping letters exists</xsl:text>
-          <xsl:choose>
-            <xsl:when test="$lang = 'en'">
-              <xsl:text>.</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:text>; using "en".</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:message>
-        
-        <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  
-  <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/>
-  
-  <xsl:variable name="long-letter-index" select="$letters/l:l[. = substring($term,1,2)]/@i"/>
-  <xsl:variable name="short-letter-index" select="$letters/l:l[. = substring($term,1,1)]/@i"/>
-  <xsl:variable name="letter-index">
-    <xsl:choose>
-      <xsl:when test="$long-letter-index">
-        <xsl:value-of select="$long-letter-index"/>
-      </xsl:when>
-      <xsl:when test="$short-letter-index">
-        <xsl:value-of select="$short-letter-index"/>
-      </xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <func:result select="number($letter-index)"/>
-</func:function>
-
-<!-- Return index group letter for given group code -->
-<func:function name="i:group-letter">
-  <xsl:param name="index"/>
-
-  <xsl:variable name="letters-rtf">
-    <xsl:variable name="lang">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:variable>
-    
-    <xsl:variable name="local.l10n.letters"
-      select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
-    
-    <xsl:variable name="l10n.letters"
-      select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
-    
-    <xsl:choose>
-      <xsl:when test="count($local.l10n.letters) &gt; 0">
-        <xsl:copy-of select="$local.l10n.letters"/>
-      </xsl:when>
-      <xsl:when test="count($l10n.letters) &gt; 0">
-        <xsl:copy-of select="$l10n.letters"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>No "</xsl:text>
-          <xsl:value-of select="$lang"/>
-          <xsl:text>" localization of index grouping letters exists</xsl:text>
-          <xsl:choose>
-            <xsl:when test="$lang = 'en'">
-              <xsl:text>.</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:text>; using "en".</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:message>
-        
-        <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  
-  <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/>
-  
-  <func:result select="$letters/l:l[@i=$index][1]"/>
-</func:function>
-
-<!-- The following key used in the kosek indexing method. -->
-<xsl:key name="group-code"
-         match="indexterm"
-         use="i:group-index(&primary;)"/>
-
-<!-- The following key used in the kimber indexing method. -->
-<xsl:key name="k-group"
-         match="indexterm"
-         use="k:getIndexGroupKey(&lang;, &primary;)"/>
-
-</xsl:stylesheet>
index 0f8e65eafa181ae94e09aa67c9bad9f23adbc860..7aa45cd16daabec1d04c2c2ee2045f827b635791 100644 (file)
@@ -72,7 +72,7 @@
     <xsl:message terminate="yes">
       <xsl:text>ERROR: the 'kosek' index method requires the&#xA;</xsl:text>
       <xsl:text>index extension functions be imported:&#xA;</xsl:text>
-      <xsl:text>  xsl:import href="common/autoidx-ng.xsl"</xsl:text>
+      <xsl:text>  xsl:import href="common/autoidx-kosek.xsl"</xsl:text>
     </xsl:message>
   </xsl:if>
 
index 5949b7e05f2627ca3a73144aa78d7bcccb436bb5..a1868472df0cf5331a5fa9150d0af5d02f20df52 100644 (file)
@@ -14,7 +14,7 @@
 
 <!-- You should have this directly in your customization file. -->
 <!-- This file is there only to retain backward compatibility. -->
-<xsl:import href="../common/autoidx-ng.xsl"/>
+<xsl:import href="autoidx-kosek.xsl"/>
 <xsl:param name="index.method">kosek</xsl:param>
 
 </xsl:stylesheet>
index 5291a165cc7ccb67f5274db1c5d58daa6f7ce384..db959fe3c27a77bc526b6d097eb6f9d4d79e367e 100644 (file)
@@ -65,7 +65,7 @@
     <xsl:message terminate="yes">
       <xsl:text>ERROR: the 'kosek' index method requires the&#xA;</xsl:text>
       <xsl:text>index extension functions be imported:&#xA;</xsl:text>
-      <xsl:text>  xsl:import href="common/autoidx-ng.xsl"</xsl:text>
+      <xsl:text>  xsl:import href="common/autoidx-kosek.xsl"</xsl:text>
     </xsl:message>
   </xsl:if>
 
index 5949b7e05f2627ca3a73144aa78d7bcccb436bb5..a1868472df0cf5331a5fa9150d0af5d02f20df52 100644 (file)
@@ -14,7 +14,7 @@
 
 <!-- You should have this directly in your customization file. -->
 <!-- This file is there only to retain backward compatibility. -->
-<xsl:import href="../common/autoidx-ng.xsl"/>
+<xsl:import href="autoidx-kosek.xsl"/>
 <xsl:param name="index.method">kosek</xsl:param>
 
 </xsl:stylesheet>