# DocBook Chunking

Describe this module

Parameters

db.chunk.chunks

  A space-seperated list of the names of elements that should be chunked

db.chunk.chunk_top

  Whether the top-level chunk should be output with the chunking mechanism

db.chunk.max_depth

  The maximum depth for chunking sections

db.chunk.basename

  The base filename of the output file, without an extension

db.chunk.extension

  The default file extension for new output documents

db.chunk.info_chunk

  Whether to create a chunk for the title page

db.chunk.info_basename

  The base filename for the title page

db.chunk.doctype_public

  The public DOCTYPE for output files

db.chunk.doctype_system

  The system DOCTYPE for output files

Modes

`db.chunk.info.content.mode`

  Renders the contents of the title page

`db.chunk.content.mode`

  Renders the entire contents of the chunk

Templates

`db.chunk`

  Creates a new page of output

`db.chunk.content`

  Creates the content of a new page of output

`db.chunk.children`

  Creates new output pages for the children of an element

`db.chunk.depth-in-chunk`

  Determines the depth of an element in the containing chunk

`db.chunk.depth-of-chunk`

  Determines the depth of teh containing chunk in the document

`db.chunk.chunk-id`

  Determines the id of the chunk that contains an element

`db.chunk.chunk-id.axis`

  Determines the id of the first chunk along a specified axis

db.chunk.chunks A space-seperated list of the names of elements that should be chunked

### Description

This parameter sucks
db.chunk.chunks
db.chunk.chunk_top Whether the top-level chunk should be output with the chunking mechanism

### Description

Describe what this does
db.chunk.chunk_top
db.chunk.max_depth The maximum depth for chunking sections

### Description

Describe what this does
db.chunk.max_depth
db.chunk.basename The base filename of the output file, without an extension

### Description

Describe what this does
db.chunk.basename
db.chunk.extension The default file extension for new output documents

### Description

Describe what this does
db.chunk.extension
db.chunk.info_chunk Whether to create a chunk for the title page

### Description

Describe what this does
db.chunk.info_chunk
db.chunk.info_basename The base filename for the title page

### Description

Describe what this does
db.chunk.info_basename
db.chunk.doctype_public The public DOCTYPE for output files

### Description

Describe this
db.chunk.doctype_public
db.chunk.doctype_system The system DOCTYPE for output files

### Description

Describe this
db.chunk.doctype_system
`db.chunk.info.content.mode` Renders the contents of the title page

### Parameters

depth_in_chunk

  The depth of the element in the containing chunk

depth_of_chunk

  The depth of the containing chunk in the document

### Description

When processed in this mode, a division element should output the top-level markup for the output page.

db.chunk.info.content.mode
`db.chunk.content.mode` Renders the entire contents of the chunk

### Parameters

depth_in_chunk

  The depth of the element in the containing chunk

depth_of_chunk

  The depth of the containing chunk in the document

### Description

When processed in this mode, a division element should output the top-level markup for the output page.

db.chunk.content.mode
`db.chunk` Creates a new page of output

### Parameters

node

  The source element for the output page

template

  The named template to call to create the page

href

  The name of the file for the output page

depth_of_chunk

  The depth of this chunk in the document

### Description

We need a lot more explanation about chunk flow

The `db.chunk` template creates a new output document using the `exsl:document` extension element. This template calls `db.chunk.content` to create the content of the document, passing through all parameters. This allows you to override the chunking mechanism without having to duplicate the content-generation code.

db.chunk
`db.chunk.content` Creates the content of a new page of output

### Parameters

node

  The source element for the output page

template

  The named template to call to create the page

depth_of_chunk

  The depth of this chunk in the document

### Description

We need a lot more explanation about chunk flow

The `db.chunk.content` template creates the actual content of a new output page. It should generally only be called by `db.chunk`.

This template will always pass the depth_in_chunk and depth_of_chunk parameters with appropriate values to the templates it calls.

db.chunk.content
`db.chunk.children` Creates new output pages for the children of an element

### Parameters

node

  The parent element whose children will be chunked

depth_of_chunk

  The depth of node in the document

### Description

We need a lot more explanation about chunk flow
db.chunk.children
`db.chunk.depth-in-chunk` Determines the depth of an element in the containing chunk

### Parameters

node

  The element to determine the depth of

### Description

Explain how this works
db.chunk.depth-in-chunk
`db.chunk.depth-of-chunk` Determines the depth of teh containing chunk in the document

### Parameters

node

  The element to determine the depth of

### Description

Explain how this works
db.chunk.depth-of-chunk
`db.chunk.chunk-id` Determines the id of the chunk that contains an element

### Parameters

id

  The id of the element to determine the chunk id of

node

  The element to determine the chunk id of

depth_in_chunk

  The depth of node in the containing chunk

### Description

Explain how this works
db.chunk.chunk-id
`db.chunk.chunk-id.axis` Determines the id of the first chunk along a specified axis

### Parameters

node

  The base element

node

  The axis along which to find the first chunk

depth_in_chunk

  The depth of node in the containing chunk

depth_of_chunk

  The depth of the containing chunk in the document

### Description

Explain how this works, and what the axes are
db.chunk.chunk-id.axis