glossdisplay.xsl 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2010 IBM Corporation
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
  8. xmlns:related-links="http://dita-ot.sourceforge.net/ns/200709/related-links"
  9. exclude-result-prefixes="related-links">
  10. <!-- Glossary entries belong in the group with concepts. -->
  11. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:get-group" name="related-links:group.glossentry">
  12. <xsl:call-template name="related-links:group.concept"/>
  13. </xsl:template>
  14. <!-- Priority of glossary group is same as concept group. -->
  15. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:get-group-priority" name="related-links:group-priority.glossentry">
  16. <xsl:call-template name="related-links:group-priority.concept"/>
  17. </xsl:template>
  18. <!-- Wrapper for glossentry (concept) group: "Related concepts" in a <div>. -->
  19. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:result-group" name="related-links:result.glossentry">
  20. <xsl:param name="links"/>
  21. <xsl:call-template name="related-links:result.concept">
  22. <xsl:with-param name="links" select="$links"/>
  23. </xsl:call-template>
  24. </xsl:template>
  25. </xsl:stylesheet>