summaryrefslogtreecommitdiff
path: root/manpage-base.xsl
diff options
context:
space:
mode:
authorLibravatar Avery Pennarun <apenwarr@gmail.com>2009-05-30 14:05:33 -0400
committerLibravatar Avery Pennarun <apenwarr@gmail.com>2009-05-30 14:06:58 -0400
commite75d1da38a7091c15ebd3c80539e4aab20faf5b7 (patch)
tree17e7110445a8d6710c69d8f20738b5fc69d4ae65 /manpage-base.xsl
parentMake --squash work with the 'add' command too. (diff)
downloadtgif-e75d1da38a7091c15ebd3c80539e4aab20faf5b7.tar.xz
Add basic git-subtree manpage in asciidoc format.
Diffstat (limited to 'manpage-base.xsl')
-rw-r--r--manpage-base.xsl35
1 files changed, 35 insertions, 0 deletions
diff --git a/manpage-base.xsl b/manpage-base.xsl
new file mode 100644
index 0000000000..a264fa6160
--- /dev/null
+++ b/manpage-base.xsl
@@ -0,0 +1,35 @@
+<!-- manpage-base.xsl:
+ special formatting for manpages rendered from asciidoc+docbook -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- these params silence some output from xmlto -->
+<xsl:param name="man.output.quietly" select="1"/>
+<xsl:param name="refentry.meta.get.quietly" select="1"/>
+
+<!-- convert asciidoc callouts to man page format;
+ git.docbook.backslash and git.docbook.dot params
+ must be supplied by another XSL file or other means -->
+<xsl:template match="co">
+ <xsl:value-of select="concat(
+ $git.docbook.backslash,'fB(',
+ substring-after(@id,'-'),')',
+ $git.docbook.backslash,'fR')"/>
+</xsl:template>
+<xsl:template match="calloutlist">
+ <xsl:value-of select="$git.docbook.dot"/>
+ <xsl:text>sp&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
+</xsl:template>
+<xsl:template match="callout">
+ <xsl:value-of select="concat(
+ $git.docbook.backslash,'fB',
+ substring-after(@arearefs,'-'),
+ '. ',$git.docbook.backslash,'fR')"/>
+ <xsl:apply-templates/>
+ <xsl:value-of select="$git.docbook.dot"/>
+ <xsl:text>br&#10;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>