# DocBook to HTML - Block Elements

This module handles most simple block-level elements, turning them into the appropriate HTML tags. It does not handle tables, lists, and various other complex block-level elements.

## Templates

`db2html.block`

  Renders a block-level element to an HTML `div` tag

`db2html.block.title`

  Renders a formal title for a block-level element

`db2html.blockquote`

  Renders a `blockquote` element to HTML

`db2html.para`

  Renders a block-level element as an HTML `p` element

`db2html.pre`

  Renders a block-level element as an HTML `pre` element

## `db2html.block`

Renders a block-level element to an HTML `div` tag

### Parameters

`node`

  The block-level element to render

`class`

  An extra string to insert in the `class` attribute

`first`

  Whether this is the first child block in the parent

`indent`

  Whether this block should be indented

`verbatim`

  Whether to maintain whitespace as written

`formal`

  Whether this is a formal block element

`title`

  When `formal` is true, an element to use for the title

`caption`

  When `formal` is true, an element to use for the caption

`lang`

  The locale of the text in `node`

`dir`

  The text direction, either `ltr` or `rtl`

`ltr`

  Whether to default to `ltr` if neither `lang` nor `dir` is specified

### Description

This template creates an HTML `div` element for the given DocBook element. This template uses the parameters to construct the `class` attribute, which is then used by the CSS for styling.

## `db2html.block.title`

Renders a formal title for a block-level element

### Parameters

`node`

  The block-level element being processed

`title`

  The element containing the title

`lang`

  The locale of the text in `title`

`dir`

  The text direction, either `ltr` or `rtl`

`ltr`

  Whether to default to `ltr` if neither `lang` nor `dir` is specified

### Description

This template formats the contents of `title` as a title for a block-level element. It is called by `db2html.block` for formal block elements.

## `db2html.blockquote`

Renders a `blockquote` element to HTML

### Parameters

`node`

  The `blockquote` element to render

`first`

  Whether this is the first child block in the parent

`lang`

  The locale of the text in `node`

`dir`

  The text direction, either `ltr` or `rtl`

`ltr`

  Whether to default to `ltr` if neither `lang` nor `dir` is specified

### Description

This template creates an HTML `blockquote` element for the given DocBook element.

## `db2html.para`

Renders a block-level element as an HTML `p` element

### Parameters

`node`

  The block-level element to render

`first`

  Whether this is the first child block in the parent

`lang`

  The locale of the text in `node`

`dir`

  The text direction, either `ltr` or `rtl`

`ltr`

  Whether to default to `ltr` if neither `lang` nor `dir` is specified

### Description

This template creates an HTML `p` element for the given DocBook element.

## `db2html.pre`

Renders a block-level element as an HTML `pre` element

### Parameters

`node`

  The block-level element to render

`class`

  An extra string to insert in the `class` attribute

`first`

  Whether this is the first child block in the parent

`indent`

  Whether this block should be indented

`children`

  The child elements to process

`lang`

  The locale of the text in `node`

`dir`

  The text direction, either `ltr` or `rtl`

`ltr`

  Whether to default to `ltr` if neither `lang` nor `dir` is specified

### Description

This template creates an HTML `pre` element for the given DocBook element. This template uses the parameters to construct the `class` attribute, which is then used by the CSS for styling.

If `node` has the `linenumbering` attribute set to `"numbered"`, then this template will create line numbers for each line, using the `db.linenumbering` template.