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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990
|
<partintro>
<!-- this can't actually go here...
<pubdate>$Date$</pubdate>
<releaseinfo>$Revision$</releaseinfo>
</docinfo>
-->
<para>
<indexterm id="elementsref" class='startofrange'>
<primary>elements</primary>
<secondary>reference</secondary>
</indexterm>This reference describes every element in the DocBook
&DTD;.</para>
<para>In DocBook V3.1, introduced in February, 1999, the following
elements were added to DocBook:
<simplelist type='inline'>
<member><sgmltag>answer</sgmltag></member>
<member><sgmltag>audiodata</sgmltag></member>
<member><sgmltag>audioobject</sgmltag></member>
<member><sgmltag>caption</sgmltag></member>
<member><sgmltag>colophon</sgmltag></member>
<member><sgmltag>constant</sgmltag></member>
<member><sgmltag>imagedata</sgmltag></member>
<member><sgmltag>imageobject</sgmltag></member>
<member><sgmltag>imageobjectco</sgmltag></member>
<member><sgmltag>informalfigure</sgmltag></member>
<member><sgmltag>inlinemediaobject</sgmltag></member>
<member><sgmltag>mediaobject</sgmltag></member>
<member><sgmltag>mediaobjectco</sgmltag></member>
<member><sgmltag>objectinfo</sgmltag></member>
<member><sgmltag>qandadiv</sgmltag></member>
<member><sgmltag>qandaentry</sgmltag></member>
<member><sgmltag>qandaset</sgmltag></member>
<member><sgmltag>question</sgmltag></member>
<member><sgmltag>section</sgmltag></member>
<member><sgmltag>sectioninfo</sgmltag></member>
<member><sgmltag>textobject</sgmltag></member>
<member><sgmltag>varname</sgmltag></member>
<member><sgmltag>videodata</sgmltag></member>
<member><sgmltag>videoobject</sgmltag></member>
</simplelist>.</para>
<para>DocBook V4.0, introduced in January, 2001, the following elements
were added:
<simplelist type='inline'>
<member><sgmltag>appendixinfo</sgmltag></member>
<member><sgmltag>articleinfo</sgmltag></member>
<member><sgmltag>bibliographyinfo</sgmltag></member>
<member><sgmltag>chapterinfo</sgmltag></member>
<member><sgmltag>classsynopsis</sgmltag></member>
<member><sgmltag>classsynopsisinfo</sgmltag></member>
<member><sgmltag>constructorsynopsis</sgmltag></member>
<member><sgmltag>destructorsynopsis</sgmltag></member>
<member><sgmltag>exceptionname</sgmltag></member>
<member><sgmltag>fieldsynopsis</sgmltag></member>
<member><sgmltag>glossaryinfo</sgmltag></member>
<member><sgmltag>indexinfo</sgmltag></member>
<member><sgmltag>initializer</sgmltag></member>
<member><sgmltag>interfacename</sgmltag></member>
<member><sgmltag>methodname</sgmltag></member>
<member><sgmltag>methodparam</sgmltag></member>
<member><sgmltag>methodsynopsis</sgmltag></member>
<member><sgmltag>modifier</sgmltag></member>
<member><sgmltag>ooclass</sgmltag></member>
<member><sgmltag>ooexception</sgmltag></member>
<member><sgmltag>oointerface</sgmltag></member>
<member><sgmltag>partinfo</sgmltag></member>
<member><sgmltag>prefaceinfo</sgmltag></member>
<member><sgmltag>refentryinfo</sgmltag></member>
<member><sgmltag>referenceinfo</sgmltag></member>
<member><sgmltag>remark</sgmltag></member>
<member><sgmltag>revdescription</sgmltag></member>
<member><sgmltag>setindexinfo</sgmltag></member>
<member><sgmltag>sidebarinfo</sgmltag></member>
<member><sgmltag>simplemsgentry</sgmltag></member>
</simplelist>.</para>
<para>The following additional changes were made in DocBook V4.0:
<sgmltag>artheader</sgmltag> was renamed <sgmltag>articleinfo</sgmltag>;
<sgmltag>comment</sgmltag> was renamed <sgmltag>remark</sgmltag>;
<sgmltag>docinfo</sgmltag> was broken into a set of other info elements;
and <sgmltag>bookbiblio</sgmltag>, <sgmltag>interfacedefinition</sgmltag>,
and <sgmltag>seriesinfo</sgmltag> were removed.</para>
<para>DocBook V4.2, introduced in FIXME: April, 2002, the following elements
were added:
<simplelist type='inline'>
<member><sgmltag>bibliocoverage</sgmltag></member>
<member><sgmltag>biblioid</sgmltag></member>
<member><sgmltag>bibliorelation</sgmltag></member>
<member><sgmltag>bibliosource</sgmltag></member>
<member><sgmltag>blockinfo</sgmltag></member>
<member><sgmltag>citebiblioid</sgmltag></member>
<member><sgmltag>coref</sgmltag></member>
<member><sgmltag>errortext</sgmltag></member>
<member><sgmltag>personblurb</sgmltag></member>
<member><sgmltag>personname</sgmltag></member>
<member><sgmltag>refsection</sgmltag></member>
<member><sgmltag>refsectioninfo</sgmltag></member>
<member><sgmltag>textdata</sgmltag></member>
</simplelist>.</para>
<para>Additional changes made to DocBook V4.2 are summarized in the
<ulink url="http://www.oasis-open.org/docbook/specs/cs-docbook-docbook-4.2.html">DocBook V4.2
Specification</ulink>.</para>
<sect1>
<title>Organization of Reference Pages</title>
<para>The description of each element in this reference is divided into the
following sections:</para>
<variablelist>
<varlistentry><term>Synopsis</term>
<listitem>
<para>
<indexterm><primary>elements</primary>
<secondary>reference</secondary>
<tertiary>synopses</tertiary></indexterm>
<indexterm><primary>synopses</primary>
<secondary>elements (reference pages)</secondary></indexterm>
<indexterm><primary>content models</primary>
<secondary>elements, reference</secondary></indexterm>
Provides a quick synopsis of the element. The content of the synopsis
table varies according to the nature of the element described, but may include
any or all of the following sections:</para>
<variablelist>
<varlistentry><term>Content Model or Declared Content</term>
<listitem>
<para>Describes the content model of the element in &SGML;/&XML; &DTD; terms. See <xref linkend="s2-cmintro"/>.”</para>
</listitem>
</varlistentry>
<varlistentry><term>Inclusions</term>
<listitem>
<para>
<indexterm><primary>inclusions</primary>
<secondary>elements</secondary></indexterm>
Lists <quote>inclusions.</quote> Inclusions are an &SGML; feature.
Included elements can appear anywhere inside the element
that includes them, even in places that aren't ordinarily
valid. For example, <sgmltag>Chapter</sgmltag> includes <sgmltag>IndexTerm</sgmltag>.
This means that within a <sgmltag>Chapter</sgmltag>, <sgmltag>IndexTerm</sgmltag> can
appear inside <sgmltag>Emphasis</sgmltag>, for instance, even though the
content model of <sgmltag>Emphasis</sgmltag> does not explicitly allow
<sgmltag>IndexTerm</sgmltag>s.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Exclusions</term>
<listitem>
<para>
<indexterm><primary>exclusions</primary>
<secondary>elements</secondary></indexterm>
<indexterm><primary>nesting</primary>
<secondary>elements</secondary></indexterm>
<indexterm><primary>elements</primary>
<secondary>nesting</secondary></indexterm>
Lists <quote>exclusions.</quote> Exclusions are an &SGML; feature.
Excluded elements cannot appear anywhere inside the element that
excludes them, even in places that are ordinarily valid. For
example, <sgmltag>Footnote</sgmltag> excludes <sgmltag>Footnote</sgmltag>. This
means that a <sgmltag>Footnote</sgmltag> cannot appear inside a
<sgmltag>Para</sgmltag> inside a <sgmltag>Footnote</sgmltag>, even though
<sgmltag>Footnote</sgmltag> appears in the content model of <sgmltag>Para</sgmltag>.
</para>
<indexterm><primary>lists</primary>
<secondary>elements</secondary>
<tertiary>exclusions</tertiary></indexterm>
<para>Lists elements that are excluded from appearing at any level below
the element described.</para>
</listitem>
</varlistentry>
<varlistentry><term>Attributes</term>
<listitem>
<para>
<indexterm><primary>attributes</primary>
<secondary>elements, referencing</secondary></indexterm>
Provides a synopsis of the attributes on the element. For brevity, common
attributes are described only once, <link linkend="common.attributes">in this
introduction</link>.</para>
</listitem>
</varlistentry>
<varlistentry><term>Tag Minimization</term>
<listitem>
<para>
<indexterm><primary>tags</primary>
<secondary>minimization</secondary></indexterm>
<indexterm><primary>start tags</primary>
<secondary>omitting</secondary></indexterm>
<indexterm><primary>end tags</primary>
<secondary>omitting</secondary></indexterm>
<indexterm><primary>markup</primary>
<secondary>minimization</secondary></indexterm>
<indexterm><primary>minimization</primary>
<secondary>markup</secondary>
<tertiary>start and end tags</tertiary></indexterm>
Indicates if start- or end-tags may be omitted. Tag omission is
dependent on both the &DTD; and your &SGML; declaration. If a tag is described
as ommissable here, it is ommissible if your declaration allows tag
omission. The standard DocBook declaration does not.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Parameter Entities</term>
<listitem>
<para>
<indexterm><primary>parameter entities</primary>
<secondary>elements</secondary></indexterm>
Lists the parameter entities in which the element described appears.
Parameter entities are important when you are <link linkend="app-customizing">
customizing the &DTD;</link>.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term>Description</term>
<listitem>
<para>
<indexterm><primary>elements</primary>
<secondary>description, semantics</secondary></indexterm>
<indexterm><primary>semantics (elements), describing</primary></indexterm>
Describes the semantics of the element in detail.</para>
<variablelist>
<varlistentry><term>Processing expectations</term>
<listitem>
<para>
<indexterm><primary>formatting</primary>
<secondary>elements</secondary></indexterm>
<indexterm><primary>elements</primary>
<secondary>attributes</secondary>
<tertiary>processing expectations, affecting</tertiary></indexterm>
Summarizes specific formatting expectations of the element. Many
processing expectations are influenced by attribute values. Be sure to
consult the
description of element attributes as well.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Future changes</term>
<listitem>
<para>
<indexterm><primary>DocBook DTD</primary>
<secondary>changes, future versions</secondary></indexterm>
<indexterm><primary>compatibility, DocBook versions</primary></indexterm>
<indexterm><primary>versions</primary>
<secondary>DocBook DTD</secondary>
<tertiary>future changes</tertiary></indexterm>
Identifies changes that are scheduled for future versions of the
&DTD;. These changes are highlighted because they involve some
backward-incompatability that may make currently valid DocBook documents
no longer valid under the new version.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term>Attributes</term>
<listitem>
<para>
<indexterm><primary>attributes</primary>
<secondary>semantics</secondary></indexterm>
Describes the semantics of each attribute in detail.</para>
</listitem>
</varlistentry>
<varlistentry><term>See Also</term>
<listitem>
<para>Lists similar or related elements.
<indexterm><primary>cross references</primary>
<secondary>elements</secondary></indexterm>
</para>
</listitem>
</varlistentry>
<varlistentry><term>Examples</term>
<listitem>
<para>
<indexterm><primary>elements</primary>
<secondary>proper usage, examples</secondary></indexterm>
Provides examples of proper usage for the
element. Generally, the smallest example required to reasonably
demonstrate the element is used. In many cases, a formatted
version of the example is also shown.
</para>
<para>
All of the examples printed in the book use the &SGML; version of
DocBook. The <link linkend="app-cdrom"><acronym>CD-ROM</acronym></link> includes the full
text of all of the examples.
</para>
<para>Formatted examples are indicated using a vertical bar.</para>
</listitem>
</varlistentry>
</variablelist>
<sect2 id="s2-cmintro">
<title>Understanding Content Models</title>
<para>
<indexterm><primary>content models</primary>
<secondary>overview</secondary></indexterm>
Each element synopsis begins with a concise description of the
elements it can contain. This description is in &DTD;
“content model” syntax, with all parameter entities
expanded.
</para>
<para>
Content models are the way that &DTD;s describe the name, number,
and order of other elements that may be used inside an element.
The primary feature of content model syntax is that it is concise,
but this conciseness comes at the cost of legibility until you
are familiar with the syntax.
</para>
<para>
<indexterm><primary>syntax</primary>
<secondary>content models</secondary></indexterm>
<indexterm><primary>keywords</primary>
<secondary>content model syntax</secondary></indexterm>
<indexterm><primary>sequences</primary>
<secondary>content model syntax</secondary></indexterm>
<indexterm><primary>alternatives (content model syntax)</primary></indexterm>
<indexterm><primary>groups</primary>
<secondary>content model syntax</secondary></indexterm>
There are six components to content model syntax: <firstterm>element
names</firstterm>, <firstterm>keywords</firstterm>,
<firstterm>repetitions</firstterm>, <firstterm>sequences</firstterm>,
<firstterm>alternatives</firstterm>, and
<firstterm>groups</firstterm>.
</para>
<variablelist>
<varlistentry><term>Element names</term>
<listitem><para>
<indexterm><primary>elements</primary>
<secondary >names in content models</secondary></indexterm>
An element name in a content model indicates that an element of that
type may (or must) occur at that position.
</para>
<para>
<indexterm><primary>Para element</primary></indexterm>
A content model of <literal>Para</literal> indicates
that the element must contain a single paragraph.
</para></listitem>
</varlistentry>
<varlistentry><term>Keywords</term>
<listitem><para>
<indexterm><primary>empty elements</primary></indexterm>
<indexterm><primary>elements</primary>
<secondary>empty</secondary><see>empty elements</see></indexterm>
There are two keywords that occur in the content models of DocBook
elements: <literal>EMPTY</literal>, and <literal>#PCDATA</literal>.
</para>
<para>A content model that consists of the single keyword <literal>EMPTY</literal>
identifes an element as an empty element. Empty elements are not allowed
to have any content. In order for the word “EMPTY” to have
this special meaning, it must be the first and only word in the content
model. The word “EMPTY” at any other place is treated as
an element name.
</para>
<para>
<indexterm><primary>#PCDATA keyword</primary></indexterm>
<indexterm><primary>text</primary>
<secondary>#PCDATA keyword</secondary></indexterm>
<indexterm><primary>characters</primary>
<secondary>character sets</secondary>
<tertiary>SGML and XML documents</tertiary></indexterm>
The <literal>#PCDATA</literal> keyword indicates that text may
occur at that position. The text may consist of entity references and
any characters that are legal in the document character set. For &XML;
documents, the document character set is always Unicode. In &SGML; the
declaration can identify character sets and ranges that are allowed.
DocBook &SGML; documents use the <acronym>ISO</acronym> Latin 1 character set.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Repetitions</term>
<listitem><para>
<indexterm><primary>repetitions (content model syntax)</primary></indexterm>
An unadorned element name indicates that an element must occur exactly
once at that position. A content model can also specify that an element
may occur zero or more times, one or more times, or exactly zero or one
time. This is accomplished by following the element name with one of
the following characters: <literal>*</literal> for zero or more times,
<literal>+</literal> for one or more times, or <literal>?</literal> for exactly
zero or one times.
</para>
<para>
A content model of <literal>Para+</literal> indicates
that the element must contain at least one paragraph and may contain
many.
</para></listitem>
</varlistentry>
<varlistentry><term>Sequences</term>
<listitem><para>
<indexterm><primary>sequences</primary>
<secondary>content model syntax</secondary></indexterm>
If element names in a content model are separated by commas,
then they must occur in sequence.
</para>
<para>
A content model of <literal>Title, Para</literal> indicates
that the element must contain a single title followed by a single paragraph.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Alternatives</term>
<listitem><para>
<indexterm><primary>alternatives (content model syntax)</primary></indexterm>
If element names in a content model are separated by vertical bars (|),
then they are alternatives. These are sometimes called “or
groups” because they require the selection of one or another element.
</para>
<para>
A content model of <literal>Phrase | Para</literal> indicates
that the element must contain either a single phrase or a single paragraph.
</para>
<para>
<indexterm><primary>connectors (SGML)</primary></indexterm>
<indexterm><primary>DocBook DTD</primary>
<secondary>ampersand (&) connector</secondary></indexterm>
In &SGML;, there is another connector: the ampersand (&). The
ampersand is a kind of combination of alternative and sequence,
which means that all of the elements must occur, but they can occur
in any order. DocBook does not have any content models that use
the ampersand connector. &XML; does not allow it.
</para>
</listitem>
</varlistentry>
<varlistentry><term>Groups</term>
<listitem><para>
<indexterm><primary>groups</primary>
<secondary>content model syntax</secondary></indexterm>
Finally, parentheses may be used around part of a content model. A group
formed this way can have repetition indicators and may occur as part of
a sequence.
</para>
<para>
A content model of <literal>(Literal | Replaceable)+</literal>
indicates that either <sgmltag>Literal</sgmltag> or <sgmltag>Replaceable</sgmltag>
must occur and they can be repeated (and mixed) any number of times.
</para></listitem>
</varlistentry>
</variablelist>
<sect3><title>Content models and validity</title>
<para>
<indexterm><primary>parsers</primary>
<secondary>content models, matching to elements</secondary></indexterm>
<indexterm><primary>elements</primary>
<secondary>parsing</secondary></indexterm>
A parser uses the content models to determine if a given document is valid.
In order for a document to be valid, the content of every element in the
document must <quote>match</quote> the content model for that element.
</para>
<para>
In practical terms, match means that it must be possible to expand the
content model until it exactly matches the sequence of elements in the
document.
</para>
<para>
For example, consider the content model of the <sgmltag>Epigraph</sgmltag> element:
<literal>Attribution?, (FormalPara | Para | SimPara)+</literal>.
This indicates that the following document fragment is valid:
<indexterm><primary>content models</primary>
<secondary>examples</secondary></indexterm>
<screen>
<![CDATA[
<epigraph>
<para>Some text</para>
</epigraph>
]]>
</screen>
</para>
<para>
It is valid because the following expansion of the content model exactly
matches the actual content: choose zero occurances of
<sgmltag>Attribution</sgmltag>, choose the alternative <sgmltag>Para</sgmltag> from
the group, and choose to let the “+” match once.
</para>
<para>
By the same token, this example is not valid because there is no
expansion of the content model that can match it:
<screen>
<![CDATA[
<epigraph>
<para>Some text</para>
<attribution>John Doe</attribution>
</epigraph>
]]>
</screen>
</para>
<para>
<indexterm><primary>ambiguity, content models</primary></indexterm>
There is one additional restriction on the matching ability of the
parser: it is not allowed to <quote>look ahead.</quote> This means that
there are many useful content models that are ambiguous.
</para>
</sect3>
<sect3><title>Ambiguity</title>
<para>
Ambiguity is not allowed. The parser must always be able to choose
exactly what to match based upon the next input token.
Consider the
following content model:
<literal>Meta*, Title?, Meta*</literal>.
</para>
<para>
The intent is clear: to allow some meta-information and a single,
optional <sgmltag>Title</sgmltag>. But this content model is ambiguous
for the following reason: if the document content begins with a
<sgmltag>Meta</sgmltag> element, it is impossible to tell if it matches
the <sgmltag>Meta</sgmltag> before the <sgmltag>Title</sgmltag> or after
without looking ahead.
</para>
<para>
Ambiguous content models are detected by the parser when it reads the
&DTD;. It is not sufficient that your document simply be unambiguous;
it must not be possible to construct any ambiguous document.
</para>
</sect3>
<sect3><title>#PCDATA and repetition</title>
<para>
<indexterm><primary>#PCDATA keyword</primary>
<secondary>repetition and</secondary></indexterm>
<indexterm><primary>empty elements</primary>
<secondary>PCDATA keyword and</secondary></indexterm>
The &PCDATA; keyword can always match the empty string. This
makes it impossible to force an element that may contain
characters not to be empty. In other words, the following content
model <emphasis>does not</emphasis> guarantee that the element is not
empty: <literal>(#PCDATA)+</literal>.
</para>
<para>
<indexterm><primary>groups</primary>
<secondary>PCDATA keyword</secondary></indexterm>
In &XML;, the &PCDATA; keyword is only allowed in optional, repeatable
<quote>or groups</quote>, and it must be the first member of the
group.
</para>
</sect3>
</sect2>
</sect1>
<sect1 id="common.attributes">
<title>Common Attributes</title>
<para>
<indexterm><primary>attributes</primary>
<secondary>common</secondary></indexterm>
<indexterm><primary>common attributes</primary></indexterm>
The following attributes occur on all elements. They are summarized
here once for brevity and to make the additional attributes that occur on
many elements stand out.</para>
<informaltable pgwide="1">
<tgroup cols="3" colsep="1" rowsep="1">
<colspec colnum="1" colname="C1"/>
<colspec colnum="2" colname="C2"/>
<colspec colnum="3" colname="C3"/>
<spanspec namest="C1" nameend="C3" spanname="C1C3"/>
<thead>
<row><entry><para>Name</para></entry><entry>Type</entry><entry>Default</entry>
</row>
</thead>
<tbody>
<row>
<entry><sgmltag class="attribute">Arch</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry revision="4.0"><sgmltag class="attribute">Condition</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">Conformance</sgmltag></entry>
<entry>&AT.NMTOKENS;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">ID</sgmltag></entry>
<entry>&AT.ID;</entry>
<entry><para><emphasis>None/Required</emphasis><footnote><para>On a
few elements, the <sgmltag class="attribute">ID</sgmltag> is required,
but on most it is not.</para></footnote></para></entry>
</row>
<row>
<entry><sgmltag class="attribute">Lang</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">OS</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">Remap</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">Role</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">Revision</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry valign="top"><sgmltag class="attribute">RevisionFlag</sgmltag></entry>
<entry><simplelist>
<member><emphasis>Enumeration:</emphasis></member>
<member>Changed</member>
<member>Added</member>
<member>Deleted</member>
<member>Off</member>
</simplelist></entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry revision="4.0"><sgmltag class="attribute">Security</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">UserLevel</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">Vendor</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
<row>
<entry><sgmltag class="attribute">XrefLabel</sgmltag></entry>
<entry>&AT.CDATA;</entry>
<entry><emphasis>None</emphasis></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<variablelist>
<varlistentry><term><sgmltag class="attribute">Arch</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Arch attribute</primary></indexterm>
<indexterm><primary>architecture</primary>
<secondary>computer or chip</secondary></indexterm>
<indexterm><primary>computer architecture (elements)</primary></indexterm>
<indexterm><primary>chip architecture (elements)</primary></indexterm>
<sgmltag class="attribute">Arch</sgmltag> designates the
computer or chip architecture to which the element applies.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Condition</sgmltag></term>
<listitem>
<para revision="4.0">
<indexterm><primary>Condition attribute</primary></indexterm>
<sgmltag class="attribute">Condition</sgmltag> is a general-purpose
effectivity attribute with no specified semantics. Many DocBook users
observed that in order to add an effectivity condition that was unique
to their environment required <quote>abusing</quote> the semantics of
one of the existing attributes, or adding their own, making their
customization <link linkend="s-notdocbook">an extension rather than a
subset</link>.</para>
<para>The <sgmltag class="attribute">Condition</sgmltag> attribute
provides a standard place for application-specific effectivity.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Conformance</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Conformance attribute</primary></indexterm>
<sgmltag class="attribute">Conformance</sgmltag> indicates
standards conformance characteristics of the item contained in the
element. These characteristics are application-specific. DocBook
provides no defaults.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">ID</sgmltag></term>
<listitem>
<para>
<indexterm><primary>ID attribute</primary></indexterm>
<sgmltag class="attribute">ID</sgmltag> is an identifying string
for the element. It must be unique at least within the document and
must begin with a letter.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Lang</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Lang attribute</primary></indexterm>
<indexterm><primary>country codes</primary></indexterm>
<indexterm><primary>languages</primary>
<secondary>codes</secondary></indexterm>
<indexterm><primary>ISO standards</primary>
<secondary>language codes</secondary></indexterm>
<indexterm><primary>ISO standards</primary>
<secondary>country codes</secondary></indexterm>
<sgmltag class="attribute">Lang</sgmltag> should be a language
code drawn from <acronym>ISO</acronym> 639 (perhaps extended with a
country code drawn from <acronym>ISO</acronym> 3166, as
<literal>en-US</literal>). Use it when you need to signal your
application to change hyphenation and other display
characteristics.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">OS</sgmltag></term>
<listitem>
<para>
<indexterm><primary>OS attribute</primary></indexterm>
<indexterm><primary>operating systems</primary>
<secondary>elements</secondary></indexterm>
<sgmltag class="attribute">OS</sgmltag> indicates the operating
system to which the element is applicable.
</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Remap</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Remap attribute</primary></indexterm>
<indexterm><primary>markup</primary>
<secondary>previous schemes, identifying</secondary></indexterm>
<sgmltag class="attribute">Remap</sgmltag> contains an element
name or similar semantic identifier assigned to the content in a
previous markup scheme.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Role</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Role attribute</primary></indexterm>
<indexterm><primary>elements</primary>
<secondary>classifying or subclassifying</secondary></indexterm>
<indexterm><primary>parameter entities</primary>
<secondary>Role attribute</secondary></indexterm>
<sgmltag class="attribute">Role</sgmltag> contains a string used
to classify or subclassify an element.</para>
<para>While Role is a common attribute in the sense that it occurs on
almost all elements, it is not part of either of the common attributes
parameter entities (<sgmltag class="paramentity">common.attrib</sgmltag> or <sgmltag class="paramentity">idreq.common.attrib</sgmltag>). It is
parameterized differently because it is useful to be able to subclass
<sgmltag class="attribute">Role</sgmltag> independently on different
elements.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Revision</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Revision attribute</primary></indexterm>
<sgmltag class="attribute">Revision</sgmltag> indicates the
editorial revision to which the element belongs.
</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">RevisionFlag</sgmltag></term>
<listitem>
<para>
<indexterm><primary>RevisionFlag attribute</primary></indexterm>
<indexterm><primary>versions</primary>
<secondary>revision control, documents</secondary></indexterm>
<sgmltag class="attribute">RevisionFlag</sgmltag> indicates the
revision status of element; the default is that the element hasn't
been revised. <sgmltag class="attribute">RevisionFlag</sgmltag> is
intended only for simple revision management: to track the entire
history of a document use a proper revision control system. Use
<sgmltag class="attribute">RevisionFlag</sgmltag> for indicating
changes from one version to the next, no more.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Security</sgmltag></term>
<listitem>
<para revision="4.0">
<indexterm><primary>Security attribute</primary></indexterm>
<sgmltag class="attribute">Security</sgmltag> identifies something about
the security level associated with the element to which it applies.
</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">UserLevel</sgmltag></term>
<listitem>
<para>
<indexterm><primary>UserLevel attribute</primary></indexterm>
<indexterm><primary>experience levels (users)</primary></indexterm>
<sgmltag class="attribute">UserLevel</sgmltag> indicates the
level of user experience to which element applies.
</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">Vendor</sgmltag></term>
<listitem>
<para>
<indexterm><primary>Vendor attribute</primary></indexterm>
<indexterm><primary>computer vendors</primary></indexterm>
<sgmltag class="attribute">Vendor</sgmltag> indicates the
computer vendor to which the element applies.</para>
</listitem>
</varlistentry>
<varlistentry><term><sgmltag class="attribute">XrefLabel</sgmltag></term>
<listitem>
<para>
<indexterm><primary>XrefLabel attribute</primary></indexterm>
<indexterm><primary>cross references</primary>
<secondary>XrefLabel attribute</secondary></indexterm>
<sgmltag class="attribute">XrefLabel</sgmltag> holds text to be
used when a cross reference (<sgmltag>XRef</sgmltag>) is made to the
element.</para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1>
<title>Attribute Types</title>
<para>
<indexterm><primary>types (attributes)</primary></indexterm>
<indexterm><primary>attributes</primary>
<secondary>types</secondary></indexterm>
&SGML; offers a small selection of attribute types. (&XML;
offers a subset of these.) For convenience, a brief description of
each of these types is provided here:</para>
<variablelist>
<varlistentry id="AT.CDATA"><term><sgmltag class="attribute">&AT.CDATA;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>characters</primary>
<secondary>strings (CDATA attribute)</secondary></indexterm>
<indexterm><primary>strings (characters)</primary></indexterm>
<indexterm><primary>CDATA</primary></indexterm>
A string of characters.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NUMBER"><term><sgmltag class="attribute">&AT.NUMBER;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>numbers (attributes)</primary></indexterm>
<indexterm><primary>hyphens (-), numbers</primary></indexterm>
<indexterm><primary>decimal points (.), numbers</primary></indexterm>
A number. Numbers must begin with a hyphen or digit and can include
the decimal point.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NMTOKEN"><term><sgmltag class="attribute">&AT.NMTOKEN;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>NMTOKEN(S) attribute</primary></indexterm>
<indexterm><primary>names</primary>
<secondary>NMTOKEN attribute</secondary></indexterm>
<indexterm><primary>attributes</primary>
<secondary>names</secondary></indexterm>
<indexterm><primary>characters</primary>
<secondary>names</secondary></indexterm>
A sequence of name characters (letters, digits, hyphens, and
periods). This differs from a <sgmltag class="attribute">&AT.CDATA;</sgmltag> attribute because it cannot
contain spaces, punctuation, or other non-name characters.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NMTOKENS"><term><sgmltag class="attribute">&AT.NMTOKENS;</sgmltag></term>
<listitem>
<para>A sequence of one or more space-delimited <sgmltag class="attribute">&AT.NMTOKEN;</sgmltag> values.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NUTOKEN"><term><sgmltag class="attribute">&AT.NUTOKEN;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>NUTOKEN attribute</primary></indexterm>
<indexterm><primary>digits</primary>
<secondary>numbers</secondary></indexterm>
<indexterm><primary>decimal points (.), numbers</primary></indexterm>
A sequence of number characters (digits, hyphens, and periods).
This differs from a <sgmltag class="attribute">&AT.NUMBER;</sgmltag>
field because it is not required to begin with a digit or a
hyphen.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.ENTITY"><term><sgmltag class="attribute">&AT.ENTITY;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>ENTITY attribute</primary></indexterm>
An entity name. The value of an <sgmltag class="attribute">&AT.ENTITY;</sgmltag> attribute must be the name of
a declared entity.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NAME"><term><sgmltag class="attribute">&AT.NAME;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>NAME attribute</primary></indexterm>
<indexterm><primary>digits</primary>
<secondary>names</secondary></indexterm>
<indexterm><primary>periods (.), names</primary></indexterm>
<indexterm><primary>NAMES attribute</primary></indexterm>
A name. A name must begin with a letter and can consist of
letters, digits, hyphens, and periods.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.NAMES"><term><sgmltag class="attribute">&AT.NAMES;</sgmltag></term>
<listitem>
<para>A sequence of one or more space-delimited <sgmltag class="attribute">&AT.NAME;</sgmltag> values.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.ID"><term><sgmltag class="attribute">&AT.ID;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>ID attribute</primary></indexterm>
<indexterm><primary>uniqueness</primary>
<secondary>ID attributes</secondary></indexterm>
An <acronym>ID</acronym>. <acronym>ID</acronym>s are names that
must be globally unique within the document. The <sgmltag class="attribute">&AT.ID;</sgmltag> attribute declares the
<acronym>ID</acronym>.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.IDREF"><term><sgmltag class="attribute">&AT.IDREF;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>IDREF attribute</primary></indexterm>
An single <acronym>ID</acronym>. <acronym>ID</acronym>s are
names that must be globally unique within the document. The value of
an <sgmltag class="attribute">&AT.IDREF;</sgmltag> attribute must be
the name of an <sgmltag class="attribute">&AT.ID;</sgmltag> attribute
defined in the document.</para>
</listitem>
</varlistentry>
<varlistentry id="AT.IDREFS"><term><sgmltag class="attribute">&AT.IDREFS;</sgmltag></term>
<listitem>
<para>
<indexterm><primary>IDREFS attribute</primary></indexterm>
A sequence of one or more space-delimited <sgmltag class="attribute">&AT.ID;</sgmltag> values.
<indexterm startref="elementsref" class='endofrange'/>
</para>
</listitem>
</varlistentry>
</variablelist>
</sect1><?Pub Caret1?>
</partintro>
|