Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

32 Working with content models > 32.5 Understanding how Mif2Go uses content models


32.5 Understanding how Mif2Go uses content models

Where there are multiple possible parent elements of a given DITA XML element, a set is defined for those parent elements in the [ElementSets] section of the content model configuration file; see §32.1 Understanding Mif2Go content models. The *PartN sets in this section are computer generated to keep the lengths of the individual sets short enough to be editable; they have no other special purpose. Within each set, elements are listed alphabetically for convenience in human look-up.

For example:

[TopicParents]

data=data=*data

[ElementSets]

*data=data-about *Part2 *Part6 *Part9 *Part10

 . . .

*Part2=b cite codeblock codeph data i lq note p ph pre q screen shortdesc sub sup title tt u xref

 . . .

*Part6=abstract dd ddhd desc draft-comment dt dthd entry example fn itemgroup li lines linkinfo pd pt section sli stentry

 . . .

*Part9=alt author brand category copyrholder filepath index-base index-see index-see-also index-sort-as indexterm msgblock msgph prodname publisher source systemoutput uicontrol userinput

 . . .

*Part10=body component coords delim featnum fig fragref linktext metadata navtitle oper platform prognum prolog repsep searchtitle sep series var

Mif2Go uses a complex algorithm to determine which element to interpolate in places in your document where a parent element is required. When Mif2Go processes your document and encounters text that you have mapped to a <data> element (for example), Mif2Go searches the above element sets, in sequence, for the current parent element. If the parent is not found, Mif2Go performs a graph analysis, breadth-first, of possible parent series that could fit under the current parent. In each case, Mif2Go takes the first of those candidate parents with equal-length sequences and interpolates it between the <data> element and its current parent.

This means that you could change the usage priority of interpolated parents by altering the order of items in a content-model element set. (The full collection of algorithms is rather more complex; for example, Mif2Go also considers closing existing parents to find a better solution to the graph problem.)

Suppose you want to tell Mif2Go not to use certain elements; for example, “forget about <data>” or “never use <fn> in a <fig>”. If you delete data from all element sets, this element will never be interpolated into your DITA XML output. If you delete fig from all element sets that contain possible parents of fn, fig will never be interpolated as a parent of fn. However, we advise not adding or removing any items, because doing so can result in invalid DITA XML. (Removal is safer than addition.)



32 Working with content models > 32.5 Understanding how Mif2Go uses content models