| 1 |
<refentry id="entry.element"> |
| 2 |
<?dbhtml filename="entry.html"?> |
| 3 |
<refentryinfo> |
| 4 |
<pubdate>$Date$</pubdate> |
| 5 |
<releaseinfo>$Revision$</releaseinfo> |
| 6 |
</refentryinfo> |
| 7 |
|
| 8 |
<refmeta> |
| 9 |
<indexterm><primary>elements</primary> |
| 10 |
<secondary>entry</secondary></indexterm> |
| 11 |
<refentrytitle>entry</refentrytitle> |
| 12 |
<refmiscinfo>Element</refmiscinfo> |
| 13 |
</refmeta> |
| 14 |
<refnamediv> |
| 15 |
<refname>entry</refname> |
| 16 |
<refpurpose>&entry.purpose;</refpurpose> |
| 17 |
</refnamediv> |
| 18 |
|
| 19 |
&entry.synopsis.gen; |
| 20 |
<refsect1 condition='ref.description'><title>Description</title> |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
<?Pub CX set(book(bookinfo()part()part(title()reference(title()refentry(refmeta()refnamediv()refsynopsisdiv()refsect1(title()?> |
| 30 |
<para><sgmltag>Entry</sgmltag> is a cell in a table.</para> |
| 31 |
<para>Each <sgmltag>Entry</sgmltag> may specify its starting column. Entries |
| 32 |
that do not explicitly specify a starting column begin implicitly in the column |
| 33 |
that is immediately adjacent to the preceding cell. Note that |
| 34 |
<sgmltag>Entry</sgmltag>s with the |
| 35 |
<sgmltag class="attribute">MoreRows</sgmltag> attribute |
| 36 |
from preceding rows implicitly occupy cells in the succeeding |
| 37 |
<sgmltag>Row</sgmltag>s.</para> |
| 38 |
<para><sgmltag>Rows</sgmltag> are not required to be full. It is legal for some entries to be |
| 39 |
completely absent (at the beginning, middle, or end of a row).</para> |
| 40 |
<sidebar> |
| 41 |
<title>Pernicious Mixed Content</title> |
| 42 |
<para>The content model of the <sgmltag>Entry</sgmltag> element exhibits a |
| 43 |
nasty peculiarity that we call “pernicious mixed content”.<footnote> |
| 44 |
<para>A term coined by Terry Allen.</para> |
| 45 |
</footnote></para> |
| 46 |
<para>Every other element in DocBook contains either block elements or inline |
| 47 |
elements (including &pcdata;) unambiguously. In these cases, the meaning |
| 48 |
of line breaks and spaces are well understood; they are insignificant between |
| 49 |
block elements and significant (to the &SGML; parser, anyway) where inline |
| 50 |
markup can occur.</para> |
| 51 |
<para>Table entries are different; they can contain either block or inline |
| 52 |
elements, but not both at the same time. In other words, one <sgmltag>Entry |
| 53 |
</sgmltag> in a table might contain a paragraph or a list while another contains |
| 54 |
simply &pcdata; or another inline markup, but no single <sgmltag>Entry</sgmltag> |
| 55 |
can contain both.</para> |
| 56 |
<para>Because the content model of an <sgmltag>Entry</sgmltag> allows both kinds |
| 57 |
of markup, each time the &SGML; parser encounters an <sgmltag>Entry</sgmltag>, |
| 58 |
it has to decide what variety of markup it contains. &SGML; parsers are forbidden |
| 59 |
to use more than a single token of lookahead to reach this decision. In practical |
| 60 |
terms, what this means is that a line feed or space after an <sgmltag>Entry |
| 61 |
</sgmltag> start tag causes the parser to decide that the cell contains inline |
| 62 |
markup. Subsequent discovery of a paragraph or another block element causes |
| 63 |
a parsing error.</para> |
| 64 |
<para>All of these are legal: |
| 65 |
<screen> |
| 66 |
<![CDATA[ |
| 67 |
<entry>3.1415927</entry> |
| 68 |
<entry>General <emphasis>#PCDATA</emphasis></entry> |
| 69 |
<entry><para> |
| 70 |
A paragraph of text |
| 71 |
</para></entry> |
| 72 |
]]> |
| 73 |
</screen> |
| 74 |
</para> |
| 75 |
<para>However, each of these is an error: <screen><entry> <lineannotation> |
| 76 |
Error, cannot have a line break before a block element</lineannotation> |
| 77 |
<![CDATA[<para> |
| 78 |
A paragraph of text. |
| 79 |
</para></entry> |
| 80 |
|
| 81 |
<entry><para> |
| 82 |
A paragraph of text.]]> |
| 83 |
</para> <lineannotation>Error, cannot have a line break between block elements |
| 84 |
</lineannotation> |
| 85 |
<![CDATA[<para> |
| 86 |
A paragraph of text. |
| 87 |
</para></entry> |
| 88 |
|
| 89 |
]]><?ORA break="sidebar"?><![CDATA[<entry><para> |
| 90 |
A paragraph of text.]]> |
| 91 |
</para> <lineannotation>Error, cannot have a line break after a block element |
| 92 |
</lineannotation> |
| 93 |
<![CDATA[</entry>]]></screen></para> |
| 94 |
|
| 95 |
<para>When designing a &DTD;, it is wise to avoid pernicious mixed |
| 96 |
content. Unfortunately, the only way to correct the pernicious |
| 97 |
mixed content problem that already exists in DocBook is |
| 98 |
to require some sort of wrapper (a block element, or an inline |
| 99 |
like <sgmltag>Phrase</sgmltag>) around &pcdata; within table |
| 100 |
<sgmltag>Entry</sgmltag>s. This is annoying and inconvenient in |
| 101 |
a great many tables in which &pcdata; cells predominate and, in |
| 102 |
addition, differ from |
| 103 |
&CALS;.</para> |
| 104 |
</sidebar> |
| 105 |
|
| 106 |
<refsect2><title>Processing expectations</title> |
| 107 |
<para> |
| 108 |
&calssemantics; |
| 109 |
</para> |
| 110 |
<para> |
| 111 |
The content of <sgmltag>Entry</sgmltag> is formatted to fit within the table |
| 112 |
cell that it occupies. Horizontal and vertical spanning may allow the |
| 113 |
content of an <sgmltag>Entry</sgmltag> to occupy several physical cells. |
| 114 |
</para> |
| 115 |
</refsect2> |
| 116 |
|
| 117 |
<refsect2 role='fu' revision="4.0"><title>&FutureChanges;</title> |
| 118 |
<para> |
| 119 |
|
| 120 |
&fu.interfacedefinition; |
| 121 |
</para> |
| 122 |
</refsect2> |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
&entry.parents.gen; |
| 127 |
&entry.children.gen; |
| 128 |
</refsect1> |
| 129 |
<refsect1 condition='ref.elem.attrdesc'><title>Attributes</title> |
| 130 |
<variablelist> |
| 131 |
<varlistentry><term>align</term> |
| 132 |
<listitem> |
| 133 |
<para> |
| 134 |
<sgmltag class="attribute">Align</sgmltag> specifies the horizontal alignment |
| 135 |
of text (and other elements) within the <sgmltag>Entry</sgmltag>. If no |
| 136 |
alignment is specified, it is inherited from the <sgmltag>ColSpec</sgmltag> |
| 137 |
for the current column, or the <sgmltag>SpanSpec</sgmltag> if this entry |
| 138 |
occurs in a span. |
| 139 |
If <literal>Char</literal> is specified, see also |
| 140 |
<sgmltag class="attribute">Char</sgmltag> and |
| 141 |
<sgmltag class="attribute">CharOff</sgmltag>. |
| 142 |
</para> |
| 143 |
</listitem> |
| 144 |
</varlistentry> |
| 145 |
<varlistentry><term>char</term> |
| 146 |
<listitem> |
| 147 |
<para> |
| 148 |
<sgmltag class="attribute">Char</sgmltag> specifies the alignment character when |
| 149 |
the <sgmltag class="attribute">Align</sgmltag> attribute is set to <literal>Char</literal>. |
| 150 |
</para> |
| 151 |
</listitem> |
| 152 |
</varlistentry> |
| 153 |
<varlistentry><term>charoff</term> |
| 154 |
<listitem> |
| 155 |
<para> |
| 156 |
<sgmltag class='attribute'>CharOff</sgmltag> specifies the percentage of the |
| 157 |
column's total width that should appear to the left of the first |
| 158 |
occurance of the character identified in <sgmltag |
| 159 |
class='attribute'>Char</sgmltag> when the <sgmltag class='attribute'>Align</sgmltag> |
| 160 |
attribute is set to <literal>Char</literal>. This attribute is inherited from |
| 161 |
the relevant <sgmltag>ColSpec</sgmltag> or <sgmltag>SpanSpec</sgmltag>. |
| 162 |
</para> |
| 163 |
</listitem> |
| 164 |
</varlistentry> |
| 165 |
<varlistentry><term>colname</term> |
| 166 |
<listitem> |
| 167 |
<para> |
| 168 |
<sgmltag class="attribute">ColName</sgmltag> identifies the column in which |
| 169 |
this entry should appear; it must have been previously defined in |
| 170 |
a <sgmltag>ColSpec</sgmltag>. <sgmltag>Entry</sgmltag>s cannot be given out of order, |
| 171 |
the column referenced must be to the right of the last <sgmltag>Entry</sgmltag> |
| 172 |
or <sgmltag>EntryTbl</sgmltag> placed in the current row. It is an error |
| 173 |
to specify both a <sgmltag class="attribute">ColName</sgmltag> and a |
| 174 |
<sgmltag class="attribute">SpanName</sgmltag>. |
| 175 |
</para> |
| 176 |
</listitem> |
| 177 |
</varlistentry> |
| 178 |
<varlistentry><term>colsep</term> |
| 179 |
<listitem> |
| 180 |
<para> |
| 181 |
If <sgmltag class="attribute">ColSep</sgmltag> has the value 1 (true), then |
| 182 |
a rule will be drawn to the right of this <sgmltag>Entry</sgmltag>. |
| 183 |
A value of 0 (false) suppresses the rule. |
| 184 |
The rule to the right of the last column in the table is controlled by the |
| 185 |
<sgmltag class="attribute">Frame</sgmltag> attribute of the enclosing |
| 186 |
<sgmltag>Table</sgmltag> or <sgmltag>InformalTable</sgmltag> and the |
| 187 |
<sgmltag class="attribute">ColSep</sgmltag> of an entry in the last column in the table |
| 188 |
is ignored. If unspecified, this attribute is inherited from the |
| 189 |
the corresponding <sgmltag>ColSpec</sgmltag> or <sgmltag>SpanSpec</sgmltag> and |
| 190 |
enclosing elements. |
| 191 |
</para> |
| 192 |
</listitem> |
| 193 |
</varlistentry> |
| 194 |
<varlistentry><term>morerows</term> |
| 195 |
<listitem> |
| 196 |
<para> |
| 197 |
<sgmltag class="attribute">MoreRows</sgmltag> indicates how many more rows, in |
| 198 |
addition to the current row, this <sgmltag>Entry</sgmltag> is to occupy. |
| 199 |
It creates a vertical span. The default of <literal>0</literal> indicates that |
| 200 |
the <sgmltag>Entry</sgmltag> occupies only a single row. |
| 201 |
</para> |
| 202 |
</listitem> |
| 203 |
</varlistentry> |
| 204 |
<varlistentry><term>nameend</term> |
| 205 |
<listitem> |
| 206 |
<para> |
| 207 |
<sgmltag class="attribute">NameEnd</sgmltag> is the name (defined in a |
| 208 |
<sgmltag>ColSpec</sgmltag>) of the rightmost column of a span. On <sgmltag>Entry</sgmltag>, |
| 209 |
specifying both <sgmltag class="attribute">NameSt</sgmltag> and |
| 210 |
<sgmltag class="attribute">NameEnd</sgmltag> defines a horizontal span for the |
| 211 |
current <sgmltag>Entry</sgmltag>. (See also <sgmltag class="attribute">SpanName</sgmltag>.) |
| 212 |
</para> |
| 213 |
</listitem> |
| 214 |
</varlistentry> |
| 215 |
<varlistentry><term>namest</term> |
| 216 |
<listitem> |
| 217 |
<para> |
| 218 |
<sgmltag class='attribute'>NameSt</sgmltag> (<quote>name start</quote>) is the name (defined in a |
| 219 |
<sgmltag>ColSpec</sgmltag>) of the leftmost column of a span. On <sgmltag>Entry</sgmltag>, |
| 220 |
specifying both <sgmltag class='attribute'>NameSt</sgmltag> and |
| 221 |
<sgmltag class='attribute'>NameEnd</sgmltag> defines a horizontal span for the |
| 222 |
current <sgmltag>Entry</sgmltag>. (See also <sgmltag class='attribute'>SpanName</sgmltag>.) |
| 223 |
</para> |
| 224 |
</listitem> |
| 225 |
</varlistentry> |
| 226 |
<varlistentry><term>rotate</term> |
| 227 |
<listitem> |
| 228 |
<para> |
| 229 |
If <sgmltag class="attribute">Rotate</sgmltag> has the value 1 (true), the |
| 230 |
<sgmltag>Entry</sgmltag> is to be rotated 90 degrees counterclockwise in the |
| 231 |
table cell. A value of 0 (false) indicates that no rotation is to occur. |
| 232 |
If the stylesheet also specifies rotation, the value of |
| 233 |
<sgmltag class="attribute">Rotate</sgmltag> is ignored; they are not additive. |
| 234 |
Only the values 0 and 1 are legal. |
| 235 |
</para> |
| 236 |
</listitem> |
| 237 |
</varlistentry> |
| 238 |
<varlistentry><term>rowsep</term> |
| 239 |
<listitem> |
| 240 |
<para> |
| 241 |
If <sgmltag class="attribute">RowSep</sgmltag> has the value 1 (true), then a |
| 242 |
rule will be drawn below the <sgmltag>Entry</sgmltag>. A value of 0 (false) |
| 243 |
suppresses the rule. The rule below the last row in the table is |
| 244 |
controlled by the <sgmltag class="attribute">Frame</sgmltag> attribute of the |
| 245 |
enclosing <sgmltag>Table</sgmltag> or <sgmltag>InformalTable</sgmltag> and the |
| 246 |
<sgmltag class="attribute">RowSep</sgmltag> of the last row is ignored. If |
| 247 |
unspecified, this attribute is inherited from enclosing elements. |
| 248 |
</para> |
| 249 |
</listitem> |
| 250 |
</varlistentry> |
| 251 |
<varlistentry><term>spanname</term> |
| 252 |
<listitem> |
| 253 |
<para> |
| 254 |
<sgmltag class="attribute">SpanName</sgmltag> is the name (defined in a |
| 255 |
<sgmltag>SpanSpec</sgmltag>) of a span. This cell will be rendered with the |
| 256 |
specified horizontal span. |
| 257 |
</para> |
| 258 |
</listitem> |
| 259 |
</varlistentry> |
| 260 |
<varlistentry><term>valign</term> |
| 261 |
<listitem> |
| 262 |
<para> |
| 263 |
<sgmltag class="attribute">VAlign</sgmltag> specifies the vertical alignment |
| 264 |
of text (and other elements) within the <sgmltag>Entry</sgmltag>. If no |
| 265 |
alignment is specified, it is inherited from enclosing elements. |
| 266 |
</para> |
| 267 |
</listitem> |
| 268 |
</varlistentry> |
| 269 |
</variablelist> |
| 270 |
</refsect1> |
| 271 |
<refsect1 condition='ref.elem.seealso'><title>See Also</title> |
| 272 |
&entry.seealso.gen; |
| 273 |
</refsect1> |
| 274 |
<refsect1><title>Examples</title> |
| 275 |
|
| 276 |
&entry.example.seealso.gen; |
| 277 |
</refsect1> |
| 278 |
</refentry> |
| 279 |
|