If you want paragraphs or text runs found in the input DOCX file and having a given custom MS-Word style to be converted to a specific XML element, please proceed as follows:
Select an MS-Word style by:
Clicking Character to list custom character (text run) styles and Paragraph to list custom paragraph styles.
Selecting a style from the custom styles combobox.
It's possible to add to the combobox custom styles coming from other DOCX files by clicking .
|About the "p-" and "c-" style name prefixes automatically added by w2x|
The name of a paragraph style is automatically given a "
For example, custom combined paragraph and character MS-Word style called "
There is just one way to map a character style to a specific XML element. For example, a text run found in the input DOCX file having a custom style
c-FilePath is converted to an DITA element
However, there are 4 different ways to map a paragraph style to a specific XML element. Therefore if you have selected a paragraph style, you must now choose a mapping type using the "Paragraph Mapping" combobox.
Consecutive paragraphs all having the same custom style and containing significant whitespace but no forced line breaks (that is, each paragraph typically containing a single line of code), e.g.
p-programListing, are converted to text runs and then grouped into the same parent XML element where whitespace and line breaks are preserved, e.g. DITA
A paragraph having a custom style and containing significant whitespace and forced line breaks (that is, a paragraph typically containing multiple lines of code), e.g.
p-KeyboardInput, is converted to an XML element where whitespace and line breaks are preserved, e.g. DITA
The mapping type of a paragraph style — "Paragraph", "Paragraph N to1", "Paragraph N to pre" or "Paragraph 1 to pre" — is automatically suggested by this dialog box after you select this paragraph style. However the heuristics used to implement the suggestions being rather conservative, the suggestion will be generally "Paragraph".
Type the name of the target element in the "Target XML Element" field.
This element name must have no namespace prefix. This is possible because the setup assistant assumes that if needed to (e.g. output format is XHTML or DocBook 5.0), a default namespace has been specified in the XSLT stylesheets used to implement the conversion.
Carefully choose the target XML element otherwise you may end up with an invalid output file.
For example, when the type of the mapping is "Paragraph N to1", do not choose DITA
Optionally type up to 3 attribute name/value in the "Optional Attributes" fields.
The name of an attribute must have no namespace prefix. More precisely, only the standard, predefined, "
xml:" prefix is supported here.