[5.1 Assembly]transform

transform — Identifies a transform for converting from a non-DocBook schema.

Synopsis

transform ::=

  • empty

Attributes

Common attributes.

Additional attributes:

  • Exactly one of:
    • grammar
    • name (NMTOKEN)
  • href (anyURI)

Required attributes are shown in bold.

Description

A transform specifies a mechanism for converting one format into another during the assembly process. A transform can be applied in two different ways: to convert non-DocBook content to DocBook, or to transform DocBook content into a different instance of DocBook. In either case, the transformation identified by the href attribute is applied.

If the grammar attribute is specified, then the transform is applied to any resource elements with a matching grammar attribute. In this way, a document in some other schema can be transformed into DocBook during assembly.

If the name attribute is specified instead, then the transform is applied to any module whose output element includes a transform attribute whose value matches the name. This allows the content of a resource to be filtered or rearranged before being output to the assembled DocBook document.

Processing expectations

Never rendered.

Attributes

Common attributes.

grammar

Identifies the markup grammar of a resource

href

Indentifies the location of the data by URI

name

The name of the transform

Parents

These elements contain transform: transforms.

Examples

This example would apply the dita2docbook.xsl transform to any resources that have a grammar attribute of “dita”.

<transform grammar="dita" href="dita2docbook.xsl"/>

This example would apply the flatten-sections.xsl transform to the content of any module that has an output child element that includes a transform attribute with the value “flatten”.

<transform name="flatten" href="flatten-sections.xsl"/>