autoidx-kimber.xsl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0"?>
  2. <!DOCTYPE xsl:stylesheet [
  3. <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
  4. <!-- Documents using the kimber index method must have a lang attribute -->
  5. <!-- Only one of these should be present in the entity -->
  6. <!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'>
  7. ]>
  8. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. version="1.0"
  10. xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService"
  11. exclude-result-prefixes="k">
  12. <!-- ********************************************************************
  13. $Id$
  14. ********************************************************************
  15. This file is part of the DocBook XSL Stylesheet distribution.
  16. See ../README or http://docbook.sf.net/ for copyright
  17. and other information.
  18. ******************************************************************** -->
  19. <xsl:param name="kimber.imported">
  20. <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
  21. <xsl:choose>
  22. <xsl:when test="not(contains($vendor, 'SAXON '))">
  23. <xsl:message terminate="yes">
  24. <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
  25. <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
  26. </xsl:message>
  27. </xsl:when>
  28. <xsl:otherwise>1</xsl:otherwise>
  29. </xsl:choose>
  30. </xsl:param>
  31. <!-- The following key used in the kimber indexing method. -->
  32. <xsl:key name="k-group"
  33. match="indexterm"
  34. use="k:getIndexGroupKey(&lang;, &primary;)"/>
  35. </xsl:stylesheet>