dita2odt-gloss.xsl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <!-- Glossary entries belong in the group with concepts. -->
  32. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:get-group" name="related-links:group.glossentry">
  33. <xsl:call-template name="related-links:group.concept"/>
  34. </xsl:template>
  35. <!-- Priority of glossary group is same as concept group. -->
  36. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:get-group-priority" name="related-links:group-priority.glossentry">
  37. <xsl:call-template name="related-links:group-priority.concept"/>
  38. </xsl:template>
  39. <!-- Wrapper for glossentry (concept) group: "Related concepts" in a <div>. -->
  40. <xsl:template match="*[contains(@class, ' topic/link ')][@type='glossentry']" mode="related-links:result-group" name="related-links:result.glossentry">
  41. <xsl:param name="links"/>
  42. <xsl:call-template name="related-links:result.concept">
  43. <xsl:with-param name="links" select="$links"/>
  44. </xsl:call-template>
  45. </xsl:template>
  46. </xsl:stylesheet>