Contents 
 Index 
 "TPT User's Guide" 
 < Previous 
 Next > 

Post-Processing Tags in Splitting

The mif2htm.ini file defines where the split for new topics happens using the [HtmlStyle] section. In addition, Mif2Go supplies pre-defined macros that can be specified in the [Inserts] section of the mif2htm.ini file.

SplitHead - adds information to the generated HTML file in the <head>. Among other things, this is used to specify variables, such as the previous and next topics, so that they remain available within the topic.

SplitTop - adds information to the generated HTML file at the top of the <body>. This is used to define navigation control.

SplitBottom - adds information to the generated HTML file at the bottom of the <body>. This is used to define copyright information.

The TechPubTools takes advantage of these Mif2Go macros to facilitate later post-processing by the voyant_nav.pl tool.

Specifically, the TechPubTools employ standard HTML comments that reside in the file but are not displayed by the browser. The comments are typically used as pairs (begin and end) and contain a tag name that TechPubTools recognize.

<!-- begin voy_common_top --><!-- end voy_common_top --> used for system-wide common navigation.

<!-- begin voy_fm_book --><!-- end voy_fm_book --> used for navigation that is specific to a FrameMaker book. In particular, this means buttons or hyperlinks for previous and next topics.

<!-- begin voy_dox --><!-- end voy_dox --> used for navigation that is specific to the Doxygen output. This is not specified in the mif2htm.ini files, but does appear in files used by Doxygen. Also, the post-processing tools need to know about this.

<!-- begin voy_footer --><!-- end voy_footer --> used for system-wide common footer material. In particular, this can contain the copyright information, date of generation, and document numbers.

Note: The tag names can be changed. However, the change needs to be propagated into global.pm, mif2htm.ini, the voyant_master.html files, and the main header files used by Doxygen (voyant_head.txt and voyant_foot.txt).

The intent is to be able to quickly update the navigation or copyright information within each HTML file of the system without having to re-generate the HTML files from scratch. This is useful when it is known that the content hasn’t changed, but a new date stamp, say, is required in the copyright.

The technique is:

• The HTML files are generated by Mif2Go and Doxygen with these tags where required.

• At generation time, the information between the begin and end paired tags is empty or minimal.

• The first task performed by the post-processing programs (e.g., voyant_nav.pl) is to locate these tags in the supplied master template files (e.g., voyant_master_nav.html). The information between the begin and end tags from the master file is stored.

• The post-processing program locates these tags in the individual HTML files and replaces information between the begin and end tags with the information from the master file.

• Post-processing can be performed any number of times (using different master files) without requiring the content to be regenerated with Mif2Go or Doxygen.

An additional tag, <!-- begin voyant_variables -->, is created by Mif2Go. It is used to store information about the FrameMaker topic. This HTML comment contains a ## separated list of paired items (a flag, ## separator, and content) needed for navigation.

##curr##<$$currfile>## - Flag for the current file and the Mif2Go variable that writes the current filename here.

##prev##<$$prevsfile>## - Flag for the previous file and the Mif2Go variable that writes the previous HTML filename here. Without any post-processing, Mif2Go does not link the first topic of a given chapter to the last topic of the previous chapter.

##next##<$$nextfile>## - Flag for the next file and the Mif2Go variable that writes the next HTML filename here. Without any post-processing, Mif2Go does not link the last topic of a given chapter to the first topic of the next chapter.

##firstlast##<$$firstsfile>#<$$lastfile>## - Chapter first-last flag and the Mif2Go binary variables.

##firstlast##1#0## - indicates the current file is the first topic of the chapter. This is the flag that adds the topic to the hast table for first topics.

##firstlast##0#1## - indicates the current file is the last topic of the chapter. This is the flag that adds the topic to the hast table for last topics.

##firstlast##0#0## - indicates the current file is a topic in the chapter.

Below is an excerpt from the [Inserts] section of the mif2htm.ini file.

; The following three macros in the [Inserts] section

; are intended to each be on one line.

[Inserts]

SplitHead=<!-- begin voyant_variables ##curr##<$$currfile>##prev##<$$prevsfile>##next##<$$nextfile>##firstlast##<$$firstsfile>#<$$lastfile>## -->

SplitTop=<!-- begin voy_common_top --><!-- end voy_common_top --><!-- begin voy_fm_book --><p align="right" class="nav"><a href="<$$prevfile>">&lt;Previous&nbsp;Topic&gt;</a> <a href="<$$nextfile>">&lt;Next&nbsp;Topic&gt;</a></p><hr><!-- end voy_fm_book -->

SplitBottom=<!-- begin voy_footer --><hr><center><P><small>PROPRIETARY<br>For Voyant Technology, Inc. Internal Use Only.<br>April 2001</small></center></p><!-- gcm --><!-- end voy_footer -->

Boring Detail: Mif2Go had limitations about providing links to previous or next HTML topics at chapter boundaries (e.g., at the very first topic or the very last topic, respectively.) However, at the end of voyant_nav.pl post-processing, the hash tables do know this information. As such, those first and last topics are revisited to update their previous and next links to allow sequential browsing through the book over chapter boundaries.

Note: In order for the fixing of previous/next links at the chapter boundaries to work, you have to use chapter INI files and choose file prefixes in a manner that, when UNIX sorted, provides the correct relationship of the FrameMaker chapters to one another.



 "TPT User's Guide" 
 < Previous 
 Next > 


Open-Source tools compliments of Voyant Technologies, Inc. and Glenn C. Maxey.
01/13/2003

TP Tools v2-00-0a

# tpt-hug-02