VirtualBox

source: vbox/trunk/doc/manual/common-html-formatcfg.xsl@ 78169

Last change on this file since 78169 was 69479, checked in by vboxsync, 7 years ago

manual: scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 5.6 KB
Line 
1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4<!-- Must strip spaces in 'arg' elements too, we'll get extra spaces when
5 using 'replaceable'. Adding option too, just in case. -->
6<xsl:strip-space elements="arg option"/>
7
8<!-- Our hand written css styling. -->
9<xsl:template name="user.head.content">
10 <style type="text/css">
11 <xsl:comment>
12 body
13 {
14 font-family: Verdana, Sans-serif, Arial, 'Trebuchet MS', 'Times New Roman';
15 font-size: small;
16 }
17 h2.title
18 {
19 font-family: Verdana, Sans-serif, Arial, 'Trebuchet MS', 'Times New Roman';
20 margin: 5px 0 0;
21 padding: 1px 5px 1px;
22 border: 1px solid #6b89d4;
23 -moz-border-radius: 0.3em;
24 background: #e6edff;
25 }
26 .titlepage
27 {
28 text-align: center;
29 }
30 .refsynopsisdiv, .refsect1, .refsect2, .refsect3
31 {
32 text-align: left;
33 }
34 .warning
35 {
36 padding: 5px;
37 border: 1px solid #ff0011;
38 -moz-border-radius: 0.3em;
39 background: #ffbbbb;
40 }
41 .warning .title { margin: 0px 0px 5px 0px; }
42 .warning p { margin: 1px; }
43 .note
44 {
45 padding: 1px 5px 1px;
46 border: 1px solid #84c43b;
47 -moz-border-radius: 0.3em;
48 background: #d7e9a7;
49 }
50 .note .title { margin: 0px 0px 5px 0px; }
51 .note p { margin: 1px; }
52 .cmdsynopsis
53 {
54 font-family: monospace;
55 }
56 .refsynopsisdiv > .cmdsynopsis p, .refsect1 > .cmdsynopsis p,
57 .refsynopsisdiv .sect2 > .cmdsynopsis p, .refsect1 .sect2 > .cmdsynopsis p
58 {
59 margin-top: 0px;
60 margin-bottom: 0px;
61 }
62 .cmdsynopsis p
63 {
64 padding-left: 3.4em;
65 text-indent: -2.2em;
66 }
67 p.nextcommand
68 {
69 margin-top: 0px;
70 margin-bottom: 0px;
71 }
72 p.lastcommand
73 {
74 margin-top: 0px;
75 }
76 .refentry * h3
77 {
78 font-size: large;
79 }
80 .refentry * h4
81 {
82 font-size: larger;
83 }
84 .refentry * h5
85 {
86 font-size: larger;
87 }
88
89 </xsl:comment>
90 </style>
91</xsl:template>
92
93
94<!-- Ignore/skip the remark that the command overview inclusion file
95 uses as the root element. -->
96<xsl:template match="remark[@role='VBoxManage-overview']">
97 <xsl:apply-templates select="node()"/>
98</xsl:template>
99
100
101<!-- This is for allow special CSS rules to apply to the refsect stuff. -->
102<xsl:template match="sect2[ @role = 'not-in-toc']/title
103 | sect3[ @role = 'not-in-toc']/title
104 | sect4[ @role = 'not-in-toc']/title
105 | sect5[ @role = 'not-in-toc']/title
106 | section[ @role = 'not-in-toc']/title
107 | simplesect[@role = 'not-in-toc']/title
108 | sect1[ @condition = 'refentry']/title
109 | sect2[ @condition = 'refentry']/title
110 | sect1[ starts-with(@condition, 'refsect')]/title
111 | sect2[ starts-with(@condition, 'refsect')]/title
112 | sect3[ starts-with(@condition, 'refsect')]/title
113 | sect4[ starts-with(@condition, 'refsect')]/title
114 | sect5[ starts-with(@condition, 'refsect')]/title
115 | section[ starts-with(@condition, 'refsect')]/title
116 | simplesect[starts-with(@condition, 'refsect')]/title
117" mode="titlepage.mode">
118 <xsl:element name="div">
119 <xsl:attribute name="class">
120 <xsl:value-of select="../@role"/>
121 <xsl:if test="../@role and ../@condition">
122 <xsl:text> </xsl:text>
123 </xsl:if>
124 <xsl:value-of select="../@condition"/>
125 </xsl:attribute>
126 <xsl:apply-imports/>
127 </xsl:element>
128</xsl:template>
129
130<xsl:template match="sect2[ @role = 'not-in-toc']
131 | sect3[ @role = 'not-in-toc']
132 | sect4[ @role = 'not-in-toc']
133 | sect5[ @role = 'not-in-toc']
134 | section[ @role = 'not-in-toc']
135 | simplesect[@role = 'not-in-toc']
136 | sect1[ @condition = 'refentry']
137 | sect2[ @condition = 'refentry']
138 | sect1[ starts-with(@condition, 'refsect')]
139 | sect2[ starts-with(@condition, 'refsect')]
140 | sect3[ starts-with(@condition, 'refsect')]
141 | sect4[ starts-with(@condition, 'refsect')]
142 | sect5[ starts-with(@condition, 'refsect')]
143 | section[ starts-with(@condition, 'refsect')]
144 | simplesect[starts-with(@condition, 'refsect')]" >
145 <xsl:element name="div">
146 <xsl:attribute name="class">
147 <xsl:value-of select="@role"/>
148 <xsl:if test="@role and @condition">
149 <xsl:text> </xsl:text>
150 </xsl:if>
151 <xsl:value-of select="@condition"/>
152 </xsl:attribute>
153 <xsl:apply-imports/>
154 </xsl:element>
155</xsl:template>
156
157<!-- To use CSS to correctly insert hanging indent when soft wrapping and
158 <sbr>'ing a synopsis, we must place each command in its own <p>. The default
159 is to must issue a <br /> before each <command>, except the first one.
160 Note! This is a bit ugly as we're going contrary to the grain of XSLT here
161 starting with an closing . -->
162<xsl:template match="cmdsynopsis/command">
163 <xsl:text disable-output-escaping="yes"><![CDATA[</p><p class="nextcommand">]]></xsl:text>
164 <xsl:call-template name="inline.monoseq"/>
165 <xsl:text> </xsl:text>
166</xsl:template>
167<xsl:template match="cmdsynopsis/command[last()]">
168 <xsl:text disable-output-escaping="yes"><![CDATA[</p><p class="lastcommand">]]></xsl:text>
169 <xsl:call-template name="inline.monoseq"/>
170 <xsl:text> </xsl:text>
171</xsl:template>
172
173</xsl:stylesheet>
174
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette