digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Business

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

DocBook
Filename extension .dbk, .xml
Internet media type application/docbook+xml
Developed by OASIS
Type of format markup language
Extended from SGML, XML
Standard(s)

4.5 (June 2006),

5.0 (November 2009)

DocBook is a semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software but it can be used for any other sort of documentation.[1]

As a semantic language, DocBook enables its users to create document content in a presentation-neutral form that captures the logical structure of the content; that content can then be published in a variety of formats, including HTML, XHTML, EPUB, PDF, man pages, Web help[2] and HTML Help, without requiring users to make any changes to the source.

Contents

Overview [edit]

DocBook is an XML language. In its current version (5.x), DocBook's language is formally defined by a RELAX NG schema with integrated Schematron rules. (There are also W3C XML Schema+Schematron and Document Type Definition (DTD) versions of the schema available, but these are considered non-standard.)

As a semantic language, DocBook documents do not describe what their contents "look like," but rather the meaning of those contents. For example, rather than explaining how the abstract for an article might be visually formatted, DocBook simply says that a particular section is an abstract. It is up to an external processing tool or application to decide where on a page the abstract should go and what it should look like or whether or not it should be included in the final output at all.

DocBook provides a vast number of semantic element tags. They are divided into three broad categories: structural, block-level, and inline.

Structural tags specify broad characteristics of their contents. The book element, for example, specifies that its child elements represent the parts of a book. This includes a title, chapters, glossaries, appendices, and so on. DocBook's structural tags include, but are not limited to:

  • set: a titled collection of one or more books. Sets can be nested with other sets.
  • book: a titled collection of chapters, articles, and/or parts, with optional glossaries, appendices, and so forth.
  • part: a titled collection of one or more chapters. Parts can be nested with other parts. May have special introductory text.
  • article: a titled, unnumbered collection of block-level elements.
  • chapter: a titled, numbered collection of block-level elements. DocBook does not actually require that chapters be explicitly given numbers; it is understood by the semantics that the number of a chapter is the number of previous chapter elements in the XML document plus 1.
  • appendix: the contained text represents an appendix.
  • dedication: the text represents the dedication of the contained structural element.

Structural elements can contain other structural elements. Structural elements are the only permitted top-level elements in a DocBook document.

Block-level tags are elements like paragraph, lists, and so forth. Not all of these elements can contain actual text directly. Sequential block-level elements are expected to be rendered one "after" another. After, in this case, can differ depending on the language. In most Western languages, "after" means below: text paragraphs are printed down the page. Other languages' writing systems can have different directionality; for example, in Japanese, text is often printed in columns, with paragraphs running from right to left, so "after" in that case would be to the left. DocBook semantics are entirely neutral to these kinds of language-based concepts.

Inline-level tags are elements like emphasis, hyperlinks, and so forth. They wrap text within a block-level element. These elements do not cause the text to break when rendered in a paragraph format, but typically they cause the document processor to apply some kind of distinct typographical treatment to the enclosed text, by changing the font, size, or similar attributes. (The DocBook specification does say that it expects different typographical treatment, but it does not offer specific requirements as to what this treatment may be.) That is, it is not required that a DocBook processor transform an emphasis tag into "italics." A reader-based DocBook processor could increase the volume of the words. Or, a text-based processor could use bold instead of italics.

Sample document [edit]

 <?xml version="1.0" encoding="UTF-8"?>
 <book xml:id="simple_book" xmlns="http://docbook.org/ns/docbook" version="5.0">
   <title>Very simple book</title>
   <chapter xml:id="chapter_1">
     <title>Chapter 1</title>
     <para>Hello world!</para>
     <para>I hope that your day is proceeding <emphasis>splendidly</emphasis>!</para>
   </chapter>
   <chapter xml:id="chapter_2">
     <title>Chapter 2</title>
     <para>Hello again, world!</para>
   </chapter>
 </book>

Semantically, this document is a "book," with a "title," that contains two "chapters" each with their own "titles." Those "chapters" contain "paragraphs" that have text in them. The markup is fairly readable in English.

In more detail, the root element of the document is book. All DocBook elements are in an XML Namespace, so the root element has an xmlns attribute to set the current namespace. Also, the root element of a DocBook document must have a version that specifies the version of the format that the document is built on.

(XML documents can include elements from multiple namespaces at once. For simplicity, the example does not illustrate this.)

A book element must contain a title, or an info element containing a title. This must be before any child structural elements. Following the title are the structural children, in this case, two chapter elements. Each of these must have a title. They contain para block elements, which can contain free text and other inline elements like the emphasis in the second paragraph of the first chapter.

Schemas and validation [edit]

