<?xml version="1.0" encoding="utf-8"?>
<article xmlns="http://docbook.org/ns/docbook"
	 xmlns:xl="http://www.w3.org/1999/xlink"
	 version="5.0" xml:lang="en">
<info>
<title>Your Article Name</title>
<subtitle>…optional subtitle…</subtitle>

<author>
<personname>Jirka Kosek</personname>
<email>jirka@kosek.cz</email>
<uri>http://xmlguru.cz</uri>
<personblurb><para>Jirka Kosek is a freelance XML consultant and
teacher at the University of Economics in Prague. He has more than
10 years of experience in providing XML consultancy and
training. Jirka is an active member in several standardization
bodies, including OASIS (DocBook TC and RELAX NG TC), the W3C (XSL
WG and ITS WG), and ISO/IEC JTC1/SC34 (DSDL, Topic Maps). You can
get familiar with his recent work and thoughts through <link
xl:href="http://xmlguru.cz">his blog</link>. He's currently engaged
in preparing the next XML Prague conference.</para></personblurb>
<affiliation>
<jobtitle>freelance</jobtitle>
<orgname>ACME</orgname>
</affiliation>
</author>

<keywordset>
<keyword>XML</keyword>
<keyword>DocBook</keyword>
<keyword>authoring</keyword>
</keywordset>

<abstract>
<para>First paragraph of your abstract.</para>
<para>Second paragraph …</para>
</abstract>
</info>

<para>Leading text before the first section can be there…</para>

<para>… and there</para>

<section>
<title>Introduction</title>

<para>Introductory section goes here…</para>

<para>… more text …</para>

</section>

<section>
<title>Another section</title>

<para>You can use not only paragraphs, but also programlistings:</para>

<programlisting><![CDATA[<article xmlns="http://docbook.org/ns/docbook" …>
  <title>Sample article</title>
  <para>This is a really short article.</para>
</article>]]></programlisting>

<para>DocBook offers plenty of elements for inline markup, for example
<tag>code</tag> for arbitrary code, e.g. <code>print 2+3;</code>.</para>

<para>You can give titles to your programlistings using <tag>example</tag>:</para>

<example>
<title>DocBook V4.5 document</title>
<programlisting><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
                         'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
<article lang="en">
  <title>Sample article</title>
  <para>This is a very short article.</para>
</article>]]></programlisting>
</example>

<para>Lists can be created using <tag>itemizedlist</tag> or
<tag>orderedlist</tag> elements:</para>

<itemizedlist>
<listitem>
<para><emphasis>DocBook V4.x is feature frozen.</emphasis>DocBook V4.5
is the last version of DocBook in the V4.x series. Any new DocBook
development, like the addition of new elements, will be done in
DocBook V5.0. It is only matter of time before useful, new elements
will be added into DocBook V5.0, but they are not likely to be back
ported into DocBook V4.x. DocBook V4.x will be in maintenance mode and
errata will be published if necessary. </para>
</listitem>
<listitem>
<para><emphasis>DocBook V5.0 offers new functionality.</emphasis>
DocBook V5.0 provides significant improvements over DocBook V4.x. For
example there is general markup for annotations, a new and flexible
system for linking, and unified markup for information sections using
the <tag>info</tag> element.</para>
</listitem>
<listitem>
<para><emphasis>DocBook V5.0 is more extensible.</emphasis> Having
DocBook V5.0 in a separate namespace allows you to easily mix DocBook
markup with other XML-based languages like SVG, MathML, XHTML or even
FooBarML.</para>
</listitem>
<listitem>
<para><emphasis>DocBook V5.0 is easier to customize.</emphasis> RELAX
NG offers many powerful constructs that make customization much easier
than it would be using a DTD (see <xref linkend="customizations"/>).</para>
</listitem>
</itemizedlist>

<para>Links to external resources are created using <tag>link</tag>
element and appropritate XLink attributes. Detailed documentation
about each DocBook V5.0 element is presented in <link
xl:href="http://docbook.org/tdg5/en/html/pt02.html">the reference part
of <citetitle>DocBook: The Definitive Guide</citetitle></link>.</para>

<para>Table are also easy to create.</para>

