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:
• names of any formats to which you have not assigned a CSS class name:
– in the [ParaClasses] or [CharClasses] section
– in any other configuration-file section.
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 graphic anchor format to a class.
To map all CSS class names to XML tags (the default for XML output):
; ClassIsTag = No (default for HTML/XHTML)
; or Yes (default for Generic XML)
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.
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:
; GraphClass = class name to use for paras created to hold <img> tags
The following setting causes CSS entries to explicitly include all four margin values, even if some are zero:
; ZeroCSSMargins = No (default)
; or Yes (specify CSS margins even if zero)
> 14 Converting to generic XML > 14.4 Providing XML tags and structure > 14.4.2 Deriving XML tags from format and class names