#### 23.3.2 Eliminating HTML attributes and tags for generic XML

You can use configuration settings to eliminate the following HTML tags and attributes:

Paragraph tags

Table attributes

Graphics tags and attributes

Paragraph tags

Use either of the following methods to make HTML <p>...</p> tags go away:

- Best: supply your own XML tags in [ParaTags]; see §30.2.1 Assigning HTML tags and attributes to paragraph formats
- Use the NoPara property in [HTMLParaStyles]; see §30.2.4 Stripping paragraph properties.

Table attributes

By default, when you specify XML as the output type, DITA2Go refrains from automatically generating HTML table and cell attributes (see §33.4.1 Specifying attributes for all tables), while preserving any attributes you add specifically for XML in the configuration file or in PI markers:

    [Tables]
    ; TableAttributes = Yes (HTML default, to allow automatically
    ;  generated border, cellspacing, cellpadding, or No (XML default,
    ;  to exclude those while keeping any attributes explicitly added
    ;  in the .ini or in markers)
    TableAttributes=No

By default, DITA2Go places &nbsp; in each table cell that would otherwise be empty (either because the cell contained only an empty paragraph, or because another configuration setting eliminated the content). This is because some browsers do not render correctly the borders, margins, and padding of a completely empty cell. To suppress this feature:

    [Tables]
    EmptyTbCellContent=

The empty value eliminates the &nbsp;. Or, you can specify any other content; see §33.4.10 Deciding what to do with empty paragraphs in table cells. However, a better approach would be to define common entities such as &nbsp; in your XML DTD; see §22.3 Including starting code and entity references.

Graphics tags and attributes

To eliminate width and height attributes from images:

    [Graphics]
    ; GraphScale = Yes to put out width and height attributes,
    ;  or No to eliminate them all (default for Generic XML)
    GraphScale = No

If you do not specify any setting for GraphScale, you get the correct default for either HTML or XML.

To eliminate paragraph tags around graphics:

    [Graphics]
    ; GraphWrapPara = Yes (default, wrap graphics that are not inline in
    ; paragraph tags) or No (eliminate wrapping tags)
    GraphWrapPara = No

Previous Topic: 23.3.1 Deriving XML tags from format and class names

Next Topic: 23.3.3 Including or excluding autonumbers

Parent Topic: 23.3 Providing XML tags and structure

Sibling Topics:

23.3.1 Deriving XML tags from format and class names

23.3.3 Including or excluding autonumbers

Table of Contents • Index