1 | <?xml version='1.0'?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | version='1.0'>
|
---|
4 |
|
---|
5 | <!-- ********************************************************************
|
---|
6 | $Id: block.xsl,v 1.7 2005/08/09 09:11:02 xmldoc Exp $
|
---|
7 | ********************************************************************
|
---|
8 |
|
---|
9 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
10 | See ../README or http://docbook.sf.net/release/xsl/current/ for
|
---|
11 | copyright and other information.
|
---|
12 |
|
---|
13 | ******************************************************************** -->
|
---|
14 |
|
---|
15 | <!-- ==================================================================== -->
|
---|
16 |
|
---|
17 | <xsl:template match="caution|important|note|tip|warning">
|
---|
18 | <xsl:call-template name="nested-section-title"/>
|
---|
19 | <xsl:apply-templates/>
|
---|
20 | </xsl:template>
|
---|
21 |
|
---|
22 | <xsl:template match="formalpara">
|
---|
23 | <xsl:call-template name="nested-section-title"/>
|
---|
24 | <xsl:text>.RS 3 </xsl:text>
|
---|
25 | <xsl:apply-templates/>
|
---|
26 | <xsl:text>.RE </xsl:text>
|
---|
27 | </xsl:template>
|
---|
28 |
|
---|
29 | <xsl:template match="para">
|
---|
30 | <xsl:text>.PP </xsl:text>
|
---|
31 | <xsl:call-template name="mixed-block"/>
|
---|
32 | <xsl:text> </xsl:text>
|
---|
33 | </xsl:template>
|
---|
34 |
|
---|
35 | <xsl:template match="simpara">
|
---|
36 | <xsl:variable name="content">
|
---|
37 | <xsl:apply-templates/>
|
---|
38 | </xsl:variable>
|
---|
39 | <xsl:value-of select="normalize-space($content)"/>
|
---|
40 | <xsl:text>.sp </xsl:text>
|
---|
41 | </xsl:template>
|
---|
42 |
|
---|
43 | <xsl:template match="address|literallayout|programlisting|screen|synopsis">
|
---|
44 | <!-- * Yes, address and synopsis are verbatim environments. -->
|
---|
45 |
|
---|
46 | <xsl:choose>
|
---|
47 | <!-- * Check to see if this verbatim item is within a parent element that -->
|
---|
48 | <!-- * allows mixed content. -->
|
---|
49 | <!-- * -->
|
---|
50 | <!-- * If it is within a mixed-content parent, then a line space is -->
|
---|
51 | <!-- * already added before it by the mixed-block template, so we don't -->
|
---|
52 | <!-- * need to add one here. -->
|
---|
53 | <!-- * -->
|
---|
54 | <!-- * If it is not within a mixed-content parent, then we need to add a -->
|
---|
55 | <!-- * line space before it. -->
|
---|
56 | <xsl:when test="parent::caption|parent::entry|parent::para|
|
---|
57 | parent::td|parent::th" /> <!-- do nothing -->
|
---|
58 | <xsl:otherwise>
|
---|
59 | <xsl:text>.sp </xsl:text>
|
---|
60 | </xsl:otherwise>
|
---|
61 | </xsl:choose>
|
---|
62 | <xsl:text>.nf </xsl:text>
|
---|
63 | <xsl:apply-templates/>
|
---|
64 | <xsl:text> </xsl:text>
|
---|
65 | <xsl:text>.fi </xsl:text>
|
---|
66 | <!-- * if first following sibling node of this verbatim -->
|
---|
67 | <!-- * environment is a text node, output a line of space before it -->
|
---|
68 | <xsl:if test="following-sibling::node()[1][name(.) = '']">
|
---|
69 | <xsl:text>.sp </xsl:text>
|
---|
70 | </xsl:if>
|
---|
71 | </xsl:template>
|
---|
72 |
|
---|
73 | <xsl:template match="informalexample">
|
---|
74 | <xsl:text>.IP </xsl:text>
|
---|
75 | <xsl:apply-templates/>
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 | <!-- * suppress abstract -->
|
---|
79 | <xsl:template match="abstract"/>
|
---|
80 |
|
---|
81 | </xsl:stylesheet>
|
---|