Conversion rule examples

The order in which conversion rules are listed is significant. You must go from lower-level elements to higher-level elements. For example, assume that you have the following mapping rules:

  G:                           Graphic
 P:caption                           Caption
 E:Graphic,E: Caption                           Figure

The rule in which Graphic and Caption are wrapped into a Figure element must occur after the rules in which Graphic and Caption are created.

If you need to map several paragraph tags to the same element and then wrap them into different parents, you use the third column for a qualifier. It’s common, for example, to have a ListItem element that’s used for both bulleted lists and numbered lists. Once the bullet and step paragraphs are wrapped in the ListItem element, you need a way to distinguish whether they belong in OrderedList or UnorderedList. To make this distinction, you use the qualifier column, as shown in the following example:

  bullet                           ListItem                        b
 step1                           ListItem                        st
 step2+                           ListItem                        st
 E:ListItem[b]+                           UnorderedList
 E:ListItem[st]+                           OrderedList

To specify the root element of a document, you use the following:

  RE:RootElement                           Chapter

You can only specify one root element per conversion table.

Graphics and tables are often anchored into the preceding paragraph in the unstructured document. When you structure the document, the Graphic and Table elements end up as children of the preceding Para element.

If you want the Graphic element to be converted as a sibling of Para (shown in the preceding figure on the right) rather than a child, use the “promote” command:

  G:                           Graphic(promote)

September 30, 2016

Legal Notices | Online Privacy Policy