<table xml:id="t.removed">
<title>Recommended mapping for removed elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Old name</entry>
<entry>Recommended mapping</entry>
</row>
</thead>
<tbody>
<row>
<entry><tag>action</tag></entry>
<entry>Use <computeroutput>&lt;<tag>phrase</tag> remap="action"&gt;</computeroutput>.</entry>
</row>
<row>
<entry><tag>beginpage</tag></entry>
<entry>Remove: <tag>beginpage</tag> is advisory only
and has tended to cause confusion.  A processing instruction or
comment should be a workable replacement if one is needed.</entry>
</row>
<row>
<entry><tag>highlights</tag></entry>
<entry>Use <tag>abstract</tag>.  Note that because <tag
condition="v4">highlights</tag> has a broader content model, you may
need to wrap contents in a <tag>para</tag> inside
<tag>abstract</tag>.</entry>
</row>
<row>
<entry><tag>interface</tag></entry>
<entry>Use one of the <quote>gui*</quote> elements
(<tag>guibutton</tag>, <tag>guiicon</tag>, <tag>guilabel</tag>,
<tag>guimenu</tag>, <tag>guimenuitem</tag>, or
<tag>guisubmenu</tag>).</entry>
</row>
<row>
<entry><tag>invpartnumber</tag></entry>
<entry>Use <computeroutput>&lt;<tag>biblioid</tag> class="other"
otherclass="medialabel"&gt;</computeroutput>.  The
<tag>productnumber</tag> element is another alternative.</entry>
</row>
<row>
<entry><tag>medialabel</tag></entry>
<entry>Use <computeroutput>&lt;<tag>citetitle</tag>
pubwork="<replaceable>mediatype</replaceable>"&gt;</computeroutput>,
where <replaceable>mediatype</replaceable> is the type of media being
labeled (e.g.,<tag class="attvalue">cdrom</tag> or <tag
class="attvalue">dvd</tag>).</entry>
</row>
<row>
<entry><tag>modespec</tag></entry>
<entry>No longer needed.  The current processing model for
<tag>olink</tag> renders <tag>modespec</tag>
unnecessary.</entry>
</row>
<row>
<entry><tag>structfield</tag>, <tag>structname</tag></entry>
<entry>Use <tag>varname</tag>. If you need to distinguish between the
two, use <computeroutput>&lt;<tag>varname</tag>
remap="<replaceable>structname or
structfield</replaceable>"&gt;</computeroutput>.  In some contexts, it
may also be appropriate to use <tag>property</tag> for <tag
condition="v4">structfield</tag>.</entry>
</row>
</tbody>
</tgroup>
</table>

</section>

<section xml:id="editors">
<title>Editing DocBook V5.0</title>

<para>Because DocBook is an XML-based format and XML is a text-based
format, you can use any text editor to create and edit DocBook V5.0
documents. However, using <quote>dumb</quote> editors like Notepad is
not very productive. You will do better if you use an editor that
supports XML. Although there are DTD and W3C XML Schemas available for
DocBook V5.0, which means you can use any editor that works with DTDs
or W3C XML Schemas, we recommend that you use the RELAX NG grammar
with DocBook V5.0. The rest of this section contains an overview of
XML editors (listed in alphabetical order) that are known to work with
RELAX NG schemas and that offer guided editing based on the RELAX NG
schema.</para>

<section xml:id="editors-nxml">
<title>Emacs and nXML</title>

<para><link xl:href="http://www.thaiopensource.com/nxml-mode/">nXML
mode</link> is an add-on for the <application
xl:href="http://www.gnu.org/software/emacs/emacs.html">GNU
Emacs</application> text editor. By installing nXML you can turn Emacs
into a very powerful XML editor that offers guided editing and
validation of XML documents.</para>

<figure xml:id="f.emacs">
<title>Emacs with nXML mode provides guided editing and validation</title>
<mediaobject>
<imageobject>
<imagedata fileref='images/emacs.png'/>
</imageobject>
</mediaobject>
</figure>

<para>nXML uses a special configuration file named
<filename>schemas.xml</filename> to associate schemas with XML
documents. Often you will find this file in the directory
<filename>site-lisp/nxml/schema</filename> inside the Emacs installation
directory. Adding the following line into the configuration file,
will associate DocBook V5.0 elements with the appropriate
schema:</para>

