Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

21 Mapping text formats to HTML/XML > 21.4 Mapping character formats


21.4 Mapping character formats

You can specify HTML tags to be used for character formats; for example:

[CharTags]

; Document character format name = HTML starting element name(s)

; use strong, em, code, cite, var, or blink, or span for HTML elements

Emphasis=strong

ProgramListing=code

Although the format properties listed here are the only valid HTML styles, Mif2Go lets you specify any tag, to permit XML markup and CSS span class assignments. However, only valid HTML tags have an effect in Mif2Go HTML output.

For XHTML, all format names must be lowercase.

Include attributes

To add attributes to a character tag, list them after the tag. For example:

[CharTags]

Bold = strong type="bold"

Everything after the first space is removed for the end tag. To apply an attribute to an individual instance of a character format, insert an attribute marker in the character span; see §29.2.4 Using attribute markers for HTML or XML. For this example, you would use a marker of type CharType with content bold (no quotation marks).

If no tags are specified in [CharTags] for a particular character format, by default that format gets a span class; see §22.7.3 Mapping character formats to tags or span classes.

Suppress tags

To eliminate style tags entirely, map the character format to nothing:

[CharTags]

CharFmt =

See also:

§14.4.2 Deriving XML tags from format and class names

§22.7.3 Mapping character formats to tags or span classes



21 Mapping text formats to HTML/XML > 21.4 Mapping character formats