1 |
<?xml version='1.0'?> |
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3 |
xmlns:fo="http://www.w3.org/1999/XSL/Format" |
4 |
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" |
5 |
exclude-result-prefixes="doc" |
6 |
version='1.0'> |
7 |
|
8 |
<!-- It is important to use indent="no" here, otherwise verbatim --> |
9 |
<!-- environments get broken by indented tags...at least when the --> |
10 |
<!-- callout extension is used...at least with some processors --> |
11 |
<xsl:output method="xml" indent="no"/> |
12 |
|
13 |
<!-- ******************************************************************** |
14 |
$Id: docbook.xsl,v 1.8 2001/07/04 09:52:00 uid48421 Exp $ |
15 |
******************************************************************** |
16 |
|
17 |
This file is part of the XSL DocBook Stylesheet distribution. |
18 |
See ../README or http://nwalsh.com/docbook/xsl/ for copyright |
19 |
and other information. |
20 |
|
21 |
******************************************************************** --> |
22 |
|
23 |
<!-- ==================================================================== --> |
24 |
|
25 |
<xsl:include href="../VERSION"/> |
26 |
<xsl:include href="param.xsl"/> |
27 |
<xsl:include href="../lib/lib.xsl"/> |
28 |
<xsl:include href="../common/l10n.xsl"/> |
29 |
<xsl:include href="../common/common.xsl"/> |
30 |
<xsl:include href="../common/labels.xsl"/> |
31 |
<xsl:include href="../common/titles.xsl"/> |
32 |
<xsl:include href="../common/subtitles.xsl"/> |
33 |
<xsl:include href="../common/gentext.xsl"/> |
34 |
<xsl:include href="autotoc.xsl"/> |
35 |
<xsl:include href="lists.xsl"/> |
36 |
<xsl:include href="callout.xsl"/> |
37 |
<xsl:include href="verbatim.xsl"/> |
38 |
<xsl:include href="graphics.xsl"/> |
39 |
<xsl:include href="xref.xsl"/> |
40 |
<xsl:include href="formal.xsl"/> |
41 |
<xsl:include href="table.xsl"/> |
42 |
<xsl:include href="sections.xsl"/> |
43 |
<xsl:include href="inline.xsl"/> |
44 |
<xsl:include href="footnote.xsl"/> |
45 |
<xsl:include href="fo.xsl"/> |
46 |
<xsl:include href="info.xsl"/> |
47 |
<xsl:include href="keywords.xsl"/> |
48 |
<xsl:include href="division.xsl"/> |
49 |
<xsl:include href="index.xsl"/> |
50 |
<xsl:include href="toc.xsl"/> |
51 |
<xsl:include href="refentry.xsl"/> |
52 |
<xsl:include href="math.xsl"/> |
53 |
<xsl:include href="admon.xsl"/> |
54 |
<xsl:include href="component.xsl"/> |
55 |
<xsl:include href="biblio.xsl"/> |
56 |
<xsl:include href="glossary.xsl"/> |
57 |
<xsl:include href="block.xsl"/> |
58 |
<xsl:include href="qandaset.xsl"/> |
59 |
<xsl:include href="synop.xsl"/> |
60 |
<xsl:include href="titlepage.xsl"/> |
61 |
<xsl:include href="titlepage.templates.xsl"/> |
62 |
<xsl:include href="pagesetup.xsl"/> |
63 |
<xsl:include href="pi.xsl"/> |
64 |
<xsl:include href="ebnf.xsl"/> |
65 |
|
66 |
<xsl:include href="fop.xsl"/> |
67 |
<xsl:include href="xep.xsl"/> |
68 |
|
69 |
<!-- ==================================================================== --> |
70 |
|
71 |
<xsl:template match="*"> |
72 |
<xsl:message> |
73 |
<xsl:value-of select="name(.)"/> |
74 |
<xsl:text> encountered, but no template matches.</xsl:text> |
75 |
</xsl:message> |
76 |
<fo:block color="red"> |
77 |
<xsl:text><</xsl:text> |
78 |
<xsl:value-of select="name(.)"/> |
79 |
<xsl:text>></xsl:text> |
80 |
<xsl:apply-templates/> |
81 |
<xsl:text></</xsl:text> |
82 |
<xsl:value-of select="name(.)"/> |
83 |
<xsl:text>></xsl:text> |
84 |
</fo:block> |
85 |
</xsl:template> |
86 |
|
87 |
<xsl:template match="text()"> |
88 |
<xsl:value-of select="."/> |
89 |
</xsl:template> |
90 |
|
91 |
<xsl:template match="/"> |
92 |
<xsl:message> |
93 |
<xsl:text>Making </xsl:text> |
94 |
<xsl:value-of select="$page.orientation"/> |
95 |
<xsl:text> pages on </xsl:text> |
96 |
<xsl:value-of select="$paper.type"/> |
97 |
<xsl:text> paper (</xsl:text> |
98 |
<xsl:value-of select="$page.width"/> |
99 |
<xsl:text>x</xsl:text> |
100 |
<xsl:value-of select="$page.height"/> |
101 |
<xsl:text>)</xsl:text> |
102 |
</xsl:message> |
103 |
|
104 |
<xsl:variable name="document.element" select="*[1]"/> |
105 |
<xsl:variable name="title"> |
106 |
<xsl:choose> |
107 |
<xsl:when test="$document.element/title[1]"> |
108 |
<xsl:value-of select="$document.element/title[1]"/> |
109 |
</xsl:when> |
110 |
<xsl:otherwise>[could not find document title]</xsl:otherwise> |
111 |
</xsl:choose> |
112 |
</xsl:variable> |
113 |
|
114 |
<fo:root font-family="{$body.font.family}" |
115 |
font-size="{$body.font.size}" |
116 |
text-align="{$alignment}"> |
117 |
<xsl:if test="$xep.extensions != 0"> |
118 |
<xsl:call-template name="xep-document-information"/> |
119 |
</xsl:if> |
120 |
<xsl:call-template name="setup.pagemasters"/> |
121 |
<xsl:choose> |
122 |
<xsl:when test="$rootid != ''"> |
123 |
<xsl:choose> |
124 |
<xsl:when test="count(id($rootid)) = 0"> |
125 |
<xsl:message terminate="yes"> |
126 |
<xsl:text>ID '</xsl:text> |
127 |
<xsl:value-of select="$rootid"/> |
128 |
<xsl:text>' not found in document.</xsl:text> |
129 |
</xsl:message> |
130 |
</xsl:when> |
131 |
<xsl:otherwise> |
132 |
<xsl:if test="$fop.extensions != 0"> |
133 |
<xsl:apply-templates select="id($rootid)" mode="outline"/> |
134 |
</xsl:if> |
135 |
<xsl:if test="$xep.extensions != 0"> |
136 |
<rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> |
137 |
<xsl:apply-templates select="id($rootid)" mode="xep.outline"/> |
138 |
</rx:outline> |
139 |
</xsl:if> |
140 |
<xsl:apply-templates select="id($rootid)"/> |
141 |
</xsl:otherwise> |
142 |
</xsl:choose> |
143 |
</xsl:when> |
144 |
<xsl:otherwise> |
145 |
<xsl:if test="$fop.extensions != 0"> |
146 |
<xsl:apply-templates mode="outline"/> |
147 |
</xsl:if> |
148 |
<xsl:if test="$xep.extensions != 0"> |
149 |
<rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> |
150 |
<xsl:apply-templates mode="xep.outline"/> |
151 |
</rx:outline> |
152 |
</xsl:if> |
153 |
<xsl:apply-templates/> |
154 |
</xsl:otherwise> |
155 |
</xsl:choose> |
156 |
|
157 |
</fo:root> |
158 |
</xsl:template> |
159 |
|
160 |
<!-- ==================================================================== --> |
161 |
|
162 |
</xsl:stylesheet> |