@matheusbsbs / matheus-bagliano / commits / c30e948523
Fork 0

Documentation: move callouts.xsl to manpage-{base,normal}.xsl

Each of manpage-base.xsl and manpage-normal.xsl gets a copy of the contents of callouts.xsl and the original is removed. The Makefile is adjusted to refer to manpage-normal.xsl instead of callouts.xsl. manpage-base.xsl will be later made into a common base for -normal and -1.72. Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Chris Johnsen committed Mar 27, 2009 at 01:43 UTC c30e9485238bb8e9daa4cbba5deb1f79c8da7dde
3 files changed +31 -1
Documentation/Makefile
+1 -1
@@ -41,7 +41,7 @@ man7dir=$(mandir)/man7
41
42 ASCIIDOC=asciidoc
43 ASCIIDOC_EXTRA =
44 -MANPAGE_XSL = callouts.xsl
44 +MANPAGE_XSL = manpage-normal.xsl
45 INSTALL?=install
46 RM ?= rm -f
47 DOC_REF = origin/man
Documentation/manpage-base.xsl renamed
Documentation/manpage-normal.xsl new
+30
@@ -0,0 +1,30 @@
1 +<!-- callout.xsl: converts asciidoc callouts to man page format -->
2 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 +<xsl:template match="co">
4 + <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
5 +</xsl:template>
6 +<xsl:template match="calloutlist">
7 + <xsl:text>.sp&#10;</xsl:text>
8 + <xsl:apply-templates/>
9 + <xsl:text>&#10;</xsl:text>
10 +</xsl:template>
11 +<xsl:template match="callout">
12 + <xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
13 + <xsl:apply-templates/>
14 + <xsl:text>.br&#10;</xsl:text>
15 +</xsl:template>
16 +
17 +<!-- sorry, this is not about callouts, but attempts to work around
18 + spurious .sp at the tail of the line docbook stylesheets seem to add -->
19 +<xsl:template match="simpara">
20 + <xsl:variable name="content">
21 + <xsl:apply-templates/>
22 + </xsl:variable>
23 + <xsl:value-of select="normalize-space($content)"/>
24 + <xsl:if test="not(ancestor::authorblurb) and
25 + not(ancestor::personblurb)">
26 + <xsl:text>&#10;&#10;</xsl:text>
27 + </xsl:if>
28 +</xsl:template>
29 +
30 +</xsl:stylesheet>