dita2odt-concept.xsl 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
  5. xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
  6. xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
  7. xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
  8. xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
  9. xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
  10. xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"
  11. xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
  12. xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
  13. xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
  14. xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
  15. xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
  16. xmlns:math="http://www.w3.org/1998/Math/MathML"
  17. xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
  18. xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
  19. xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms"
  20. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  21. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
  23. xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
  24. xmlns:prodtools="http://www.ibm.com/xmlns/prodtools"
  25. version="2.0"
  26. xmlns:related-links="http://dita-ot.sourceforge.net/ns/200709/related-links"
  27. exclude-result-prefixes="related-links">
  28. <xsl:output method="xml"/>
  29. <xsl:output indent="yes"/>
  30. <xsl:strip-space elements="*"/>
  31. <!-- Concepts have their own group. -->
  32. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:get-group" name="related-links:group.concept">
  33. <xsl:text>concept</xsl:text>
  34. </xsl:template>
  35. <!-- Priority of concept group. -->
  36. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:get-group-priority" name="related-links:group-priority.concept">
  37. <xsl:value-of select="3"/>
  38. </xsl:template>
  39. <!--Get Related Information -->
  40. <xsl:template match="*[contains(@class, ' topic/link ')][@type='concept']" mode="related-links:result-group" name="related-links:result.concept">
  41. <xsl:param name="links"/>
  42. <xsl:variable name="samefile">
  43. <xsl:call-template name="check_file_location"/>
  44. </xsl:variable>
  45. <xsl:variable name="href-value">
  46. <xsl:call-template name="format_href_value"/>
  47. </xsl:variable>
  48. <text:p>
  49. <text:span text:style-name="bold">
  50. <xsl:call-template name="getVariable">
  51. <xsl:with-param name="id" select="'Related concepts'"/>
  52. </xsl:call-template>
  53. </text:span>
  54. </text:p>
  55. <text:p>
  56. <xsl:call-template name="create_related_links">
  57. <xsl:with-param name="samefile" select="$samefile"/>
  58. <xsl:with-param name="href-value" select="$href-value"/>
  59. </xsl:call-template>
  60. </text:p>
  61. </xsl:template>
  62. </xsl:stylesheet>