Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

17 Converting to DocBook XML > 17.7 Specifying options for figure elements > 17.7.2 Specifying ancestry for figure elements


17.7.2 Specifying ancestry for figure elements

To specify the ancestor elements Mif2Go must use to wrap <figure> elements:

[DocBookOptions]

; ImageParents = parents for image tags, default none (use content

; model), may include sets from [DocBookElementSets].

ImageParents = list of parent elements

List ancestors in hierarchical order; see §17.5.2 Designating DocBook ancestor elements. You can include element sets, as well as single elements; see §17.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.

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

[DocBookOptions]

ImageParents = $iparents

[DocBookElementSets]

$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

[DocBookImageParents]

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

alerts = entry

You can make a single [DocBookImageParents] 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:

[DocBookElementSets]

$iparents = section entry example graphic

Mif2Go will always choose example over graphic. Where the image is valid in both <graphic> 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 <graphic>, you could set:

[DocBookElementSets]

$iparents = section entry graphic example

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



17 Converting to DocBook XML > 17.7 Specifying options for figure elements > 17.7.2 Specifying ancestry for figure elements