docbook.css.source.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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">
  7. <refmeta>
  8. <refentrytitle>docbook.css.source</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>docbook.css.source</refname>
  13. <refpurpose>Name of the default CSS input file</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="docbook.css.source.frag"><xsl:param name="docbook.css.source">docbook.css.xml</xsl:param></src:fragment>
  17. </refsynopsisdiv>
  18. <refsection><info><title>Description</title></info>
  19. <para>The <parameter>docbook.css.source</parameter> parameter
  20. specifies the name of the file containing the default DocBook
  21. CSS styles. Those styles are necessary when the
  22. <parameter>make.clean.html</parameter> parameter is nonzero.</para>
  23. <para>The file is a well-formed XML file that
  24. must consist of a single <tag>style</tag> root
  25. element that contains CSS styles as its text content.
  26. The default value of the parameter (and filename)
  27. is <literal>docbook.css.xml</literal>.
  28. The stylesheets ship with the default file. You can substitute
  29. your own and specify its path in this parameter.</para>
  30. <para>If <parameter>docbook.css.source</parameter> is not blank,
  31. and <parameter>make.clean.html</parameter> is nonzero, then
  32. the stylesheet takes the following actions:</para>
  33. <orderedlist>
  34. <listitem>
  35. <para>The stylesheet uses the XSLT <literal>document()</literal>
  36. function to open the file specified by the parameter and
  37. load it into a variable.</para>
  38. </listitem>
  39. <listitem>
  40. <para>The stylesheet forms an output pathname consisting of the
  41. value of the <parameter>base.dir</parameter> parameter (if it is set)
  42. and the value of <parameter>docbook.css.source</parameter>,
  43. with the <literal>.xml</literal> suffix stripped off.
  44. </para>
  45. </listitem>
  46. <listitem>
  47. <para>The stylesheet removes the <tag>style</tag>
  48. wrapper element and writes just the CSS text content to the output file.</para>
  49. </listitem>
  50. <listitem>
  51. <para>The stylesheet adds a <tag>link</tag> element to the
  52. HTML <tag>HEAD</tag> element to reference the external CSS stylesheet.
  53. For example:</para>
  54. <programlisting>&lt;link rel="stylesheet" href="docbook.css" type="text/css"&gt;
  55. </programlisting>
  56. <para>However, if the <parameter>docbook.css.link</parameter>
  57. parameter is set to zero, then no <tag>link</tag> is written
  58. for the default CSS file. That is useful if a custom
  59. CSS file will import the default CSS stylesheet to ensure
  60. proper cascading of styles.</para>
  61. </listitem>
  62. </orderedlist>
  63. <para>If the <parameter>docbook.css.source</parameter> parameter
  64. is changed from its default <literal>docbook.css.xml</literal> to blank,
  65. then no default CSS is generated. Likewise if the
  66. <parameter>make.clean.html</parameter> parameter is set to zero,
  67. then no default CSS is generated. The
  68. <parameter>custom.css.source</parameter> parameter can be used
  69. instead to generate a complete custom CSS file.</para>
  70. <para>You can use the <parameter>generate.css.header</parameter>
  71. parameter to instead write the CSS to each HTML <tag>HEAD</tag>
  72. element in a <tag>style</tag> tag instead of an external CSS file.</para>
  73. </refsection>
  74. </refentry>