4. Discovering "Inherited" Formatting Options
Prev |  | Next

## 4. Discovering "Inherited" Formatting Options

In the final formatting of `doc2.xml`, note that the paragraph tags appear on separate lines preceding and following the paragraph content. This occurs despite the fact that the configuration file specifies no break values in the `para` section, because if you omit formatting options for an element, it "inherits" the default properties. In the case of the `<para>` element, the relevant unspecified properties are the `entry-break` and `exit-break` values. For block elements, both have a value of `1` by default (that is, one newline), which causes a line break after the opening tag and before the closing tag.

If you want to see all the formatting options xmlformat will use, run it with the `--show-config` option. For example:

    % xmlformat --show-config
    *DEFAULT
      format = block
      entry-break = 1
      element-break = 1
      exit-break = 1
      subindent = 1
      normalize = no
      wrap-length = 0

    *DOCUMENT
      format = block
      entry-break = 0
      element-break = 1
      exit-break = 1
      subindent = 0
      normalize = no
      wrap-length = 0

    example
      format = block
      entry-break = 2
      element-break = 2
      exit-break = 2
      subindent = 0
      normalize = no
      wrap-length = 0

    para
      format = block
      entry-break = 1
      element-break = 1
      exit-break = 1
      subindent = 1
      normalize = yes
      wrap-length = 60

    replaceable
      format = inline

    screen
      format = verbatim

No configuration file is specified on the command line, so xmlformat reads the default configuration file, `xmlformat.conf`. Then it displays the resulting configuration options. You can see that the `para` section has inherited break values from the `*DEFAULT` section.

Prev |  | Next
3. Using a Configuration File | Home | 5. Checking for Unconfigured Elements