Conversion rule examples

Learn the conversion rule examples to convert unstructured documents into structured in FrameMaker.

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:

Wrap this object or objects In this element With this qualifier

G:

image

 

P:alt

alt

 

E:image, E:caption

fig

 

The rule in which <image> and <alt> elements are wrapped into a <fig> element must occur after the rules in which <image> and <alt> are created.

If you need to map several paragraph styles 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:

Wrap this object or objects In this element With this qualifier

P:Bullet

li

b

P:Step1

li

st

P:Step2

li

st

E:ListItem[b]+

ul

 

E:ListItem[st]+

ol

 

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

Wrap this object or objects In this element With this qualifier

RE:RootElement

topic

 

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:

Wrap this object or objects In this element With this qualifier

G:

image(promote)