1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN" 2 "/dtd/4.0/docbookx.dtd"> 3<book> 4<bookinfo> 5<title>DocBook V4.0 Example Document</title> 6<author><firstname>Norman</firstname><surname>Walsh</surname></author> 7<abstract> 8<para>This document demonstrates the new tags in DocBook V4.0.</para> 9<para>The focus of this document is to present examples of new elements, 10minor changes such as the addition of new attribute values are not 11included.</para> 12</abstract> 13</bookinfo> 14<chapter><title>Block-level Markup</title> 15<para>There's a new simple-alternative for <sgmltag>msgentry</sgmltag>: 16<sgmltag>simplemsgentry</sgmltag>.</para> 17<msgset> 18<simplemsgentry> 19<msgtext><para>The text of a message</para></msgtext> 20<msgexplan><para>An explanation of the message.</para></msgexplan> 21</simplemsgentry> 22<simplemsgentry> 23<msgtext><para>The text of a message</para></msgtext> 24<msgexplan><para>An explanation of the message.</para></msgexplan> 25</simplemsgentry> 26</msgset> 27 28<para>Longer descriptions are possible in a <sgmltag>revhistory</sgmltag>: 29</para> 30 31<para> 32<revhistory> 33<revision> 34<revnumber>2</revnumber> 35<date>today</date> 36<authorinitials>nwalsh</authorinitials> 37<revdescription> 38<para>Here are a few paragraphs of description:</para> 39<para>Did some stuff.</para> 40<para>Did some other stuff.</para> 41</revdescription> 42</revision> 43<revision> 44<revnumber>1</revnumber> 45<date>yesterday</date> 46<authorinitials>nwalsh</authorinitials> 47<revdescription> 48<para>Here are a few paragraphs of description:</para> 49<para>Did some stuff.</para> 50<para>Did some other stuff.</para> 51</revdescription> 52</revision> 53</revhistory> 54</para> 55 56<para>Ordered and itemized lists can have titles:</para> 57 58<itemizedlist><title>Itemized List</title> 59<listitem><para>First thing</para></listitem> 60<listitem><para>Second thing</para></listitem> 61<listitem><para>Third thing</para></listitem> 62</itemizedlist> 63 64<itemizedlist><title>Ordered List</title> 65<listitem><para>First thing</para></listitem> 66<listitem><para>Second thing</para></listitem> 67<listitem><para>Third thing</para></listitem> 68</itemizedlist> 69 70<para>Linespecific environments can indicate line numbering:</para> 71 72<programlisting linenumbering="numbered"> 73<!ENTITY % linespecific.attrib 74 "format NOTATION 75 (linespecific) 'linespecific' 76 linenumbering (numbered|unnumbered) #IMPLIED"> 77</programlisting> 78 79<para>Added <sgmltag>classsynopsis</sgmltag> for documenting 80object-oriented programming language classes. Here's one example:</para> 81 82<classsynopsis language="java"> 83 <ooclass><modifier>public</modifier> 84 <classname>TextFileWriter</classname></ooclass> 85 <ooclass><classname>HandlerBase</classname></ooclass> 86 87 <fieldsynopsis> 88 <modifier>private</modifier> 89 <type>Writer</type> 90 <varname>writer</varname> 91 </fieldsynopsis> 92 93 <fieldsynopsis> 94 <modifier>public</modifier> 95 <type>String</type> 96 <varname>writerName</varname> 97 <initializer>"MyWriter"</initializer> 98 </fieldsynopsis> 99 100 <methodsynopsis> 101 <modifier>static</modifier> 102 <modifier>public</modifier> 103 <void/> 104 <methodname>write</methodname> 105 <methodparam> 106 <type>ResultTreeFragment</type> 107 <parameter>frag</parameter> 108 </methodparam> 109 <methodparam> 110 <type>String</type> 111 <parameter>file</parameter> 112 </methodparam> 113 <exceptionname>SAXException</exceptionname> 114 </methodsynopsis> 115</classsynopsis> 116</chapter> 117 118<chapter><title>Inline markup</title> 119<para>The <sgmltag>sgmltag</sgmltag> element has new 120<sgmltag class="attribute">class</sgmltag> attribute values: 121<literal>xmlpi</literal> and 122<literal>emptytag</literal>. These produce 123<sgmltag class="xmlpi">processing instructions</sgmltag> 124and <sgmltag class="emptytag">empty-tag</sgmltag> markup 125suitable for XML. 126</para> 127</chapter> 128</book> 129