Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

15 Converting to DITA XML > 15.7 Specifying options for images in DITA XML > 15.7.1 Designating ancestors for <image> and <fig> elements


15.7.1 Designating ancestors for <image> and <fig> elements

To specify the ancestor elements Mif2Go must use to wrap <image> and <fig> elements:

[DITAOptions]

; ImageParents = parents for <image> tags, whether wrapped in <fig>

; or not; default none (use content model), may include sets from

; [DITAElementSets].

ImageParents = list of parent elements

List ancestors in hierarchical order; see §15.5.2 Designating DITA ancestor elements. You can include element sets, as well as single elements; see §15.5.5 Specifying alternate ancestries for the same element. If you do not specify any ancestor elements, Mif2Go picks the first valid element listed in the content model, which might not be what you had in mind.

Note:  Do not include fig either in the list for ImageParents or in an element set in that list.

For example, suppose you want most of your images wrapped in <section>, except for those that occur in paragraphs that are mapped to <example>:

[DITAOptions]

ImageParents = $iparents

[DITAElementSets]

$iparents = section example

To specify ancestry for a single <image> element or a discrete group of <image> elements, assign the parent name or parent set name to the graphic ID of the image (see §5.3 Identifying files and objects), or to the graphic group ID (see §23.5.1.4 Creating named groups of graphics). For example, to make sure icons in table cells have <entry> as a parent:

[GraphGroup]

ab01f853 = alerts

ab012c13 = alerts

ab00b5d3 = alerts

[DITAImageParents]

; image ID (may be group) = parents to be used for image/fig element.

alerts = entry

You can make a single [DITAImageParents] setting in an HTMLConfig marker, also; see §33.2.2 Overriding settings with configuration markers.

Sequence matters in element sets

Although Mif2Go knows which elements are valid within other elements, Mif2Go has no idea at all about required sequences of elements. For example, if you set:

[DITAElementSets]

$iparents = conbody section entry example context choice

Mif2Go will always choose example over context when in <taskbody>. Where the image is valid in both <context> and <example>, Mif2Go lacks any real criterion for choosing one over the other. Instead, Mif2Go selects, from the list of candidates, the first element that is valid as a parent of the <image> element.

In this example, if more of your images belong in <context>, you could set:

[DITAElementSets]

$iparents = conbody section entry context example choice

and then use [DITAImageParents] for the lesser number of images that should be in <example>.



15 Converting to DITA XML > 15.7 Specifying options for images in DITA XML > 15.7.1 Designating ancestors for <image> and <fig> elements