em characterstyle, span characterstyle, strong characterstyle

Matches <em>, <span>, <strong> to <CharacterStyle> respectively. In InDesign, character styles are exported to em, span, and strong, with class attribute set as the Style value of the CharacterStyle. However, not all em, span, and strong nodes should be transformed to character styles. In InDesign you cannot have nested CharacterStyle nodes. Therefore, the parse definitions for character styles should only contain attributes that are exact match attributes. For these following nodes, if a parse definition is not found, the StyleParser takes over and converts the html formatting tags to Format node attributes. When parsing from XML to HTML, the Format node is converted to span and the formatting attributes to style attribute values.

Attribute

Description from HTML to XML

Description from XML to HTML

style 1

"characterstyle1" is matched to Style="Character Style 1".

Character Style 1" is matched to class="characterstyle1"

style 2

"characterstyle2" is matched to Style="Character Style 2".

Character Style 2" is matched to class="characterstyle2"

style 3

"characterstyle3" is matched to Style="Character Style 3".

Character Style 3" is matched to class="characterstyle3"

An exact match attribute should be defined for each character style used in InDesign. Character styles that are not defined are skipped and the transformation process continues with the child nodes (text and format).

Also, for the CharacterStyle to match to em or strong tag, the Export Tag property of the Style should be set to em/strong. If the value is not specified, span is used by default.