1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>4.
Discovering "Inherited" Formatting Options
</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="
xmlformat Tutorial
"><link rel="up" href="index.html" title="
xmlformat Tutorial
"><link rel="prev" href="using-config-file.html" title="3.
Using a Configuration File
"><link rel="next" href="unconfigured-elements.html" title="5.
Checking for Unconfigured Elements
"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.
Discovering "Inherited" Formatting Options
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using-config-file.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="unconfigured-elements.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="inherited-formatting"></a>4.
Discovering "Inherited" Formatting Options
</h2></div></div></div><p>
In the final formatting of <code class="filename">doc2.xml</code>, 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 <code class="literal">para</code> section,
because if you omit formatting options for an element, it "inherits" the
default properties. In the case of the <code class="literal"><para></code>
element, the relevant unspecified properties are the
<code class="literal">entry-break</code> and <code class="literal">exit-break</code> values.
For block elements, both have a value of <code class="literal">1</code> by default
(that is, one newline), which causes a line break after the opening tag
and before the closing tag.
</p><p>
If you want to see all the formatting options
<span><strong class="command">xmlformat</strong></span> will use, run it with the
<code class="option">--show-config</code> option. For example:
</p><pre class="screen">
% <strong class="userinput"><code>xmlformat --show-config</code></strong>
*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
</pre><p>
No configuration file is specified on the command line, so
<span><strong class="command">xmlformat</strong></span> reads the default configuration file,
<code class="filename">xmlformat.conf</code>. Then it displays the resulting
configuration options. You can see that the <code class="literal">para</code>
section has inherited break values from the <code class="literal">*DEFAULT</code>
section.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using-config-file.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="unconfigured-elements.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.
Using a Configuration File
</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 5.
Checking for Unconfigured Elements
</td></tr></table></div></body></html>
|