# DocBook Common

This stylesheet module provides utility templates for DocBook that are independant of the target format.

Templates

`db.copyright`

  Outputs copyright information

`db.linenumbering`

  Numbers each line in a verbatim environment

`db.linenumbering.start`

  Determines the starting line number for a verbatim element

`db.orderedlist.start`

  Determines the number to use for the first `listitem` in an `orderedlist`

`db.personname`

  Outputs the name of a person

`db.personname.list`

  Outputs a list of people's names

`db.copyright` Outputs copyright information

### Parameters

node

  The `copyright` element to format

### Description

This template outputs copyright information from a `copyright` elements. It assembles the `year` and `holder` elements into a simple copyright notice, beginning with the copyright symbol "©".

db.copyright
`db.linenumbering` Numbers each line in a verbatim environment

### Parameters

node

  The verbatim element to create the line numbering for

number

  The starting line number

### Description

This template outputs a string with line numbers for each line in a verbatim elements. Each line number is on its own line, allowing the output string to be placed to the side of the verbatim output.

db.linenumbering
`db.linenumbering.start` Determines the starting line number for a verbatim element

### Parameters

node

  The verbatim element to determine the starting line number for

### Description

This template determines the starting line number for a verbatim element using the `continuation` attribute. The template finds the first preceding element of the same name, counts its lines, and handles any `startinglinenumber` or `continuation` element it finds on that element.

db.linenumbering.start
`db.orderedlist.start` Determines the number to use for the first `listitem` in an `orderedlist`

### Parameters

node

  The `orderedlist` element to use

### Description

This template determines the starting number for an `orderedlist` element using the `continuation` attribute. Thi template finds the first preceding `orderedlist` element and counts its list items. If that element also uses the `continuation`, this template calls itself recursively to add that element's starting line number to its list item count.

db.orderedlist.start
`db.personname` Outputs the name of a person

### Parameters

node

  The element containing tags such as `firstname` and `surname`

lang

  The language rules to use to construct the name

### Description

This template outputs the name of a person as modelled by the `personname` element. The `personname` element allows authors to mark up components of a person's name, such as the person's first name and surname. This template assembles those into a string.

db.personname
`db.personname.list` Outputs a list of people's names

### Parameters

nodes

  The elements containing tags such as `firstname` and `surname`

lang

  The language rules to use to construct the list of names

### Description

This template outputs a list of names of people as modelled by the `personname` element. The `personname` element allows authors to mark up components of a person's name, such as the person's first name and surname. This template makes a list formatted according to the locale set in lang and calls the template `db.personname` for each element in nodes.

db.personname.list