simpletable-Based Tables

Tables based on the simpletable element require a slightly different structure than that provided by DITA in order to render properly as a table in FrameMaker. To accommodate this difference, these tables need an extra level of hierarchy added to define the table heading area and the table body area while working in FrameMaker.

The simpletable element and those elements that are specialized from simpletable (properties and choicetable) need a Table Heading element named “fm-TABLETYPEhead” and a Table Body element named “fm-TABLETYPEbody” added to the EDD. The fm-simpletablehead element specifies a general rule of “sthead” and the fm-simpletablebody element specifies a general rule of “strow+”. The general rule for each of the TABLETYPE elements should be “fm-TABLETYPEhead?, fm-TABLETYPEbody”.

In addition to the EDD modifications, the following rules are needed for each simpletable-based structure:

fm element "fm-simpletablehead" unwrap; 
fm element "fm-simpletablebody" unwrap; 
 
element "simpletable" 
{ 
  is fm table element; 
  attribute "relcolwidth" is fm property column widths; 
} 
element "sthead" 
{ 
  is fm table row element; 
  fm property row type value is "Heading"; 
} 
element "strow" 
{ 
  is fm table row element; 
  fm property row type value is "Body"; 
}

The initial rules (first two lines) discard the head and body wrappers on file save. The remaining rules define the root table element (in this case simpletable), the row element that is a “Heading” row (in this case sthead) and the row element that is a “Body” row (in this case strow). For simpletable specializations, you must provide these three rule groups so the row elements are placed into the right “fm-TABLETYPEhead” or “fm-TABLETYPEbody” elements.

Because the choicetable element must have only 2 columns, the root table rule looks like the following:

element "choicetable" 
{ 
  is fm table element; 
  fm property columns value is "2"; 
  attribute "relcolwidth" is fm property column widths; 
}

And because a properties table can have one, two, or three columns, the properties element read/write rule is no longer used (this old rule required that a properties table always have three columns). The Element Mapping dialog in Options allows the definition of multiple optional table cell elements, and can be used to support other specializations of simpletable.

The fm-simpletablehead, fm-simpletablebody, and the head/body elements for other simpletable-specialized elements should be added to both the Topic and Book applications.