glossdisplay.xsl 1.5 KB

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