source: rtems-tools/doc/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt @ f91e023

4.104.115
Last change on this file since f91e023 was f91e023, checked in by Chris Johns <chrisj@…>, on 02/17/14 at 07:04:46

Add the documentation.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1AsciiDoc DocBook XSL Stylesheets Notes
2======================================
3
4Output file customisation is achieved by tweaking the DocBook XSL
5stylesheets.  I've tried to keep customization to a minimum and
6confine it to the separate XSL driver files in the distribution
7`./docbook-xsl/` directory (see the User Guide for details).
8
9To polish some rough edges I've written some patches for the DocBook
10XSL stylesheets -- you don't need them but they're documented below
11and included in the distribution `./docbook-xsl/` directory.
12
13
14Manually upgrading Debian to the latest DocBook XSL stylesheets
15---------------------------------------------------------------
16The DocBook XSL Stylesheets distribution is just a directory full of
17text files and you can switch between releases by changing the
18directory name in the system XML catalog.
19
20To upgrade to the latest docbook-xsl stylesheets without having to
21wait for the Debian `docbook-xsl` package:
22
23- Download the latest docbook-xsl tarball from
24  http://sourceforge.net/projects/docbook/. Bleeding edge snapshots
25  can be found at http://docbook.sourceforge.net/snapshots/
26
27- Unzip the tarball to `/usr/share/xml/docbook/stylesheet/`:
28
29  $ cd /usr/share/xml/docbook/stylesheet
30  $ sudo tar -xzf /tmp/docbook-xsl-1.72.0.tar.gz
31
32- Edit `/etc/xml/docbook-xsl.xml` catalog and replace occurences of
33  the current stylesheets directory with the new one (in our example
34  it would be `/usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0`.
35
36  $ cd /etc/xml/
37  $ sudo cp -p docbook-xsl.xml docbook-xsl.xml.ORIG
38  $ sudo vi docbook-xsl.xml
39
40
41Customizing Generated Text
42--------------------------
43An example
44http://www.sagehill.net/docbookxsl/CustomGentext.html#CustomGenText[DocBook
45XSL Stylesheets customization file] for formatting chapter titles
46without chapter numbering.
47
48.custom-chapter.xml
49---------------------------------------------------------------------
50<!-- Customize chapter title -->
51<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
52  <l:l10n language="en">
53    <l:context name="title">
54      <l:template name="chapter" text="%t"/>
55    </l:context>
56  </l:l10n>
57</l:i18n>
58---------------------------------------------------------------------
59
60Executed with this 'xsltproc' parameter:
61
62  --param local.l10n.xml document\(\'custom-chapter.xml\'\)
63
64NOTE: This example is hypothetical -- use the 'xsltproc'
65`--stringparam chapter.autolabel 0` option to do the same job.
Note: See TracBrowser for help on using the repository browser.