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.2 Deriving XML tags from format and class names


14.4.2 Deriving XML tags from format and class names

To aid in mapping formats to elements for XML output from an unstructured document, by default Mif2Go uses the following for XML tags:

all CSS class names

names of any formats to which you have not assigned a CSS class name:

in CSS

in the [ParaClasses] or [CharClasses] section

in any other configuration-file section.

Only catalogued formats

For format mapping to work, all character and paragraph format names must be present in the FrameMaker catalog for the file you are converting, including names of any character formats that are used only in FrameMaker marker text.

To produce valid XML, Mif2Go converts all tags to valid CSS names, without spaces, non-alphanumeric characters, leading digits, or accented characters (which become unaccented).

Paragraph and character tags and attributes

Mif2Go uses any tags and attributes you assign in configuration sections [ParaTags] and [CharTags]; see §21.3.1 Assigning HTML tags and attributes to paragraph formats. To apply an attribute to an individual paragraph or character span, insert an attribute marker in the instance; see §29.2.3 Understanding attribute markers.

You can specify which names to use for XML tags in any or all of the following ways:

Map class names to XML tags

Map format names to classes

Map graphic anchor format to a class.

Map class names to XML tags

To map all CSS class names to XML tags (the default for XML output):

[CSS]

; ClassIsTag = No (default for HTML/XHTML)

;  or Yes (default for Generic XML)

ClassIsTag=Yes

When ClassIsTag=Yes, any class names you assigned to formats in the [ParaTags] and [CharTags] sections become XML tags; see §22.5 Understanding how CSS affects other options. If ClassIsTag=Yes, also specify [CSS]WriteClassAttributes=No; see §22.4.2 Specifying CSS options in a Mif2Go configuration file.

Map format names to classes

To explicitly map individual format names to class names:

[ParaClasses] or [CharClasses]

; Format name = class to use (default is based on name)

; For XML, the class is used as the tag name by default.

Map graphic anchor format to a class

If your document uses a special paragraph format to anchor graphics, you can specify a class name for the format with the following setting:

[Graphics]

; GraphClass = class name to use for paras created to hold <img> tags

GraphClass=graphic

Specify all margins in CSS

The following setting causes CSS entries to explicitly include all four margin values, even if some are zero:

[CSS]

; ZeroCSSMargins = No (default)

;  or Yes (specify CSS margins even if zero)

ZeroCSSMargins=Yes



14 Converting to generic XML > 14.4 Providing XML tags and structure > 14.4.2 Deriving XML tags from format and class names