Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6e019a662639ac6470f50dea3a4d8157 > files > 524

docbook-style-xsl-doc-1.79.2-4.mga7.noarch.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>custom.css.source</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.2"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference&nbsp;Documentation"><link rel="up" href="html.html" title="HTML"><link rel="prev" href="docbook.css.link.html" title="docbook.css.link"><link rel="next" href="generate.css.header.html" title="generate.css.header"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">custom.css.source</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="docbook.css.link.html">Prev</a>&nbsp;</td><th width="60%" align="center">HTML</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="generate.css.header.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="custom.css.source"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">custom.css.source</span></h2><p>custom.css.source &#8212; Name of a custom CSS input file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="custom.css.source.frag"></a><pre class="programlisting">&lt;xsl:param name="custom.css.source"&gt;&lt;/xsl:param&gt;</pre></div><div class="refsection"><a name="d0e3327"></a><h2>Description</h2><p>The <em class="parameter"><code>custom.css.source</code></em>
parameter enables you to add CSS styles to DocBook's
HTML output.</p><p>The parameter
specifies the name of a file containing custom
CSS styles.  The file must be a well-formed XML file that
consists of a single <code class="sgmltag-element">style</code> root
element that contains CSS styles as its text content.
For example:</p><pre class="programlisting">&lt;?xml version="1.0"?&gt;
&lt;style&gt;
h2 {
  font-weight: bold;
  color: blue;
}
...
&lt;/style&gt;
</pre><p>The filename specified by the parameter
should have a <code class="literal">.xml</code>
filename suffix, although that is not required.
The default value of this parameter is blank.</p><p>If <em class="parameter"><code>custom.css.source</code></em> is not blank, then
the stylesheet takes the following actions.
These actions take place regardless of the value of
the <em class="parameter"><code>make.clean.html</code></em> parameter.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The stylesheet uses the XSLT <code class="literal">document()</code>
    function to open the file specified by the parameter and
    load it into a variable.</p></li><li class="listitem"><p>The stylesheet forms an output pathname consisting of the
    value of the <em class="parameter"><code>base.dir</code></em> parameter (if it is set)
    and the value of <em class="parameter"><code>custom.css.source</code></em>,
    with the <code class="literal">.xml</code> suffix stripped off.
    </p></li><li class="listitem"><p>The stylesheet removes the <code class="sgmltag-element">style</code>
    wrapper element and writes just the CSS text content to the output file.</p></li><li class="listitem"><p>The stylesheet adds a <code class="sgmltag-element">link</code> element to the
    HTML <code class="sgmltag-element">HEAD</code> element to reference this external CSS stylesheet.
    For example:
    </p><pre class="programlisting">&lt;link rel="stylesheet" href="custom.css" type="text/css"&gt;
    </pre><p>
    </p></li></ol></div><p>If the <em class="parameter"><code>make.clean.html</code></em> parameter is nonzero
(the default is zero),
and if the <em class="parameter"><code>docbook.css.source</code></em> parameter
is not blank (the default is not blank),
then the stylesheet will also generate a default CSS file
and add a <code class="sgmltag-element">link</code> tag to reference it.
The <code class="sgmltag-element">link</code> to the custom CSS comes after the 
<code class="sgmltag-element">link</code> to the default, so it should cascade properly
in most browsers.
If you do not want two <code class="sgmltag-element">link</code> tags, and
instead want your custom CSS to import the default generated
CSS file, then do the following:
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Add a line like the following to your custom CSS source file:</p><pre class="programlisting">@import url("docbook.css")
    </pre></li><li class="listitem"><p>Set the <em class="parameter"><code>docbook.css.link</code></em> parameter 
    to zero. This will omit the <code class="sgmltag-element">link</code> tag
    that references the default CSS file.</p></li></ol></div><p>If you set <em class="parameter"><code>make.clean.html</code></em> to nonzero but
you do not want the default CSS generated, then also set
the <em class="parameter"><code>docbook.css.source</code></em> parameter to blank.
Then no default CSS will be generated, and so
all CSS styles must come from your custom CSS file.</p><p>You can use the <em class="parameter"><code>generate.css.header</code></em>
parameter to instead write the CSS to each HTML <code class="sgmltag-element">HEAD</code>
element in a <code class="sgmltag-element">style</code> tag instead of an external CSS file.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="docbook.css.link.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="html.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="generate.css.header.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">docbook.css.link&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;generate.css.header</td></tr></table></div></body></html>