11.2. Reference
Prev | 11. The "Customize Document Conversion Stylesheets" dialog box | Next

### 11.2. Reference

Figure 9.5. The "Customize Document Conversion Stylesheets" dialog box showing the stylesheets used when a DITA map is converted to single-page XHTML

"XSLT stylesheet" frame:

The combobox

  This combobox allows to select:

  - the default stock XSLT stylesheet,

  - an alternate stock XSLT stylesheet (if any),

  - a custom XSLT stylesheet added using the Add button,

  - a custom XSLT stylesheet created using the Customize button.

Add

  Add an existing custom XSLT stylesheet. This button displays a dialog box allowing to specify the filename of a custom XSLT stylesheet and also to give it a short title (a title is required).

Customize

  Create a custom XSLT stylesheet based on the currently selected stock XSLT stylesheet.

  It's not possible to create a customization of a custom XSLT stylesheet.

  A custom XSLT stylesheet created this way merely imports the stock XSLT stylesheet. Example:

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                      version="1.0">
        <xsl:import href="xxe-config:docbook/xsl/fo/docbook.xsl"/>
        <!-- REDEFINE PARAMETERS AND ATTRIBUTE-SETS HERE -->
      </xsl:stylesheet>

  After such custom XSLT stylesheet has been created, the user is expected to click Edit to populate it with parameters and attribute-sets.

Edit

  If the custom XSLT stylesheet has been created using the Customize button, this button starts the "XMLmind XSL Customizer" application in order to edit it. Otherwise, this button starts a helper application allowing to edit XSLT files.

  It's not possible to edit a stock XSLT stylesheet.

  ### Tip

  Clicking Edit while keep the Shift key pressed allows to start a helper application rather than the "XMLmind XSL Customizer" application.

Remove

  Remove the currently selected custom XSLT stylesheet from the combobox. Of course, clicking Remove does not delete the XSLT file.

  It's not possible to remove a stock XSLT stylesheet.

"CSS stylesheet" frame (this frame is absent when the output format is based on XSL-FO):

The combobox

  This combobox allows to select:

  - the default stock CSS stylesheet,

  - an alternate stock CSS stylesheet (if any),

  - a custom CSS stylesheet added using the Add button,

  - a custom CSS stylesheet created using the Customize button.

Add

  Add an existing custom CSS stylesheet. This button displays a dialog box allowing to specify the filename of a custom CSS stylesheet and also to give it a short title (a title is required).

Customize

  Create a custom CSS stylesheet based on the currently selected stock CSS stylesheet.

  It's not possible to create a customization of a custom CSS stylesheet.

  A custom CSS stylesheet created this way merely imports the stock CSS stylesheet. Example:

      @charset "UTF-8";
      @import url(__stock_html.css);
      /* ADD YOUR STYLES HERE */

  After such custom CSS stylesheet has been created, the user is expected to click Edit to populate it with styles.

Edit

  Starts a helper application allowing to edit CSS files.

  It's not possible to edit a stock CSS stylesheet.

Remove

  Remove the currently selected custom CSS stylesheet from the combobox. Of course, clicking Remove does not delete the CSS file.

  It's not possible to remove a stock CSS stylesheet.

Example 9.1. When converting a DITA map to PDF, use a 12pt base font size and give a light gray background to all the topic titles

1. Open a DITA map in XMLmind XML Editor.

2. Select menu item Options → Customize Configuration → Customize Document Conversion Stylesheets. This displays the "Customize Document Conversion Stylesheets" dialog box.

3. Select "Convert to PDF, PostScript" in the top combobox.

4. In the "XSLT stylesheet" frame, click Customize. This displays the following dialog box:

   1. Specify the filename of the XSLT stylesheet which is to contain your customization of the stock `xxe-config:dita/xsl/fo/fo.xsl` XSLT stylesheet.

   2. Also required: give a short title to your customization in the Description field.

5. In the "XSLT stylesheet" frame, click Edit. This displays the main window of the "XMLmind XSL Customizer" application.

   1. Select the Attribute Sets tab and click Add to add attribute `background-color=#CCCCCC` to the attribute-set called `topic-title`. How to do this is detailed in the example below.

   2. Select the Parameters tab and click Add to specify the following parameter: `base-font-size=12pt`. How to do this is detailed in the example below.

   3. Click toolbar button Save to save your changes.

   4. Click toolbar button Quit to close "XMLmind XSL Customizer" window.

6. Click OK to close the the "Customize Document Conversion Stylesheets" dialog box.

Example 9.2. When converting a DITA map to single-page XHTML, use a 12pt base font size and give a light gray background to all the topic titles

1. Open a DITA map in XMLmind XML Editor.

2. Select menu item Options → Customize Configuration → Customize Document Conversion Stylesheets. This displays the "Customize Document Conversion Stylesheets" dialog box.

3. Select "Convert to single-page XHTML" in the top combobox.

4. In the "CSS stylesheet" frame, click Customize. This displays the following dialog box:

   1. Specify the filename of the CSS stylesheet which is to contain your customization of the stock `xxe-config:dita/xsl/xhtml/resources/basic.css` XSLT stylesheet.

   2. Also required: give a short title to your customization in the Description field.

5. In the "CSS stylesheet" frame, click Edit. This displays the "Helper Application Not Found" dialog box[36]. This dialog box allows to specify which editor is to be used to edit a CSS file. By default, the "Helper Application Not Found" dialog box suggests to use a text editor.

   1. Replace the line:

          /* ADD YOUR STYLES HERE */

      by:

          body {
              font-size: 12pt;
          }

          .part-title,
          .chapter-title,
          .appendices-title,
          .appendix-title,
          .section1-title,
          .section2-title,
          .section3-title,
          .section4-title,
          .section5-title,
          .section6-title,
          .section7-title,
          .section8-title,
          .section9-title,
          .topic-title {
              background-color: #CCCCCC;
          }

      Make sure not to modify the `@import` line.

   2. Save your changes.

      Make sure to use an UTF-8 encoding for the save file.

   3. Quit the text editor.

6. Click OK to close the the "Customize Document Conversion Stylesheets" dialog box.

[36] Unless the user has already specified which is the helper application she/he prefers to edit a CSS stylesheet. This kind of preference is specified by using Options → Preferences, Tools|Helper Applications section. More information in Section 5.8.4, “Helper applications options”.

Prev | Up | Next
11.1. Introduction | Home | 11.3. The "XMLmind XSL Customizer" application