conceptdisplay.xsl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:related-links="http://dita-ot.sourceforge.net/ns/200709/related-links"
  4. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  5. version="2.0"
  6. exclude-result-prefixes="related-links xs">
  7. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:get-group"
  8. name="related-links:group.concept"
  9. as="xs:string">
  10. <xsl:text>concept</xsl:text>
  11. </xsl:template>
  12. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:get-group-priority"
  13. name="related-links:group-priority.concept"
  14. as="xs:integer">
  15. <xsl:sequence select="3"/>
  16. </xsl:template>
  17. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:result-group"
  18. name="related-links:result.concept"
  19. as="element(linklist)">
  20. <xsl:param name="links" as="node()*"/>
  21. <xsl:if test="normalize-space(string-join($links, ''))">
  22. <linklist class="- topic/linklist " outputclass="relinfo relconcepts">
  23. <title class="- topic/title ">
  24. <xsl:call-template name="getVariable">
  25. <xsl:with-param name="id" select="'Related concepts'"/>
  26. </xsl:call-template>
  27. </title>
  28. <xsl:copy-of select="$links"/>
  29. </linklist>
  30. </xsl:if>
  31. </xsl:template>
  32. </xsl:stylesheet>