Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

14 Converting to generic XML > 14.8 Converting index entries to generic XML > 14.8.1 Configuring index markers for conversion to XML


14.8.1 Configuring index markers for conversion to XML

To convert FrameMaker index markers, you need ways to extract the content of each marker and embed the text in appropriate XML elements. Because you cannot redefine the behavior of FrameMaker markers of type Index, you must first clone these markers. Then you can do the following:

Surround the cloned content with Mif2Go macro code.

Assign the cloned content to a Mif2Go macro variable for further parsing.

New markers for XML index

Clone index markers, creating a new marker type to which you can assign properties; see §29.3 Remapping marker types and hypertext commands:

[Markers]

; Create a new marker type, cloning existing markers of type Index:

Index = NewIndex

Embed new markers in code

Assign the Code property to marker type NewIndex; see §29.4 Defining and redefining marker behavior:

[MarkerTypes]

; NewIndex marker content is to be surrounded by macro code:

NewIndex = Code

Note:  If Index marker content includes non-alphanumeric characters, to ensure proper encoding you must assign marker type property Text instead of Code; see §29.7.3 Processing marker content as text for XML/HTML/XHTML.

User variable for marker content

Set the initial value of user variable $$IXtext to the content of each NewIndex marker; see §29.7.2 Surrounding marker content with code:

[MarkerTypeCodeBefore]

; User variable $$IXtext gets the original index-marker content:

NewIndex= <$$IXtext = "

XML tags for parent element

Provide surrounding tags for the resulting XML element <indexterm>:

[MarkerTypeCodeAfter]

; The result of processing <$$IXtext> becomes XML element <indexterm>:

NewIndex= "><indexterm><$ProcIXtext></indexterm>

Macro [ProcIXtext] parses the content of each index entry to produce XML <indexN> elements. Several alternate definitions of [ProcIXtext] are described in §14.8.2 Defining macros to process index content.



14 Converting to generic XML > 14.8 Converting index entries to generic XML > 14.8.1 Configuring index markers for conversion to XML