Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

14 Converting to generic XML > 14.4 Providing XML tags and structure > 14.4.3 Eliminating HTML attributes and tags for generic XML


14.4.3 Eliminating HTML attributes and tags for generic XML

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

Paragraph tags

Character tags in markers

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 §21.3.1 Assigning HTML tags and attributes to paragraph formats

Use the NoPara property in [HTMLParaStyles]; see §21.3.6 Stripping paragraph properties.

Character tags in markers

If you are converting index markers or other FrameMaker markers that contain character formatting, you can use a Mif2Go macro to skip the character formats; see §14.8.2.5 Stripping character formats from index entries.

Table attributes

By default, when you specify XML as the output type, Mif2Go refrains from automatically generating HTML table and cell attributes (see §24.4.1 Specifying attributes for all tables), while preserving any attributes you add specifically for XML in the configuration file or in 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

; CellAlignAttributes = Yes (HTML default) or No (XML default, to

;  eliminate automatically generated align and valign)

CellAlignAttributes=No

; CellColorAttributes = Yes (HTML default) or No (XML default, to

;  eliminate automatically generated bgcolor)

CellColorAttributes=No

See §24.4.7 Eliminating automatically generated attributes.

By default, Mif2Go places &nbsp; in each table cell that would otherwise be empty (either because the cell contained only an empty paragraph in FrameMaker, 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 §24.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 §13.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



14 Converting to generic XML > 14.4 Providing XML tags and structure > 14.4.3 Eliminating HTML attributes and tags for generic XML