#### 23.3.1 Deriving XML tags from format and class names

To aid in mapping formats to elements for XML output from an unstructured document, by default DITA2Go 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 an outputclass attribute
  - in CSS
  - in the [ParaClasses] or [CharClasses] section
  - in any other configuration-file section.

To produce valid XML, DITA2Go 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

DITA2Go uses any tags and attributes you assign in configuration sections [ParaTags] and [CharTags]; see §30.2.1 Assigning HTML tags and attributes to paragraph formats. To apply an attribute to an individual paragraph or character span, insert an attribute PI marker in the instance; see §38.1 Understanding DITA2Go PI 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 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 §31.5 Understanding how CSS affects other options. If ClassIsTag=Yes, also specify [CSS]WriteClassAttributes=No; see §31.4.1 Specifying CSS options in a DITA2Go 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.

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

Previous Topic: 23.3 Providing XML tags and structure

Next Topic: 23.3.2 Eliminating HTML attributes and tags for generic XML

Parent Topic: 23.3 Providing XML tags and structure

Sibling Topics:

23.3.2 Eliminating HTML attributes and tags for generic XML

23.3.3 Including or excluding autonumbers