The
stylesheet format allows you to add
styling information that only applies to secondary output formats. Style
overrides are contained in the optional <convert>
element in a mapping. This element is not supported by the
Mapping Editor and
can only be added by editing the mappings.tlx
file.
The convert element has a single optional attribute called
format
. If this is present, the information only applies
when creating output for the format matching the attribute value. If no
attribute is present the information will apply to all secondary output
formats. If an override for a specific format is found any override without a
format specified is ignored.
The child elements of the convert element are used to replace the
attribute values of elements with a matching name in the mapping. If there is
no matching element in the mapping, the override is ignored. Overrides are
allowed for the para
, font
,
table-style
and box-style
elements.
For example, consider the following mapping:
<mapping path="title"> <para align="left" before-space="24.0pt"/> <font size="16.0pt" bold="yes"/> <convert format="html"> <font size="14.0pt" italic="yes"/> </convert> <convert> <font size="12.0pt" color="blue"/> <para align="center"/> </convert> </mapping>
When creating html
format output, the
font
override in the first <convert>
element will be applied and the font
override in the second
<convert> element will be ignored. The
para
override from the second
<convert> element will be applied. The output will be
styled as if the mapping were:
<mapping path="title"> <para align="center" before-space="24.0pt"/> <font size="14.0pt" italic="yes" bold="yes"/> </mapping>
For other output formats only the second <convert> element overrides will be applied, and the output will be as if the mapping were:
<mapping path="title"> <para align="center" before-space="24.0pt"/> <font size="12.0pt" color="blue" bold="yes"/> </mapping>