1 | <?xml version="1.0"?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
5 |
|
---|
6 | This file is part of VirtualBox base platform packages, as
|
---|
7 | available from https://www.virtualbox.org.
|
---|
8 |
|
---|
9 | This program is free software; you can redistribute it and/or
|
---|
10 | modify it under the terms of the GNU General Public License
|
---|
11 | as published by the Free Software Foundation, in version 3 of the
|
---|
12 | License.
|
---|
13 |
|
---|
14 | This program is distributed in the hope that it will be useful, but
|
---|
15 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
17 | General Public License for more details.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU General Public License
|
---|
20 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
21 |
|
---|
22 | SPDX-License-Identifier: GPL-3.0-only
|
---|
23 | -->
|
---|
24 |
|
---|
25 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
---|
26 |
|
---|
27 | <!-- Must strip spaces in 'arg' elements too, we'll get extra spaces when
|
---|
28 | using 'replaceable'. Adding option too, just in case. -->
|
---|
29 | <xsl:strip-space elements="arg option"/>
|
---|
30 |
|
---|
31 | <!-- Our hand written css styling. -->
|
---|
32 | <xsl:template name="user.head.content">
|
---|
33 | <style type="text/css">
|
---|
34 | <xsl:comment>
|
---|
35 | body
|
---|
36 | {
|
---|
37 | font-family: Verdana, Sans-serif, Arial, 'Trebuchet MS', 'Times New Roman';
|
---|
38 | font-size: small;
|
---|
39 | }
|
---|
40 | h2.title
|
---|
41 | {
|
---|
42 | font-family: Verdana, Sans-serif, Arial, 'Trebuchet MS', 'Times New Roman';
|
---|
43 | margin: 5px 0 0;
|
---|
44 | padding: 1px 5px 1px;
|
---|
45 | border: 1px solid #6b89d4;
|
---|
46 | -moz-border-radius: 0.3em;
|
---|
47 | background: #e6edff;
|
---|
48 | }
|
---|
49 | .titlepage
|
---|
50 | {
|
---|
51 | text-align: center;
|
---|
52 | }
|
---|
53 | .refsynopsisdiv, .refsect1, .refsect2, .refsect3
|
---|
54 | {
|
---|
55 | text-align: left;
|
---|
56 | }
|
---|
57 | .warning
|
---|
58 | {
|
---|
59 | padding: 5px;
|
---|
60 | border: 1px solid #ff0011;
|
---|
61 | -moz-border-radius: 0.3em;
|
---|
62 | background: #ffbbbb;
|
---|
63 | }
|
---|
64 | .warning .title { margin: 0px 0px 5px 0px; }
|
---|
65 | .warning p { margin: 1px; }
|
---|
66 | .note
|
---|
67 | {
|
---|
68 | padding: 1px 5px 1px;
|
---|
69 | border: 1px solid #84c43b;
|
---|
70 | -moz-border-radius: 0.3em;
|
---|
71 | background: #d7e9a7;
|
---|
72 | }
|
---|
73 | .note .title { margin: 0px 0px 5px 0px; }
|
---|
74 | .note p { margin: 1px; }
|
---|
75 | .cmdsynopsis
|
---|
76 | {
|
---|
77 | font-family: monospace;
|
---|
78 | }
|
---|
79 | .refsynopsisdiv > .cmdsynopsis p, .refsect1 > .cmdsynopsis p,
|
---|
80 | .refsynopsisdiv .sect2 > .cmdsynopsis p, .refsect1 .sect2 > .cmdsynopsis p
|
---|
81 | {
|
---|
82 | margin-top: 0px;
|
---|
83 | margin-bottom: 0px;
|
---|
84 | }
|
---|
85 | .cmdsynopsis p
|
---|
86 | {
|
---|
87 | padding-left: 3.4em;
|
---|
88 | text-indent: -2.2em;
|
---|
89 | }
|
---|
90 | p.nextcommand
|
---|
91 | {
|
---|
92 | margin-top: 0px;
|
---|
93 | margin-bottom: 0px;
|
---|
94 | }
|
---|
95 | p.lastcommand
|
---|
96 | {
|
---|
97 | margin-top: 0px;
|
---|
98 | }
|
---|
99 | .refentry * h3
|
---|
100 | {
|
---|
101 | font-size: large;
|
---|
102 | }
|
---|
103 | .refentry * h4
|
---|
104 | {
|
---|
105 | font-size: larger;
|
---|
106 | }
|
---|
107 | .refentry * h5
|
---|
108 | {
|
---|
109 | font-size: larger;
|
---|
110 | }
|
---|
111 |
|
---|
112 | </xsl:comment>
|
---|
113 | </style>
|
---|
114 | </xsl:template>
|
---|
115 |
|
---|
116 |
|
---|
117 | <!-- Ignore/skip the remark that the command overview inclusion file
|
---|
118 | uses as the root element. -->
|
---|
119 | <xsl:template match="remark[@role='VBoxManage-overview']">
|
---|
120 | <xsl:apply-templates select="node()"/>
|
---|
121 | </xsl:template>
|
---|
122 |
|
---|
123 |
|
---|
124 | <!-- This is for allow special CSS rules to apply to the refsect stuff. -->
|
---|
125 | <xsl:template match="sect2[ @role = 'not-in-toc']/title
|
---|
126 | | sect3[ @role = 'not-in-toc']/title
|
---|
127 | | sect4[ @role = 'not-in-toc']/title
|
---|
128 | | sect5[ @role = 'not-in-toc']/title
|
---|
129 | | section[ @role = 'not-in-toc']/title
|
---|
130 | | simplesect[@role = 'not-in-toc']/title
|
---|
131 | | sect1[ @condition = 'refentry']/title
|
---|
132 | | sect2[ @condition = 'refentry']/title
|
---|
133 | | sect1[ starts-with(@condition, 'refsect')]/title
|
---|
134 | | sect2[ starts-with(@condition, 'refsect')]/title
|
---|
135 | | sect3[ starts-with(@condition, 'refsect')]/title
|
---|
136 | | sect4[ starts-with(@condition, 'refsect')]/title
|
---|
137 | | sect5[ starts-with(@condition, 'refsect')]/title
|
---|
138 | | section[ starts-with(@condition, 'refsect')]/title
|
---|
139 | | simplesect[starts-with(@condition, 'refsect')]/title
|
---|
140 | " mode="titlepage.mode">
|
---|
141 | <xsl:element name="div">
|
---|
142 | <xsl:attribute name="class">
|
---|
143 | <xsl:value-of select="../@role"/>
|
---|
144 | <xsl:if test="../@role and ../@condition">
|
---|
145 | <xsl:text> </xsl:text>
|
---|
146 | </xsl:if>
|
---|
147 | <xsl:value-of select="../@condition"/>
|
---|
148 | </xsl:attribute>
|
---|
149 | <xsl:apply-imports/>
|
---|
150 | </xsl:element>
|
---|
151 | </xsl:template>
|
---|
152 |
|
---|
153 | <xsl:template match="sect2[ @role = 'not-in-toc']
|
---|
154 | | sect3[ @role = 'not-in-toc']
|
---|
155 | | sect4[ @role = 'not-in-toc']
|
---|
156 | | sect5[ @role = 'not-in-toc']
|
---|
157 | | section[ @role = 'not-in-toc']
|
---|
158 | | simplesect[@role = 'not-in-toc']
|
---|
159 | | sect1[ @condition = 'refentry']
|
---|
160 | | sect2[ @condition = 'refentry']
|
---|
161 | | sect1[ starts-with(@condition, 'refsect')]
|
---|
162 | | sect2[ starts-with(@condition, 'refsect')]
|
---|
163 | | sect3[ starts-with(@condition, 'refsect')]
|
---|
164 | | sect4[ starts-with(@condition, 'refsect')]
|
---|
165 | | sect5[ starts-with(@condition, 'refsect')]
|
---|
166 | | section[ starts-with(@condition, 'refsect')]
|
---|
167 | | simplesect[starts-with(@condition, 'refsect')]" >
|
---|
168 | <xsl:element name="div">
|
---|
169 | <xsl:attribute name="class">
|
---|
170 | <xsl:value-of select="@role"/>
|
---|
171 | <xsl:if test="@role and @condition">
|
---|
172 | <xsl:text> </xsl:text>
|
---|
173 | </xsl:if>
|
---|
174 | <xsl:value-of select="@condition"/>
|
---|
175 | </xsl:attribute>
|
---|
176 | <xsl:apply-imports/>
|
---|
177 | </xsl:element>
|
---|
178 | </xsl:template>
|
---|
179 |
|
---|
180 | <!-- To use CSS to correctly insert hanging indent when soft wrapping and
|
---|
181 | <sbr>'ing a synopsis, we must place each command in its own <p>. The default
|
---|
182 | is to must issue a <br /> before each <command>, except the first one.
|
---|
183 | Note! This is a bit ugly as we're going contrary to the grain of XSLT here
|
---|
184 | starting with an closing . -->
|
---|
185 | <xsl:template match="cmdsynopsis/command">
|
---|
186 | <xsl:text disable-output-escaping="yes"><![CDATA[</p><p class="nextcommand">]]></xsl:text>
|
---|
187 | <xsl:call-template name="inline.monoseq"/>
|
---|
188 | <xsl:text> </xsl:text>
|
---|
189 | </xsl:template>
|
---|
190 | <xsl:template match="cmdsynopsis/command[last()]">
|
---|
191 | <xsl:text disable-output-escaping="yes"><![CDATA[</p><p class="lastcommand">]]></xsl:text>
|
---|
192 | <xsl:call-template name="inline.monoseq"/>
|
---|
193 | <xsl:text> </xsl:text>
|
---|
194 | </xsl:template>
|
---|
195 |
|
---|
196 | </xsl:stylesheet>
|
---|
197 |
|
---|