glossdisplay.xsl 1.3 KB

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