Rules such as the ones alluded to in the preceding paragraph ("a book element must contain a title, or an info element containing a title," etc.) are formally defined in the DocBook schema. Appropriate programming tools can be used to validate an XML document (DocBook or otherwise), against its corresponding schema, in order to determine if (and if so, where) the document fails to conform to that schema. XML editing tools can also use schema information to avoid creating non-conforming documents in the first place.

DocBook authoring [edit]

Because DocBook is XML, documents can be created and edited with any text editor. A dedicated XML editor is likewise a functional DocBook editor. DocBook provides schema files for popular XML schema languages, so any XML editor that can provide content completion based on a schema can do so for DocBook. Many graphical or WYSIWYG XML editors come with the ability to edit DocBook like a word processor.

DocBook processing [edit]

Because DocBook is an XML format, conforming to a well-defined schema, documents can be validated and processed using any tool or programming language that includes XML support.

DocBook files are used to prepare output files in a wide variety of formats. Nearly always, this is accomplished using DocBook XSL stylesheets. These are XSLT stylesheets that transform DocBook documents into a number of formats (HTML, XSL-FO for later conversion into PDF, etc.). These stylesheets can be sophisticated enough to generate tables of contents, glossaries, and indexes. They can oversee the selection of particular designated portions of a master document to produce different versions of the same document (such as a "tutorial" or a "quick-reference guide," where both of these consist of a subset of the material).

Because the standard DocBook XSL stylesheets are well-formed XSL stylesheets, and DocBook is well-formed XML, users can write their own customized stylesheets or even a full-fledged program to process the DocBook into an appropriate output format as their needs dictate.

Web help [edit]

Web help[2] is a chunked HTML output format in the DocBook XSL stylesheets that was introduced in version 1.76.1. The documentation for web help[3] also provides an example of web help and is part of the DocBook XSL distribution. Its major features include CSS-based page layout without frameset, multilingual full content search, table of contents (TOC) pane with collapsible TOC tree, auto-synchronization of content pane and TOC. This web help format was originally implemented by Kasun Gajasinghe and David Cramer as part of the Google Summer of Code 2010 program.[4]

History [edit]

DocBook began in 1991 in discussion groups on Usenet and eventually became a joint project of HAL Computer Systems and O'Reilly & Associates and eventually spawned its own maintenance organization (the Davenport Group) before moving in 1998 to the SGML Open consortium, which subsequently became OASIS. DocBook is currently maintained by the DocBook Technical Committee at OASIS.[5]

DocBook is available in both SGML and XML forms, as a DTD. RELAX NG and W3C XML Schema forms of the XML version are available. Starting with DocBook 5, the RELAX NG version is the "normative" form from which the other formats are generated.

DocBook originally started out as an SGML application, but an equivalent XML application was developed and has now replaced the SGML one for most uses. (Starting with version 4 of the SGML DTD, the XML DTD continued with this version numbering scheme.) Initially, a key group of software companies used DocBook since their representatives were involved in its initial design. Eventually, however, DocBook was adopted by the open source community where it has become a standard for creating documentation for many projects, including FreeBSD, KDE, GNOME desktop documentation, the GTK+ API references, the Linux kernel documentation, and the work of the Linux Documentation Project.

Norman Walsh and the DocBook Project development team maintain the key application for producing output from DocBook source documents: A set of XSL stylesheets (as well as a legacy set of DSSSL stylesheets) that can generate high-quality HTML and print (FO/PDF) output, as well as output in other formats, including RTF, man pages and HTML Help.

Walsh is also the principal author of the book DocBook: The Definitive Guide, the official documentation of DocBook. This book is available online under the GFDL, and also as a print publication.

Pre DocBook v5.0 [edit]

The current version of DocBook, 5.1, is fairly recent. Prior versions have been and still are in widespread use, so this section provides an overview of the changes to the older 4.x formats.

Until DocBook 5, DocBook was defined normatively by a Document Type Definition (DTD). Since DocBook was built originally as an application of SGML, the DTD was the only available schema language. DocBook 4.x formats can be SGML or XML, but the XML version does not have its own namespace.

As an outgrowth of being defined by a DTD, DocBook 4.x formats were required to live within the restrictions of being defined by a DTD. The most significant for the language being that an element name uniquely defines its possible contents. That is, an element named info must contain the same information no matter where it is in the DocBook file. As such, there are many kinds of info elements in DocBook 4.x: bookinfo, chapterinfo, etc. Each of them has a slightly different content model, but they do share some of their content model. Additionally, they repeat context information. The book's info element is that because it is a direct child of the book; it does not need to be named specially for a human reader. However, because the format was defined by a DTD, it did have to be named as such.

The root element does not have or need a version, as the version is built into the DTD declaration at the top of a pre-DocBook 5 document.

