packagesynopsis — The syntax summary for a package definition.


packagesynopsis ::=


Common attributes and common linking attributes.

Additional attributes:

  • language
  • packageref

Additional Constraints

  • If this element is the root element, it must have a version attribute.


A packagesynopsis contains the syntax summary of a programming language “package”. In some languages (e.g., C#), what DocBook chooses to identify with the packagesynopsis tag is referred to as a namespace. This is to avoid confusion with the XML concept of “namespace”, and because other languages (e.g., Java) call these things packages.

Packages, in this sense, are generally wrappers (either explicitly or implicitly) for a collection of classes, methods, functions, etc.

Processing expectations

For the most part, the processing application is expected to generate all of the parentheses, semicolons, commas, and so on required in the rendered synopsis.


Common attributes and common linking attributes.

any attribute

Any attribute in any other explicit namespace


Identifies the language (i.e. programming language) of the content


Identifies the package to which this synopsis (logically) belongs


These elements contain packagesynopsis: abstract, acknowledgements, annotation, answer, appendix, article, bibliodiv, bibliography, bibliolist, blockquote, callout, calloutlist, caption (db.caption), caution, chapter, colophon, constraintdef, cover, danger, dedication, entry, example, figure, footnote, glossary, glossdef, glossdiv, glosslist, important, index, indexdiv, informalexample, informalfigure, itemizedlist, legalnotice, listitem, meta (db.meta.content), msgexplan, msgtext, note, orderedlist, packagesynopsis, para, partintro, preface, procedure, qandadiv, qandaset, question, refsect1, refsect2, refsect3, refsection, refsynopsisdiv, result, revdescription, sect1, sect2, sect3, sect4, sect5, section, setindex, sidebar, simplesect, step, taskprerequisites, taskrelated, tasksummary, td, textobject, th, tip, toc, tocdiv, topic, variablelist, warning.


The following elements occur in packagesynopsis: classsynopsis, cmdsynopsis, constructorsynopsis, destructorsynopsis, enumsynopsis, fieldsynopsis, funcsynopsis, info (db.titleforbidden.info), macrosynopsis, methodsynopsis, modifier, package, packagesynopsis, synopsisinfo, typedefsynopsis, unionsynopsis.


A Java package containing a single class.

 1 |<packagesynopsis xmlns="http://docbook.org/ns/docbook" version="5.0"
   |                language="java">
 5 |<ooclass>
10 |<modifier>public</modifier>
15 |<initializer>0</initializer>
20 |<void/>
25 |<methodname>dwim</methodname>
30 |</methodsynopsis>
package org.example.packages;
public class MyClass {
  public static final int BASE = 0;
  public MyClass();
  public dwim(int scope);