Understanding the Portable HTML Standard Edition Template

prevnext

Working with bulleted and numbered lists


FrameMaker paragraphs with bullets or autonumbers should generally be converted to HTML unordered or ordered lists. The Portable HTML Standard Edition template includes four paragraph styles-SmartList1 through SmartList5-that create HTML lists. SmartList1 is a first-level list, SmartList2 a second-level list, and so on. To create HTML lists in your output, map the FrameMaker bullet and numbered list paragraph tags to the appropriate SmartList style.

The SmartList style is "smart" because it analyzes the FrameMaker paragraph style to determine whether the output should be a bulleted (unordered) list or an ordered list (with different numbering types).

HTML handles bulleted and numbered lists differently from FrameMaker, and as a result, converting FrameMaker list items to HTML can present a challenge. In FrameMaker, list numbering is based on the autonumber defined in the paragraph. But in HTML, the list number is based on the position of the list item in the list.

An ordered HTML list looks like this:

 <OL>
 <LI>first step
 <LI>second step
 <LI>third step
 </OL>

The numbering is calculated by the position of the <LI> element within the <OL> element. But in many cases, the numbered items in the FrameMaker files aren't adjacent. For example, you might have text like this:

In FrameMaker, this is easy. You create a Step1 tag with an autonumber of S:<n=1>, a Step2+ tag with an autonumber of S:<n+>, and a Note tag with "Note:" as the autonumber. To convert the items to HTML, you map the Step1 and Step2+ to SmartList1 and Note to Body. But in HTML, look at what happens:

 <OL>
 <LI>Do this.
 <LI>Do this.
 </OL>
 <P>Note: Don't forget this.</P>
 <OL>
 <LI>Do some more stuff.
 </OL>

And the result in the browser looks like this:

The first and second steps are numbered correctly, but the third step is reset to begin with "1."

To prevent this from happening, you have two choices:

Setting up relative paragraph styles

To ensure that paragraphs that intervene in a numbered list do not "close" the ordered list, use one of the relative paragraph styles: BodyRelative, IndentedRelative, or PreformattedRelative.
BodyRelative
For styles that should line up with the list.
IndentedRelative
For styles that should be indented one level more than the list.
PreformattedRelative
For styles that should use the HTML <PRE> style and be indented at the same level as the list.

Hard-coding the list value into the list

If your numbered list consists of numbers (not letters or Roman numerals), the SmartList styles automatically hard-code the value of the list item into the HTML output. For example, the output might look like this:

 <OL>
 <LI value=1>Do this.
 <LI value=2>Do this.
 </OL>
 <P>Note: Don't forget this.</P>
 <OL>
 <LI value=3>Do some more stuff.
 </OL>

Notice that the value attribute in the third list item (3) overrides the calculated value of the list item (1), so that the correct number is displayed, even though the HTML isn't quite right. But because it's so easy to get the numbering right this way, you may decide that the HTML is acceptable.

prevnext



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com