<programlisting>&lt;namespace ns="http://docbook.org/ns/docbook" uri="<replaceable>/path/to/</replaceable>docbook.rnc"/></programlisting>

<para>If you can't edit the global <filename>schemas.xml</filename> file,
you can create this file in the same directory as your document. nXML will
find associations placed there also. In this case you must create a
complete configuration file like:</para>

<programlisting>&lt;locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
  &lt;namespace ns="http://docbook.org/ns/docbook" uri="<replaceable>/path/to/</replaceable>docbook.rnc"/>
&lt;/locatingRules></programlisting>

</section>

<section>
<title>oXygen</title>

<para><application
xl:href="http://www.oxygenxml.com/">oXygen</application> is a feature
rich XML editor. It has built-in support for many schema languages
including RELAX NG. It comes preconfigured with DocBook support.</para>

<figure xml:id="f.oxygen.open5">
<title>DocBook V5.0 document opened in oXygen</title>
<mediaobject>
<imageobject>
<imagedata fileref='images/oxygen3.png' width="100%"/>
</imageobject>
</mediaobject>
</figure>

</section>

<section>
<title>XML Mind XML editor</title>

<para><application xl:href="http://www.xmlmind.com/xmleditor/">XML
Mind XML editor</application> (XXE) is a visual validating XML editor that
provides a wordprocessor-like interface to users. It is available in
two versions, Standard and Professional. The Standard version is free and
provides everything you need to edit DocBook V5.0 documents.</para>

<figure>
<title>XML Mind XML Editor – feels almost like MS Word but real DocBook V5.0 markup is created</title>
<mediaobject>
<imageobject>
<imagedata fileref='images/xxe.png' width="100%"/>
</imageobject>
</mediaobject>
</figure>

<para>In order to use DocBook V5.0 in XXE you have to install
an add-on. Go to
<menuchoice><guimenu>Options</guimenu><guimenuitem>Install
Add-ons…</guimenuitem></menuchoice>. Then choose <guilabel>DocBook
5 configuration</guilabel> and press the <guibutton>OK</guibutton>
button. After restart, XXE is ready to work with DocBook V5.0
documents.</para>

</section>

</section>

<section xml:id="customizations">
<title>Customizations</title>

<para>You can reference elements with <tag
class="attribute">xml:id</tag> using <tag>xref</tag> element, like
<xref linkend="customizations"/>.</para>

</section>

<section>
<title>Conclusion</title>

<para>You should finish your article with references. You can easily
cite references from you article using <tag>citation</tag> element,
like <citation>RNCTUT</citation>.</para>

</section>

<bibliography xml:id="references">

<bibliomixed>
<abbrev>RNCTUT</abbrev>
Clark, James – Cowan, John – MURATA, Makoto: <title>RELAX NG Compact Syntax Tutorial</title>.
Working Draft, 26 March 2003. OASIS. <bibliomisc><link xl:href="http://relaxng.org/compact-tutorial-20030326.html"/></bibliomisc>
</bibliomixed>

<bibliomixed>
<abbrev>NVDLTUT</abbrev>
Nálevka, Petr:
<title>NVDL Tutorial</title>.
<bibliomisc><link xl:href="http://jnvdl.sourceforge.net/tutorial.html"/></bibliomisc>
</bibliomixed>

<bibliomixed>
<abbrev>XMLID</abbrev>
Marsh, Jonathan – 
Veillard, Daniel –
Walsh, Norman: <title>xml:id Version 1.0</title>. W3C Recommendation, 9 September 2005. <bibliomisc><link xl:href="http://www.w3.org/TR/xml-id/"/></bibliomisc>
</bibliomixed>

<bibliomixed>
<abbrev>DB5SPEC</abbrev>
Norman, Walsh: <title>The DocBook Schema</title>.
Working Draft 5.0a1, OASIS, 29 June 2005.
<bibliomisc><link xl:href="http://www.docbook.org/specs/wd-docbook-docbook-5.0a1.html"/></bibliomisc>
</bibliomixed>

</bibliography>

</article>