Examples
These examples are not exhaustive—they do not contain
all the elements that might be desirable to use, particularly in a
document's front matter. For more examples of DocBook markup,
examine the XML source for this and other
documents available in the Subversion
doc repository, or available online starting at
http://svnweb.FreeBSD.org/doc/.
DocBook book
DocBook book
<!DOCTYPE book PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN"
"http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd">
book xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:lang="en"
info
titleAn Example Booktitle
author
personname
firstnameYour first namefirstname
surnameYour surnamesurname
personname
affiliation
address
emailfoo@example.comemail
address
affiliation
author
copyright
year2000year
holderCopyright string hereholder
copyright
abstract
paraIf your book has an abstract then it should go here.para
abstract
info
preface
titlePrefacetitle
paraYour book may have a preface, in which case it should be placed
here.para
preface
chapter
titleMy First Chaptertitle
paraThis is the first chapter in my book.para
sect1
titleMy First Sectiontitle
paraThis is the first section in my book.para
sect1
chapter
book
DocBook article
DocBook article
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN"
"http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd">
article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:lang="en"
info
titleAn Example Articletitle
author
personname
firstnameYour first namefirstname
surnameYour surnamesurname
personname
affiliation
address
emailfoo@example.comemail
address
affiliation
author
copyright
year2000year
holderCopyright string hereholder
copyright
abstract
paraIf your article has an abstract then it should go here.para
abstract
info
sect1
titleMy First Sectiontitle
paraThis is the first section in my article.para
sect2
titleMy First Sub-Sectiontitle
paraThis is the first sub-section in my article.para
sect2
sect1
article