Language reference : Base elements : Topic elements : Table elements : simpletable
WebWorks  
simpletable
The <simpletable> element is used for tables that are regular in structure and do not need a caption. Choose the simple table element when you want to show information in regular rows and columns. For example, multi-column tabular data such as phone directory listings or parts lists are good candidates for simpletable. Another good use of simpletable is for information that seems to beg for a three-part definition list; the keycol attribute may be used to indicate which column represents the "key" or term-like column of your structure.
This close match of simpletable to tabular, regular data makes simpletable suitable as the basis for specialized structures such as properties (for programming information) and choice tables (for tasks).
Contains
Note: These models represent only the default document types distributed by OASIS. Actual content models will differ with each new document type.
Doctype
Content model
topic, map, concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap, classifyMap, subjectScheme, machineryTask, learningAssessment, learningBookmap, learningContent, learningMap, learningOverview, learningPlan, learningSummary
( (sthead) (optional) then (strow) (one or more) )
Contained by
Doctype
Content model
topic (base)
map (base), classifyMap, subjectScheme, learningBookmap, learningMap
topic (technical content)
map (technical content), bookmap
concept
ditabase
glossary, glossentry, glossgroup
reference
task (strict), task (general)
machineryTask
learningAssessment, learningOverview, learningSummary
learningContent
learningPlan
Inheritance
- topic/simpletable
Example 79. Example
Source:
<simpletable>
<sthead>
<stentry>Type style</stentry>
<stentry>Elements used</stentry>
</sthead>
<strow>
<stentry>Bold</stentry>
<stentry>b</stentry>
</strow>
<strow>
<stentry>Italic</stentry>
<stentry>i</stentry>
</strow>
<strow>
<stentry>Underlined</stentry>
<stentry>u</stentry>
</strow>
</simpletable>
Formatted output:
Type style
Elements used
Bold
b
Italic
i
Underlined
u
Example 80. Example using keycol
In this sample, the first column is identified as a header column through the use of keycol="1" on the <simpletable> element. This indicates that items in the first column should be treated as headers for the row that follows. Rendering of the header column is left up to the implementation.
Source:
<simpletable keycol="1">
<sthead>
<stentry>Term</stentry>
<stentry>Categorization</stentry>
<stentry>Definition</stentry>
</sthead>
<strow>
<stentry>Widget</stentry>
<stentry>noun</stentry>
<stentry>Thing that is used for something</stentry>
</strow>
<strow>
<stentry>Frustration</stentry>
<stentry>noun</stentry>
<stentry>What you feel when you drop the widget</stentry>
</strow>
</simpletable>
Formatted output:
Term
Categorization
Definition
Widget
noun
Thing that is used for something
Frustration
noun
What you feel when you drop the widget
Attributes
Name
Description
Data Type
Default Value
Required?
relcolwidth
A relative value to specify the width of a column in relationship to the width of the other columns. The values are totaled and made a percent. For example:
relcolwidth="1* 2* 3*"
causes widths of 16.7%, 33.3%, and 66.7%.
relcolwidth="90* 150*"
causes width of 37.5% and 62.5%.
CDATA
#IMPLIED
No
keycol
Defines the column that can contains headings for each row. No value indicates no key column. When present, the numerical value causes the specified column to be treated as a vertical header.
NMTOKEN
#IMPLIED
No
refcols
The refcols attribute is currently undefined, and is reserved for future use.
NMTOKENS
#IMPLIED
No
spectitle
The specialized title attribute allows architects of specialized types to define a fixed or default title for a specialized element. Not intended for direct use by authors.
CDATA
#IMPLIED
No
display-atts attribute group (scale, frame, expanse)
A set of related attributes, described in display-atts attribute group
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups)
A set of related attributes, described in univ-atts attribute group
global-atts attribute group (xtrf, xtrc)
A set of related attributes, described in global-atts attribute group
class, outputclass
Common attributes described in Other common DITA attributes