-
Notifications
You must be signed in to change notification settings - Fork 3
/
db2man.xsl
29 lines (27 loc) · 1.13 KB
/
db2man.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl"/>
<!-- Use .TP list for the variablelist describing the strtime() directives. -->
<!-- This hack aligns the indented paragraphs horizontally with their -->
<!-- labels. -->
<xsl:template match="variablelist[attribute::id='strftime']/varlistentry">
<xsl:text>.TP </xsl:text>
<xsl:for-each select="term">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:choose>
<xsl:when test="position() = last()"/> <!-- do nothing -->
<xsl:otherwise>
<!-- * if we have multiple terms in the same varlistentry, generate -->
<!-- * a separator (", " by default) -->
<xsl:value-of select="$variablelist.term.separator"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>