Merge pull request #4598 from mwichmann/AddOption-shortopts
[scons.git] / doc / design / html.xsl
blob0cd9f9bf3b942da9340f1b91596c2844fb1e704e
1 <?xml version='1.0'?>
2 <!--
4 __COPYRIGHT__
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
14 The above copyright notice and this permission notice shall be included
15 in all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
18 KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
19 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 -->
26 <xsl:stylesheet
27 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 version="1.0">
30 <xsl:import href="../../SCons/Tool/docbook/docbook-xsl-1.76.1/html/docbook.xsl"/>
32 <xsl:output method="html"
33 encoding="UTF-8"
34 indent="no"/>
36 <xsl:param name="l10n.gentext.default.language" select="'en'"/>
37 <xsl:param name="section.autolabel" select="1"/>
38 <xsl:param name="section.label.includes.component.label" select="1"/>
39 <xsl:param name="html.stylesheet" select="'scons.css'"/>
40 <xsl:param name="generate.toc">
41 /appendix toc,title
42 article/appendix nop
43 /article toc,title
44 book toc,title,figure,table,example,equation
45 /chapter toc,title
46 part toc,title
47 /preface toc,title
48 reference toc,title
49 /sect1 toc
50 /sect2 toc
51 /sect3 toc
52 /sect4 toc
53 /sect5 toc
54 /section toc
55 set toc,title
56 </xsl:param>
58 <xsl:template match="function">
59 <xsl:call-template name="inline.boldmonoseq"/>
60 </xsl:template>
61 <xsl:template match="methodname">
62 <xsl:call-template name="inline.boldmonoseq"/>
63 </xsl:template>
64 <!-- Prevent our EPUB cover image from getting included -->
65 <xsl:template match="mediaobject[@role = 'cover']">
66 </xsl:template>
70 <xsl:template name="head.content">
71 <xsl:param name="node" select="."/>
72 <xsl:param name="title">
73 <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
74 </xsl:param>
76 <title>
77 <xsl:copy-of select="$title"/>
78 </title>
80 <xsl:if test="$html.base != ''">
81 <base href="{$html.base}"/>
82 </xsl:if>
84 <!-- Insert links to CSS files or insert literal style elements -->
85 <xsl:call-template name="generate.css"/>
87 <xsl:if test="$html.stylesheet != ''">
88 <xsl:call-template name="output.html.stylesheets">
89 <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
90 </xsl:call-template>
91 </xsl:if>
93 <xsl:if test="$link.mailto.url != ''">
94 <link rev="made"
95 href="{$link.mailto.url}"/>
96 </xsl:if>
98 <meta name="generator" content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
100 <xsl:if test="$generate.meta.abstract != 0">
101 <xsl:variable name="info" select="(articleinfo
102 |bookinfo
103 |prefaceinfo
104 |chapterinfo
105 |appendixinfo
106 |sectioninfo
107 |sect1info
108 |sect2info
109 |sect3info
110 |sect4info
111 |sect5info
112 |referenceinfo
113 |refentryinfo
114 |partinfo
115 |info
116 |docinfo)[1]"/>
117 <xsl:if test="$info and $info/abstract">
118 <meta name="description">
119 <xsl:attribute name="content">
120 <xsl:for-each select="$info/abstract[1]/*">
121 <xsl:value-of select="normalize-space(.)"/>
122 <xsl:if test="position() &lt; last()">
123 <xsl:text> </xsl:text>
124 </xsl:if>
125 </xsl:for-each>
126 </xsl:attribute>
127 </meta>
128 </xsl:if>
129 </xsl:if>
131 <xsl:if test="($draft.mode = 'yes' or
132 ($draft.mode = 'maybe' and
133 ancestor-or-self::*[@status][1]/@status = 'draft'))
134 and $draft.watermark.image != ''">
135 <style type="text/css"><xsl:text>
136 body { background-image: url('</xsl:text>
137 <xsl:value-of select="$draft.watermark.image"/><xsl:text>');
138 background-repeat: no-repeat;
139 background-position: top left;
140 /* The following properties make the watermark "fixed" on the page. */
141 /* I think that's just a bit too distracting for the reader... */
142 /* background-attachment: fixed; */
143 /* background-position: center center; */
144 }</xsl:text>
145 </style>
146 </xsl:if>
147 <xsl:apply-templates select="." mode="head.keywords.content"/>
148 </xsl:template>
150 </xsl:stylesheet>