1 <refentry xmlns="http://docbook.org/ns/docbook"
2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:xi="http://www.w3.org/2001/XInclude"
4 xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="5.0" xml:id="docbook.css.source">
8 <refentrytitle>docbook.css.source</refentrytitle>
9 <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
12 <refname>docbook.css.source</refname>
13 <refpurpose>Name of the default CSS input file</refpurpose>
17 <src:fragment xml:id="docbook.css.source.frag"><xsl:param name="docbook.css.source">docbook.css.xml</xsl:param></src:fragment>
20 <refsection><info><title>Description</title></info>
22 <para>The <parameter>docbook.css.source</parameter> parameter
23 specifies the name of the file containing the default DocBook
24 CSS styles. Those styles are necessary when the
25 <parameter>make.clean.html</parameter> parameter is nonzero.</para>
27 <para>The file is a well-formed XML file that
28 must consist of a single <tag>style</tag> root
29 element that contains CSS styles as its text content.
30 The default value of the parameter (and filename)
31 is <literal>docbook.css.xml</literal>.
32 The stylesheets ship with the default file. You can substitute
33 your own and specify its path in this parameter.</para>
35 <para>If <parameter>docbook.css.source</parameter> is not blank,
36 and <parameter>make.clean.html</parameter> is nonzero, then
37 the stylesheet takes the following actions:</para>
41 <para>The stylesheet uses the XSLT <literal>document()</literal>
42 function to open the file specified by the parameter and
43 load it into a variable.</para>
46 <para>The stylesheet forms an output pathname consisting of the
47 value of the <parameter>base.dir</parameter> parameter (if it is set)
48 and the value of <parameter>docbook.css.source</parameter>,
49 with the <literal>.xml</literal> suffix stripped off.
53 <para>The stylesheet removes the <tag>style</tag>
54 wrapper element and writes just the CSS text content to the output file.</para>
57 <para>The stylesheet adds a <tag>link</tag> element to the
58 HTML <tag>HEAD</tag> element to reference the external CSS stylesheet.
60 <programlisting><link rel="stylesheet" href="docbook.css" type="text/css">
62 <para>However, if the <parameter>docbook.css.link</parameter>
63 parameter is set to zero, then no <tag>link</tag> is written
64 for the default CSS file. That is useful if a custom
65 CSS file will import the default CSS stylesheet to ensure
66 proper cascading of styles.</para>
70 <para>If the <parameter>docbook.css.source</parameter> parameter
71 is changed from its default <literal>docbook.css.xml</literal> to blank,
72 then no default CSS is generated. Likewise if the
73 <parameter>make.clean.html</parameter> parameter is set to zero,
74 then no default CSS is generated. The
75 <parameter>custom.css.source</parameter> parameter can be used
76 instead to generate a complete custom CSS file.</para>
78 <para>You can use the <parameter>generate.css.header</parameter>
79 parameter to instead write the CSS to each HTML <tag>HEAD</tag>
80 element in a <tag>style</tag> tag instead of an external CSS file.</para>