DocBook 4.x documents are not compatible with DocBook 5, but they can be converted into DocBook 5 documents through the use of an XSLT stylesheet. One is provided as part of the distribution of the DocBook 5 schema and specification package.

Simplified DocBook [edit]

DocBook offers a large number of features that may be overwhelming to a new user. For those who want the convenience of DocBook without a steep learning curve, Simplified DocBook was designed. It is a small subset of DocBook designed for single documents such as articles or white papers (i.e., "books" are not supported). The Simplified DocBook DTD is currently at version 1.1.[6]

See also [edit]

References [edit]

Further reading [edit]

External links [edit]


Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/DocBook — Please support Wikipedia.
A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
384 videos foundNext > 

DocBook

DocBook.

DocBook Video Tutorial 2 - DocBook to PDF with Xcode and XMLLINT

In this tutorial you will learn: ▫ Downloading DocBook Documentation ▫ Writing DocBook in Xcode ▫ Validating DocBook XMLs ▫ Generating PDF from DocBook XMLs ...

DocBook Video Tutorial 1 Setting up Xcode 4 and SVN

This is the first video in the series of 4 videos that I'm preparing to teach you how to write books with DocBook. In this video you will learn how to hook y...

oXygen XML Editor - DocBook Editing

oXygen XML Editor comes with extensive support for visually editing DocBook documents.

LinuxTag2012: DocBook Publishing and Authoring Made Easy with DAPS

Frank Sundermeyer (openSUSE / SUSE Linux Products GmbH)

Doc's book

Marquette mens basketball head coach Brent Buzz Williams talks about reading Glenn "Doc" Rivers' book.

Corvinus Szocmest DocBook TÁMOP projekt

"A Budapesti Corvinus Egyetem és a Program Produkt Kft szakemberei az Új Magyarország Fejlesztési Terv keretében elkészítettek a szociológia tanszék számára ...

DocBook Import for Confluence

Free DocBook xml Import plugin for Confluence - http://community.jboss.org/wiki/DocBookImportForConfluence. This plugin is submitted in Atlassian Codegeist c...

DocBook Helps with Medical Mission

One of Austin's hottest startup companies was founded by two local doctors. We told you about the app "DocBookMD" in our last hour. Leslie Rhode now shows us...

DocBook, Jak tvořit vnořené odrážky

Toto krátké video ti ukáže jak tvořit odrážky v editoru XMLmind.

384 videos foundNext > 

6 news items

mobihealthnews

mobihealthnews
Wed, 05 Jun 2013 06:40:23 -0700

In April, Austin, Texas-based Docbook partnered with mobile PACS company Medweb to create Docbook Gateway, a software offering with similar functionality to GlobalMed's Capsure Cloud. Docbook's offering leveraged Medweb's existing FDA clearance.
 
TheServerSide.com
Wed, 12 Jun 2013 18:54:58 -0700

Asciidoctor is a pure Ruby processor for converting AsciiDoc source files and strings intoHTML 5, DocBook 4.5 and other formats. Apart of Asciidoctor Ruby part, there is anAsciidoctor-java-integration project which let us call Asciidoctor functions ...

TechShout!

TechShout!
Fri, 07 Jun 2013 07:41:37 -0700

Endowed with a customizable interface, the program also supports integrated and custom export formats like Docbook, MODS, OpenOffice, HTML, BibTeXML and RTF. The multilingual entrant speaks Danish, Chinese, German, Turkish, Indonesian, French ...
 
4-traders (press release)
Thu, 23 May 2013 05:24:31 -0700

Migrate functionality has been extended, with a new DocBook to DITA XML conversion capability released in March. Similarly we continue to develop our core technology, OmniMark, having announced the release of version 10.1 in February. The Company ...
 
PresseBox (Pressemitteilung)
Mon, 17 Jun 2013 22:25:37 -0700

Da die bisherige docbook-Anwendung in FrameMaker auf docbook 4.1.2 basiert und der Umstieg auf docbook5-xml umfangreiche Än-derungen erforderlich gemacht hätte, bestand die Aufgabe von itl, dem Full-Service-Dienstleister für Übersetzung und ...
 
中文IT技术网站
Tue, 21 May 2013 08:53:05 -0700

还有DocBook。或者你可以寻求所见即所得软件,但是要小心。 “自文档化”代码工具:Doxygen是其中最常见的,把你代码里的注释转为文档。Javadoc是专门用于Java的文档工具。 8. 终端和通讯软件:当你需要经由串口通讯时,到 ...
Loading

Oops, we seem to be having trouble contacting Twitter

Talk About DocBook

You can talk about DocBook with people all over the world in our discussions.

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!