[ci skip] update generated files
[scons.git] / doc / user / html.xsl
blob6def44b5935ef01187a62ff87ecbf5fc2f0e52a8
1 <?xml version='1.0'?>
3 <!--
4 SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
5 SPDX-License-Identifier: MIT
6 -->
8 <xsl:stylesheet
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 version="1.0">
12 <xsl:import href="../../SCons/Tool/docbook/docbook-xsl-1.76.1/html/docbook.xsl"/>
14 <xsl:output method="html"
15 encoding="UTF-8"
16 indent="no"/>
18 <xsl:param name="l10n.gentext.default.language" select="'en'"/>
19 <xsl:param name="section.autolabel" select="1"/>
20 <xsl:param name="section.label.includes.component.label" select="1"/>
21 <xsl:param name="variablelist.term.break.after" select="1"/>
22 <xsl:param name="variablelist.term.separator"/>
23 <xsl:param name="html.stylesheet" select="'scons.css'"/>
24 <xsl:param name="generate.toc">
25 /appendix toc,title
26 article/appendix nop
27 /article toc,title
28 book toc,title,figure,table,example,equation
29 /chapter toc,title
30 part toc,title
31 /preface toc,title
32 reference toc,title
33 /sect1 toc
34 /sect2 toc
35 /sect3 toc
36 /sect4 toc
37 /sect5 toc
38 /section toc
39 set toc,title
40 </xsl:param>
42 <xsl:template match="function">
43 <xsl:call-template name="inline.boldmonoseq"/>
44 </xsl:template>
45 <xsl:template match="methodname">
46 <xsl:call-template name="inline.boldmonoseq"/>
47 </xsl:template>
48 <!-- Prevent our EPUB cover image from getting included -->
49 <xsl:template match="mediaobject[@role = 'cover']">
50 </xsl:template>
54 <xsl:template name="head.content">
55 <xsl:param name="node" select="."/>
56 <xsl:param name="title">
57 <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
58 </xsl:param>
60 <title>
61 <xsl:copy-of select="$title"/>
62 </title>
64 <xsl:if test="$html.base != ''">
65 <base href="{$html.base}"/>
66 </xsl:if>
68 <!-- Insert links to CSS files or insert literal style elements -->
69 <xsl:call-template name="generate.css"/>
71 <xsl:if test="$html.stylesheet != ''">
72 <xsl:call-template name="output.html.stylesheets">
73 <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
74 </xsl:call-template>
75 </xsl:if>
77 <xsl:if test="$link.mailto.url != ''">
78 <link rev="made"
79 href="{$link.mailto.url}"/>
80 </xsl:if>
82 <meta name="generator" content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
84 <xsl:if test="$generate.meta.abstract != 0">
85 <xsl:variable name="info" select="(articleinfo
86 |bookinfo
87 |prefaceinfo
88 |chapterinfo
89 |appendixinfo
90 |sectioninfo
91 |sect1info
92 |sect2info
93 |sect3info
94 |sect4info
95 |sect5info
96 |referenceinfo
97 |refentryinfo
98 |partinfo
99 |info
100 |docinfo)[1]"/>
101 <xsl:if test="$info and $info/abstract">
102 <meta name="description">
103 <xsl:attribute name="content">
104 <xsl:for-each select="$info/abstract[1]/*">
105 <xsl:value-of select="normalize-space(.)"/>
106 <xsl:if test="position() &lt; last()">
107 <xsl:text> </xsl:text>
108 </xsl:if>
109 </xsl:for-each>
110 </xsl:attribute>
111 </meta>
112 </xsl:if>
113 </xsl:if>
115 <xsl:if test="($draft.mode = 'yes' or
116 ($draft.mode = 'maybe' and
117 ancestor-or-self::*[@status][1]/@status = 'draft'))
118 and $draft.watermark.image != ''">
119 <style type="text/css"><xsl:text>
120 body { background-image: url('</xsl:text>
121 <xsl:value-of select="$draft.watermark.image"/><xsl:text>');
122 background-repeat: no-repeat;
123 background-position: top left;
124 /* The following properties make the watermark "fixed" on the page. */
125 /* I think that's just a bit too distracting for the reader... */
126 /* background-attachment: fixed; */
127 /* background-position: center center; */
128 }</xsl:text>
129 </style>
130 </xsl:if>
131 <xsl:apply-templates select="." mode="head.keywords.content"/>
132 </xsl:template>
134 </xsl:stylesheet>