Chapter 5. Customizing an existing configuration

Table of Contents

1. Adding a custom document template
2. Replacing an existing document template
3. Removing an existing document template
4. Adding a custom CSS style sheet
5. Replacing an existing CSS style sheet
6. Removing an existing CSS style sheet
7. Adding buttons to the tool bar
8. Adding items to the menu
9. Parametrizing the XSLT style sheets used in the Convert Document submenu
10. Customizing the XSLT style sheets used in the Convert Document submenu
11. Using a custom CSS style sheet to style the HTML files generated by the Convert Document submenu

This chapter is not a tutorial. It will merely give you some recipes. If you want to understand what you are doing, please refer to Writing a configuration file for XXE.

Let's suppose you want to customize one of the DITA[3], DocBook 5, DocBook 4 or XHTML configurations, here's what to do.

  1. Create in XXE_user_preferences_dir/addon/[4] a subdirectory which will contain all the files comprising your customization.

    The name of this directory is not important. Let's suppose you have created XXE_user_preferences_dir/addon/custom/.

  2. Copy one of the following template files depending on which configuration you want to customize:

    Configuration NameProcedure

    DITA

    Copy 0topic.xxe to custom/.

    DITA Map

    Copy 0map.xxe to custom/.

    DITA BookMap

    Copy 0bookmap.xxe to custom/.

    DocBook Assembly v5.1+

    Copy 0assembly.xxe to custom/.

    DocBook v5.1+

    Copy 0docbook51.xxe to custom/.

    DocBook v5+

    Copy 0docbook5.xxe to custom/.

    DocBook

    Copy 0docbook.xxe to custom/.

    XHTML Strict

    Copy 0xhtml_strict.xxe to custom/.

    XHTML Transitional

    Copy 0xhtml_loose.xxe to custom/.

    XHTML 1.1

    Copy 0xhtml11.xxe to custom/.

    XHTML 5

    Copy 0xhtml5.xxe to custom/.

    For example, 0docbook5.xxe[5] looks like this:

    <configuration name="DocBook v5+"
      xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
      xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration"
      xmlns:db="http://docbook.org/ns/docbook"
      xmlns:svg="http://www.w3.org/2000/svg"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:html="http://www.w3.org/1999/xhtml">
    
      <include location="docbook5-config:docbook5.xxe" />
    
    </configuration>
  3. This step involves adding one or more configuration elements after the include element. This is done using any XML or text editor. Each of the following sections describes a common customization step.

  4. Restart XXE.



[3] The configuration associated to DITA topics is called DITA. The configuration associated to DITA maps is called DITA Map. The configuration associated to DITA bookmaps is called DITA BookMap.

[4] XXE_user_preferences_dir is documented in Where is XXE user preferences directory?.

[5] The ``funny'' name, starting with a "0", has its utility if you happen to create your customization in XXE_install_dir/addon/ rather than in XXE_user_preferences_dir/addon/.