manpage-base.xsl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!-- manpage-base.xsl:
  2. special formatting for manpages rendered from asciidoc+docbook -->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. version="1.0">
  5. <!-- these params silence some output from xmlto -->
  6. <xsl:param name="man.output.quietly" select="1"/>
  7. <xsl:param name="refentry.meta.get.quietly" select="1"/>
  8. <!-- convert asciidoc callouts to man page format;
  9. git.docbook.backslash and git.docbook.dot params
  10. must be supplied by another XSL file or other means -->
  11. <xsl:template match="co">
  12. <xsl:value-of select="concat(
  13. $git.docbook.backslash,'fB(',
  14. substring-after(@id,'-'),')',
  15. $git.docbook.backslash,'fR')"/>
  16. </xsl:template>
  17. <xsl:template match="calloutlist">
  18. <xsl:value-of select="$git.docbook.dot"/>
  19. <xsl:text>sp&#10;</xsl:text>
  20. <xsl:apply-templates/>
  21. <xsl:text>&#10;</xsl:text>
  22. </xsl:template>
  23. <xsl:template match="callout">
  24. <xsl:value-of select="concat(
  25. $git.docbook.backslash,'fB',
  26. substring-after(@arearefs,'-'),
  27. '. ',$git.docbook.backslash,'fR')"/>
  28. <xsl:apply-templates/>
  29. <xsl:value-of select="$git.docbook.dot"/>
  30. <xsl:text>br&#10;</xsl:text>
  31. </xsl:template>
  32. </xsl:stylesheet>