XML Exchange Table Model Document Type Definition
Organization for the Advancement of Structured Information Standards (OASIS) Technical Memorandum TR 9901:1999
Permission to reproduce parts or all of this information in any form is granted to OASIS members provided that this information by itself is not sold for profit and that OASIS is credited as the author of this information.
Abstract
This OASIS Technical Memorandum is an XML expression of the Exchange subset of the full CALS table model DTD described in OASIS Technical Memorandum 9502:1995, CALS Table Model Document Type Definition. It is an XML version of OASIS Technical Resolution 9503:1995, Exchange Table Model Document Type Definition.
The Exchange subset has been chosen as being a useful subset of the complete CALS table model such that, if an application's tables are tagged according to this subset, there is a high probability that the table will be interoperable among the great majority of OASIS vendor products. See also OASIS Technical Research Paper TRP 9501:1995, Table Interoperability: Issues for the CALS Table Model.
- 1. Introduction
- 2. Exchange Table model DTD module
- 3. Semantic description for the Exchange table model
- 3.1. Element and attribute description for
table
- 3.2. Element and attribute description for
tgroup
- 3.3. Element and attribute description for
colspec
- 3.3.1. General
- 3.3.2. Optional attributes
- 3.3.2.1.
colnum
— column number - 3.3.2.2.
colname
— column name - 3.3.2.3.
colwidth
— column width specification - 3.3.2.4.
colsep
— column separators (vertical ruling) - 3.3.2.5.
rowsep
— row separators (horizontal ruling) - 3.3.2.6.
align
— horizontal alignment of table entry content - 3.3.2.7.
char
— alignment character - 3.3.2.8.
charoff
— horizontal offset of alignment character when align=char
- 3.3.2.1.
- 3.4. Element and attribute description for
thead
- 3.5. Element and attribute description for
tbody
- 3.6. Element and attribute description for
row
- 3.7. Element and attribute description for
entry
- 3.7.1. General
- 3.7.2. Optional attributes
- 3.7.2.1.
colname
— column name - 3.7.2.2.
namest
— name of starting column for this entry - 3.7.2.3.
nameend
— name of ending column for this entry - 3.7.2.4.
morerows
— number of additional rows in a vertical span - 3.7.2.5.
colsep
— column separators (vertical ruling) - 3.7.2.6.
rowsep
— row separators (horizontal ruling) - 3.7.2.7.
align
— horizontal alignment of table entry content - 3.7.2.8.
char
— alignment character - 3.7.2.9.
charoff
— horizontal offset of alignment character - 3.7.2.10.
valign
— vertical alignment
- 3.7.2.1.
- 3.1. Element and attribute description for
- A. Glossary
- B. Acknowledgements
1. Introduction
This OASIS Technical Memorandum is an XML expression of the Exchange subset of the full CALS table model DTD described in OASIS Technical Memorandum 9502:1995, CALS Table Model Document Type Definition. It is an XML version of OASIS Technical Resolution 9503:1995, Exchange Table Model Document Type Definition.
The Exchange subset has been chosen as being a useful subset of the complete CALS table model such that, if an application's tables are tagged according to this subset, there is a high probability that the table will be interoperable among the great majority of OASIS vendor products. See also OASIS Technical Research Paper TRP 9501:1995, Table Interoperability: Issues for the CALS Table Model.
Note that the set of element and attribute declarations in the Exchange Table Model DTD Module partially defines the Exchange table model. However, the model is not well-defined without the accompanying natural language description of the semantics (meanings) of these various elements, attributes, and attribute values. The semantic writeup, in the sections following the markup declaration module, must be used in conjunction with the element and attribute declarations.
The following markup declaration module defines parameter entities for various parts of the model. This organization provides for more flexibility in using this module in different circumstances. However, it must be realized that overriding declarations of these parameter entities that enlarge the model (i.e., that define a superset of the model or a different model) may reduce practical interoperability. It is therefore recommended that the parameter entities be used primarily to define a subset of the default model. Any parameter entity redefinition other than to define a more constrained model than the default model must be done carefully with the knowledge of ones target toolset's capabilities and with the realization that interoperability may be reduced.
In particular, for maximum interoperability, the geometric aspects,
including some table attributes, and the elements and attributes of the table
structure: tgroup
through row
and some entry
attributes should only be
constrained. The table
content model and
the entry
content model are the primary
candidates for change other than constraint.
1.1. Changes from OASIS Technical Resolution TR 9503:1995
Specific changes of substance between this Exchange Model and the SGML Exchange Model described in OASIS Technical Resolution TR 9503:1995 include:
Removed the
tbl.table.excep
,tbl.hdft.excep
,tbl.row.excep
, andtbl.entry.excep
parameter entities.There are no exceptions in XML. The following normative statement is made in lieu of exceptions: the exchange table model explicitly forbids a table from occurring within another table. If the content model of an entry includes a table element, then this cannot be enforced by the DTD, but it is a deviation from the exchange table model to include a table within a table.
Removed the
tbl.hdft.name
,tbl.hdft.mdl
,tbl.hdft.excep
, andtbl.hdft.att
parameter entities.The motivation for these elements was to change the table header/footer elements. Since XML does not allow element declarations to contain name groups, and the exchange table model does not allow a table to contain footers, the continued presence of these attributes is unnecessary.
Added the
tbl.thead.att
parameter entity.This entity parameterizes the attributes on
thead
. It replaces thetbl.hdft.att
parameter entity.Tag ommission indicators have been removed.
Comments have been removed from declarations.
NUMBER attributes have been changed to NMTOKEN.
NUTOKEN attributes have been to changed to NMTOKEN.
Removed the grouping characters around the content model parameter entry for the
entry
element. This is necessary so that an entry can contain #PCDATA and be defined as an optional, repeatable OR group beginning with #PCDATA, as required by XML.
1.2. Changes from MIL-HDBK-28001 (30 June 95)
Specific changes of substance between this Exchange Model and the CALS table model contained in the Example DTD published in MIL-HDBK-28001 (30 June 95) include:
change most explicit attribute defaults from a value to #IMPLIED to allow value inheritance, possibly from a style sheet;
eliminate
entrytbl
;eliminate
tfoot
;eliminate
spanspec
;eliminate the
char
andcharoff
attributes fromtgroup
;eliminate the rotate attribute from
entry
;eliminate references to security attributes.
Finally, this declaration set is assigned a Formal Public Identifier.
2. Exchange Table model DTD module
1 |<!-- XML EXCHANGE TABLE MODEL DECLARATION MODULE -->
||
<!-- This set of declarations defines the XML version of the Exchange
|Table Model as of the date shown in the Formal Public Identifier
5 |(FPI) for this entity.
||
This set of declarations may be referred to using a public external
|entity declaration and reference as shown in the following three
|lines:
10 ||
<!ENTITY % calstblx
|PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN">
|%calstblx;
|15 |
If various parameter entities used within this set of declarations
|are to be given non-default values, the appropriate declarations
|should be given before calling in this package (i.e., before the
|"%calstblx;" reference).
|-->
20 ||
<!-- The motivation for this XML version of the Exchange Table Model
|is simply to create an XML version of the SGML Exchange Table
|Model. By design, no effort has been made to "improve" the model.
|25 |
This XML version incorporates the logical bare minimum changes
|necessary to make the Exchange Table Model a valid XML DTD.
|-->
||
<!-- The XML version of the Exchange Table Model differs from
30 |the SGML version in the following ways:
||
The following parameter entities have been removed:
||
- tbl.table.excep, tbl.hdft.excep, tbl.row.excep, tbl.entry.excep
35 |There are no exceptions in XML. The following normative statement
|is made in lieu of exceptions: the exchange table model explicitly
|forbids a table from occurring within another table. If the
|content model of an entry includes a table element, then this
|cannot be enforced by the DTD, but it is a deviation from the
40 |exchange table model to include a table within a table.
||
- tbl.hdft.name, tbl.hdft.mdl, tbl.hdft.excep, tbl.hdft.att
|The motivation for these elements was to change the table
|header/footer elements. Since XML does not allow element declarations
45 |to contain name groups, and the exchange table model does not
|allow a table to contain footers, the continued presence of these
|attributes seems unnecessary.
||
The following parameter entity has been added:
50 ||
- tbl.thead.att
|This entity parameterizes the attributes on thead. It replaces
|the tbl.hdft.att parameter entity.
|55 |
Other miscellaneous changes:
||
- Tag ommission indicators have been removed
|- Comments have been removed from declarations
|- NUMBER attributes have been changed to NMTOKEN
60 |- NUTOKEN attributes have been to changed to NMTOKEN
|- Removed the grouping characters around the content model
|parameter entry for the 'entry' element. This is necessary
|so that an entry can contain #PCDATA and be defined as an
|optional, repeatable OR group beginning with #PCDATA.
65 |-->
||
<!-- This entity includes a set of element and attribute declarations
|that partially defines the Exchange table model. However, the model
|is not well-defined without the accompanying natural language
70 |description of the semantics (meanings) of these various elements,
|attributes, and attribute values. The semantic writeup, also available
|from SGML Open, should be used in conjunction with this entity.
|-->
|75 |
<!-- In order to use the Exchange table model, various parameter entity
|declarations are required. A brief description is as follows:
||
ENTITY NAME WHERE USED WHAT IT IS
|80 |
%yesorno In ATTLIST of: An attribute declared value
|almost all elements for a "boolean" attribute
||
%paracon In content model of: The "text" (logical content)
|<entry> of the model group for <entry>
85 ||
%titles In content model of: The "title" part of the model
|table element group for the table element
||
%tbl.table.name In declaration of: The name of the "table"
90 |table element element
||
%tbl.table-titles.mdl In content model of: The model group for the title
|table elements part of the content model for
|table element
95 ||
%tbl.table.mdl In content model of: The model group for the content
|table elements model for table element,
|often (and by default) defined
|in terms of %tbl.table-titles.mdl
100 |and tgroup
||
%tbl.table.att In ATTLIST of: Additional attributes on the
|table element table element
|105 |
%bodyatt In ATTLIST of: Additional attributes on the
|table element table element (for backward
|compatibility with the SGML
|model)
|110 |
%tbl.tgroup.mdl In content model of: The model group for the content
|<tgroup> model for <tgroup>
||
%tbl.tgroup.att In ATTLIST of: Additional attributes on the
|<tgroup> <tgroup> element
115 ||
%tbl.thead.att In ATTLIST of: Additional attributes on the
|<thead> <thead> element
||
%tbl.tbody.att In ATTLIST of: Additional attributes on the
120 |<tbody> <tbody> element
||
%tbl.colspec.att In ATTLIST of: Additional attributes on the
|<colspec> <colspec> element
|125 |
%tbl.row.mdl In content model of: The model group for the content
|<row> model for <row>
||
%tbl.row.att In ATTLIST of: Additional attributes on the
|<row> <row> element
130 ||
%tbl.entry.mdl In content model of: The model group for the content
|<entry> model for <entry>
||
%tbl.entry.att In ATTLIST of: Additional attributes on the
135 |<entry> <entry> element
||
This set of declarations will use the default definitions shown below
|for any of these parameter entities that are not declared before this
|set of declarations is referenced.
140 |-->
||
<!-- These definitions are not directly related to the table model, but are
|used in the default CALS table model and may be defined elsewhere (and
|prior to the inclusion of this table module) in the referencing DTD. -->
145 ||
<!ENTITY % yesorno 'NMTOKEN'> <!-- no if zero(s), yes if any other value -->
|<!ENTITY % titles 'title?'>
|<!ENTITY % paracon '#PCDATA'> <!-- default for use in entry content -->
|150 |
<!--
|The parameter entities as defined below change and simplify the CALS table
|model as published (as part of the Example DTD) in MIL-HDBK-28001. The
|resulting simplified DTD has support from the SGML Open vendors and is
|therefore more interoperable among different systems.
155 ||
These following declarations provide the Exchange default definitions
|for these entities. However, these entities can be redefined (by giving
|the appropriate parameter entity declaration(s) prior to the reference
|to this Table Model declaration set entity) to fit the needs of the
160 |current application.
||
Note, however, that changes may have significant effect on the ability to
|interchange table information. These changes may manifest themselves
|in useability, presentation, and possible structure information degradation.
165 |-->
||
<!ENTITY % tbl.table.name "table">
|<!ENTITY % tbl.table-titles.mdl "%titles;,">
|<!ENTITY % tbl.table-main.mdl "tgroup+">
170 |<!ENTITY % tbl.table.mdl "%tbl.table-titles.mdl; %tbl.table-main.mdl;">
|<!ENTITY % tbl.table.att "
|pgwide %yesorno; #IMPLIED ">
|<!ENTITY % bodyatt "">
|<!ENTITY % tbl.tgroup.mdl "colspec*,thead?,tbody">
175 |<!ENTITY % tbl.tgroup.att "">
|<!ENTITY % tbl.thead.att "">
|<!ENTITY % tbl.tbody.att "">
|<!ENTITY % tbl.colspec.att "">
|<!ENTITY % tbl.row.mdl "entry+">
180 |<!ENTITY % tbl.row.att "">
|<!ENTITY % tbl.entry.mdl "(%paracon;)*">
|<!ENTITY % tbl.entry.att "">
||
<!-- ===== Element and attribute declarations follow. ===== -->
185 ||
<!--
|Default declarations previously defined in this entity and
|referenced below include:
|ENTITY % tbl.table.name "table"
190 |ENTITY % tbl.table-titles.mdl "%titles;,"
|ENTITY % tbl.table.mdl "%tbl.table-titles; tgroup+"
|ENTITY % tbl.table.att "
|pgwide %yesorno; #IMPLIED "
|-->
195 ||
<!ELEMENT %tbl.table.name; (%tbl.table.mdl;)>
||
<!ATTLIST %tbl.table.name;
|frame (top|bottom|topbot|all|sides|none) #IMPLIED
200 |colsep %yesorno; #IMPLIED
|rowsep %yesorno; #IMPLIED
|%tbl.table.att;
|%bodyatt;
|>
205 ||
<!--
|Default declarations previously defined in this entity and
|referenced below include:
|ENTITY % tbl.tgroup.mdl "colspec*,thead?,tbody"
210 |ENTITY % tbl.tgroup.att ""
|-->
||
<!ELEMENT tgroup (%tbl.tgroup.mdl;) >
|215 |
<!ATTLIST tgroup
|cols NMTOKEN #REQUIRED
|colsep %yesorno; #IMPLIED
|rowsep %yesorno; #IMPLIED
|align (left|right|center|justify|char) #IMPLIED
220 |%tbl.tgroup.att;
|>
||
<!--
|Default declarations previously defined in this entity and
225 |referenced below include:
|ENTITY % tbl.colspec.att ""
|-->
||
<!ELEMENT colspec EMPTY >
230 ||
<!ATTLIST colspec
|colnum NMTOKEN #IMPLIED
|colname NMTOKEN #IMPLIED
|colwidth CDATA #IMPLIED
235 |colsep %yesorno; #IMPLIED
|rowsep %yesorno; #IMPLIED
|align (left|right|center|justify|char) #IMPLIED
|char CDATA #IMPLIED
|charoff NMTOKEN #IMPLIED
240 |%tbl.colspec.att;
|>
||
<!--
|Default declarations previously defined in this entity and
245 |referenced below include:
|ENTITY % tbl.thead.att ""
|-->
||
<!ELEMENT thead (row+)>
250 ||
<!ATTLIST thead
|valign (top|middle|bottom) #IMPLIED
|%tbl.thead.att;
|>
255 ||
<!--
|Default declarations previously defined in this entity and
|referenced below include:
|ENTITY % tbl.tbody.att ""
260 |-->
||
<!ELEMENT tbody (row+)>
||
<!ATTLIST tbody
265 |valign (top|middle|bottom) #IMPLIED
|%tbl.tbody.att;
|>
||
<!--
270 |Default declarations previously defined in this entity and
|referenced below include:
|ENTITY % tbl.row.mdl "entry+"
|ENTITY % tbl.row.att ""
|-->
275 ||
<!ELEMENT row (%tbl.row.mdl;)>
||
<!ATTLIST row
|rowsep %yesorno; #IMPLIED
280 |valign (top|middle|bottom) #IMPLIED
|%tbl.row.att;
|>
||
285 |
<!--
|Default declarations previously defined in this entity and
|referenced below include:
|ENTITY % paracon "#PCDATA"
|ENTITY % tbl.entry.mdl "(%paracon;)*"
290 |ENTITY % tbl.entry.att ""
|-->
||
<!ELEMENT entry %tbl.entry.mdl;>
|295 |
<!ATTLIST entry
|colname NMTOKEN #IMPLIED
|namest NMTOKEN #IMPLIED
|nameend NMTOKEN #IMPLIED
|morerows NMTOKEN #IMPLIED
300 |colsep %yesorno; #IMPLIED
|rowsep %yesorno; #IMPLIED
|align (left|right|center|justify|char) #IMPLIED
|char CDATA #IMPLIED
|charoff NMTOKEN #IMPLIED
305 |valign (top|middle|bottom) #IMPLIED
|%tbl.entry.att;
|>
3. Semantic description for the Exchange table model
Note that the above set of element and attribute declarations in the previous section only partially defines the Exchange table model. The model is not well-defined without the accompanying natural language description of the semantics (meanings) of these various elements, attributes, and attribute values. This section containing that semantic writeup must be used in conjunction with the element and attribute declarations.
3.1. Element and attribute description for table
3.1.1. General
The table
element markup identifies
a table.
Elements inside a table
may at times
inherit default values from the attributes on the containing table
.
Furthermore, a table
element may have some
stylesheet associated with it that may provide default values for some or
all of its attributes.
If a table
element has no explicit
specification for an attribute but does have an associated style sheet that
gives a specification for this attribute, then the stylesheet value shall
be used as the value that is inherited from this element.
3.1.2. Optional attributes
3.1.2.1. frame
— outer table ruling
Describes position of outer rulings.
- Declared value
The enumerated values are:
Value Rules sides left and right sides top above first row bottom after last row topbot top and bottom all all of the above none none of the above The outer rulings appear in place of and in the space that would otherwise be taken by horizontal and vertical rulings on the outsides of those entries that appear at the edges of the table.
- Default
IMPLIED (implies value from stylesheet if available, if not, implies “all”).
3.1.2.2. colsep
— column separators
(vertical ruling)
Specifies the presence or absence of column separator rules. Provides
the default value for all tgroup
s in this
table
.
If colsep
is non-zero, display internal
column rules to the right of each entry
;
if zero, do not display the rules. This value is ignored for the rightmost
column, where the frame
setting applies.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED (implies value from stylesheet if available, if not, implies “1”).
3.1.2.3. rowsep
— row separators (horizontal
ruling)
Specifies the presence or absence of row separator rules. Provides the
default value for all tgroup
s in this table
.
If rowsep
is non-zero, display the
internal row rules below each entry
; if
zero, do not display the rules. Ignored for the last row
of the table
(i.e., the last row
of the last tgroup
in this table
), where the frame
value applies.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED (implies value from stylesheet if available, if not, implies “1”).
3.1.2.4. pgwide
— make table span
full page width
Describes the desired width of the table.
If zero, the maximum available width for the table
is the (galley) width (possibly respecting current indents in force as specified
by the stylesheet) of the current column of page. If non-zero, the table
spans the width of the entire page (possibly
causing any previous multicolumn text on the page to be balanced and any extra
processing associated with column balancing and page spanning to be performed).
Unlike most table attributes, this one is parameterized by %tbl.table.att;
and may be removed by a customization
layer.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED (implies value from the stylesheet if available). In the absence of an explicit value (or one implied from the stylesheet), the system should attempt to format the table into a galley column if reasonable, based on explicit
colspec
colwidth
values, galley column width, and possible table indentation implied by context. If any relative width specifications exist, they should continue to apply, but the unit proportion should be first based on the width uncommitted from the galley column.In the preceding paragraph, “if reasonable” is intended to preclude a system generating columns so narrow that the
entry
content is obscured by awkward line folding, or clipping. For character alignment, the content on either side of the alignment character should also be considered. No explicit algorithm for determining when a table will fit is provided. Because of the uncertainty in meaning, interchange of a table should include an explicit value forpgwide
.
3.1.2.5. %bodyatt;
— general body
element attributes
Any of the attributes in the associated attribute set may be used with this element.
- Default
As appropriate for each attribute in the set. This parameter entity is included for backward compatibility with the SGML exchange table model. The XML table model also defines
%tbl.table.att;
for this purpose, parallel to the other parameter entities added for defining attributes on table elements.
3.1.2.6. %tbl.table.att;
— general
body element attributes
Any of the attributes in the associated attribute set may be used with this element.
- Default
As appropriate for each attribute in the set.
3.2. Element and attribute description for tgroup
3.2.1. General
Each tgroup
effectively identifies
a new portion of a table
. The colspec
s and the colname
s
in each tgroup
are independent of any other tgroup
. The colspec
s
in a tgroup
apply to its tbody
.
The colspec
s in a
tgroup
shall be in left-to-right column order. Explicit colnum
s in the different colspec
s
of a tgroup
shall be unique, in ascending
order left-to-right, in the range 1 to the number of colspec
s,
which is not to exceed the value of the cols attribute of tgroup
.
The colname
s in the different colspec
s of a tgroup
shall be unique. (A colname
may have the
same value as the colnum
of the same colspec
if restricted to digits.) The colspec
s
of tbody
also apply to thead
.
All tgroup
s of a table
shall have the same width, so the table
frame can surround them uniformly. Each thead
and tbody
has that total width as well.
For each tgroup
, let the minimum tgroup
width be the sum of the fixed portions of
the set of colspec
colwidths in that tgroup
which should not exceed the indicated total
width, determined from the table
pgwide
attribute. If pgwide
is "0", the target total width is the galley column width, possibly reduced
by the current indents in force; if pgwide
is non-zero, the target total width is the full page width. The minimum table
width shall be the maximum of all the minimum
tgroup
widths.
The total width for any tgroup
may
be specified with some columns having fixed colwidths and others having proportional
widths. When no proportional width are specified for a given tgroup
,
the width of that tgroup
shall be the sum
of the fixed widths of the columns. When any proportional widths are specified,
the unit proportion is determined by starting with the target table width
determined from the table
pgwide
value non-zero for full width, “0” for galley column width (possibly
affected by current indents). Reduce that by the sum of border widths and
column ruling widths and the fixed colwidths to get the available proportional
width. Sum the proportional factors N over all columns with proportional parts
“N*” and including “1*” for each implicit colwidth
when the value of the tgroup
cols exceeds
the number of colspec
s in that tgroup
. Then the unit proportion is the available
proportional width divided by the sum of the proportionality factors. Note
that the fixed widths for frame and colsep rulings are deemed to be small
and system dependent, not essentially included as fixed parts of each colwidth
in colspec
.
If the table fixed widths take up too much of the indicated table width,
then it is up to the output system to resolve the conflict. If there are multiple
tgroup
s in a single table with fixed widths
(i.e., no proportional parts) such that these fixed widths differ from one
another, then it is up to the output system to determine the interpretation.
Elements inside a tgroup
may at times
inherit default values from the attributes on the containing tgroup
.
Furthermore, a tgroup
element may have
some stylesheet associated with it that may provide default values for some
or all of its attributes.
If a tgroup
element has no explicit
specification for an attribute but does have an associated style sheet that
gives a specification for this attribute, then the stylesheet value shall
be used as the value that is inherited from this element.
3.2.2. Required attribute
3.2.2.1. cols
— number of columns
Number of columns in the tgroup
.
The value of this attribute must be an integer greater than zero.
- Declared value
NMTOKEN
3.2.3. Optional attributes
3.2.3.1. colsep
— column separators
(vertical ruling)
Provides default for all colspec
s
in this tgroup
. If other than zero, display
the internal column rulings to the right of entry
;
if zero, do not display them. Ignored for the last (rightmost) column, where
the frame setting applies. Possible default source for colspec
or entry
.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED (implies value from stylesheet if any, else from
table
)
3.2.3.2. rowsep
— row separators (horizontal
ruling)
Provides default for colspec
s in
this tgroup
. If other than zero, display
the internal horizontal row ruling below each entry
.
If zero, do not display them. Ignored for the last (bottom) row
of the table
where the frame value applies.
In the last row
in any tgroup
other than the last (or only) in the table, the regular row
or entry
rowsep specifications apply. Possible
default source for row
or
entry
.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED (implies value from stylesheet if any, else from
table
)
3.2.3.3. align
— horizontal alignment
of table entry content
Text horizontal position within the column. Applies to text that is
#PCDATA or other in-line elements, not further contained in another element
with its own formatting style, such as paragraph, list, or annotation. Default
source for colspec
align. Possible default
source for entry
.
- Declared value
The enumerated values are:
Value Alignment left Flush left center Centered right Flush right justify Flush left and right char Align text to the leftmost occurrence of the value of the non-null attribute
char
value.- Default
IMPLIED (means use value from stylesheet if any, else “left”.)
3.3. Element and attribute description for colspec
3.3.1. General
Specifies a column, a vertical portion of a table
.
The default values come from the tgroup
or thead
starting the current (enclosing)
group. Each colspec
is for a single column
in left-to-right order, so it properly has a column number, colnum
,
implicitly in order starting from 1, and an optional column name (colname
) by which it is known when referenced by
any entry
. Any references from entry
s within the thead
to colname
, namest
,
or nameend
refer to values defined by
the set of colspec
s in the containing tgroup
. Colspec
s
from the containing tgroup
apply to thead
and tbody
.
The number of columns should be determined by the cols attribute on
the tgroup
element, not by the number of
colspec
s actually defined. If the number
in cols is larger than the number of colspec
s,
then additional colspec
s of colwidth “1*”
should be inferred. Colspec
s can be numbered
or unnumbered, and if numbered should be increasing in sequential order starting
with 1 at the left. Unnumbered colspec
s
are interpreted as being numbered incrementally (one more than the previous
column number), with the first colspec
starting at 1. It is left up to the implementation how to handle any mismatch
in colspec
numbering, or a number of colspec
s greater than cols. It is recommended that
an authoring or editing implementation or any implementation that verifies
the compliance of the table markup to this Memorandum offer the option of
producing a warning message when it encounters such markup. It is an error
for an authoring or editing implementation to produce a table with such conflicting
markup.
The char
and charoff
attributes are allowed on colspec
as well
as on entry
. While an implementation should
accept these attributes on either of these elements upon input, it may produce
logically equivalent output that nevertheless differs with respect to these
attributes and still be considered in compliance with the semantics of this
Memorandum. If a table contains one or more entry
s
with values of either char or charoff that differ from the value for the same
attribute on a colspec
that logically contains
the entry
(s), it is left up to the implementation
how this should be handled (i.e., the interpretation of such markup is beyond
the scope of this model). It is recommended that an authoring or editing implementation
or any implementation that verifies the compliance of the table markup to
this Memorandum offer the option of producing a warning message when it encounters
such markup. It is an error for an authoring or editing implementation to
produce a table with such conflicting markup.
3.3.2. Optional attributes
3.3.2.1. colnum
— column number
Number of column, counting from 1 at left of the table. The value of colnum
is not useful to identify a column in an
entry
, so serves no functional purpose
other than a consistency check on the order of the colspec
s.
- Declared value
NMTOKEN
- Default
IMPLIED (colspec is the next one in order)
3.3.2.2. colname
— column name
Name of column, used to specify the position or horizontal span
of columns in a row by reference in entry
using colname
, namest
,
and/or nameend
.
The colname
value could be the same
as colnum
, as its declared value is NMTOKEN,
though there is no such requirement. The name space for colname
s
is different for each tgroup
.
- Declared value
NMTOKEN
- Default
IMPLIED (colspec cannot be referenced without
colname
)
3.3.2.3. colwidth
— column width specification
Either proportional measure of the form number*, e.g., “5*” for 5 times the proportion, or “*” (which is equivalent to “1*”); fixed measure, e.g., 2pt for 2 point, 3pi for 3 pica. (Mixed measure, e.g., 2*+3pt, while allowed in the full CALS table model, is not supported in this Exchange model.) Coefficients are positive integers or fixed point numbers; for fixed point numbers, a leading (possibly 0) integer part is required, and implementations should support at least 2 decimal places. A value of "" [the null string] is treated as a proportional measure of “1*”.
The fixed unit values are case insensitive. The standard list of allowed unit values is “pt” (points), “cm” (centimeters), “mm” (millimeters), “pi” (picas), and “in” (inches). The default fixed unit should be interpreted as “pt” if neither a proportion nor a fixed unit is specified.
- Declared value
CDATA
- Default
IMPLIED (means assume a proportional measure of “1*”)
3.3.2.4. colsep
— column separators
(vertical ruling)
Default for column ruling to the right of entry
s
starting in this column (within the tgroup
).
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED, from
tgroup
.
3.3.2.5. rowsep
— row separators (horizontal
ruling)
Default for row ruling below an entry
starting in this column when there is neither a rowsep value on the entry
nor on the row
in which the entry
occurs. Note that with
a non-zero value for morerows on the entry, that ruling will be several rows
lower.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED, from
tgroup
.
3.3.2.6. align
— horizontal alignment
of table entry content
Text horizontal position within the column or spanning columns. Possible
default source for entry
.
- Declared value
The enumerated values are:
Value Alignment left Flush left center Centered right Flush right justify Flush left and right char Align text to the leftmost occurrence of the value of the non-null attribute
char
value.- Default
IMPLIED (means use value from
tgroup
)
3.3.2.7. char
— alignment character
Default source for entry
s starting
in this column. If character alignment is specified, the value is the single
alignment character source for any implied char values for entry
immediately in this column. A value of "" (the null string) means there is
no aligning character.
- Declared value
CDATA
- Default
IMPLIED, means "" (i.e., there is no aligning character).
3.3.2.8. charoff
— horizontal offset
of alignment character when align=char
Default source for entry
s starting
in this column. For character alignment on an entry
in the column, horizontal character offset is the percent of the current column
width to the left of the (left edge of the) alignment character.
This value should be number, greater than 0 and less than or equal to 100.
- Declared value
NMTOKEN
- Default
IMPLIED, means "50" (i.e., 50%)
3.4. Element and attribute description for thead
3.4.1. General
Identifies the heading row
s of a tgroup
, displayed as the first rows, and again at
the top of any continuation after a physical break between rows
in tbody
.
The attributes apply from the set of colspec
s
of the containing tgroup
.
3.4.2. Optional attributes
3.4.2.1. valign
— vertical alignment
Default text vertical positioning within the entry
s.
Provides default value for row
s and entry
s in thead
.
- Declared value
The enumerated values are:
Value Alignment top top middle approximately vertically centered bottom bottom - Default
IMPLIED (implies “bottom”).
3.5. Element and attribute description for tbody
3.5.1. General
Identifies the body of a tgroup
.
3.5.2. Optional attributes
3.5.2.1. valign
— vertical alignment
Default Text vertical positioning within the entry
s.
Provides default value for row
and entry
s in tbody
.
- Declared value
The enumerated values are:
Value Alignment top top middle approximately vertically centered bottom bottom - Default
IMPLIED (implies “top”)
3.6. Element and attribute description for row
3.6.1. General
Identifies the row information in a thead
or tbody
element. Default values come from
the enclosing thead
, tbody
,
or tgroup
attribute values for like-named
attributes.
The number of columns consumed by the entry
s
in a row including their spans, and by columns encroached by an entry
with morerows from a prior row of a tgroup
, shall not exceed the cols attribute value
in effect for this tgroup
. It is left up
to the implementation how to handle the situation when more than one entry
would fill any column of a row
,
including by spanning or straddling.
It is recommended that an authoring or editing implementation or any implementation
that verifies the compliance of the table markup to this Memorandum offer
the option of producing a warning message when it encounters such markup.
It is an error for an authoring or editing implementation to produce a table
with such conflicting markup.
If the number of columns consumed is less than the number of columns
specified in the tgroup
's cols
attribute, then the missing entry
s (without
spanning or straddling) are implicitly present, and their colsep and rowsep
rulings are inherited.
3.6.2. Optional attributes
3.6.2.1. rowsep
— row separators (horizontal
ruling)
Default for all entry
s starting in
this row
that do not specify rowsep. If
other than zero, display the internal horizontal row ruling below an entry
in the row
.
If zero, do not display it. Rowsep is ignored for the last row
of the table where the frame specification determines the ruling.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED, from the closest element in the inheritance path:
tgroup
thentable
.
3.6.2.2. valign
— vertical alignment
Text vertical positioning default for entry
s
in a row
.
- Declared value
The enumerated values are:
Value Alignment top top middle approximately vertically centered bottom bottom - Default
IMPLIED, from the closest element in the inheritance path: either
thead
ortbody
, whichever is the parent of thisrow
.
3.7. Element and attribute description for entry
3.7.1. General
Identifies an entry
in a row
.
Default values for colsep, rowsep, valign, align, char, and charoff
may come from like-named attributes from the nearest element identified as
influencing this entry
. The values may
come from table
, tgroup
, colspec
(defining namest
or colname
),
tbody
, or row
. Note that colspec
is not strictly in the element lineage.
The char and charoff attributes are allowed on colspec
as well as on entry
. While an implementation
should accept these attributes on either of these elements upon input, it
may produce logically equivalent output that nevertheless differs with respect
to these attributes and still be considered in compliance with the semantics
of this Memorandum. A table with one or more entry
s
with values of either char or charoff that differ from the value for the same
attribute on any other entry in that logical column or from a colspec
that logically contains the entry
(s) does
not conform to the model defined in this Memorandum. It is left up to the
implementation receiving such a table to determine how it should be handled.
It is recommended that an authoring or editing implementation or any implementation
that verifies the compliance of the table markup to this Memorandum offer
the option of producing a warning message when it encounters such markup.
An entry
gets its defaults from its
starting column. A row has no explicit entry
in any column into which a vertical straddle occurs because of a morerows
attribute on an entry
from a prior row. A spanning entry
has no
explicit repeated entry
s in the columns
to the right of the column identified by namest
.
An entry
without specific starting column
(a namest
attribute) cannot span, and
falls in the next non-straddled and non-spanned column.
The precedence for determining the column(s) for any entry
is:
span before individual column:
namest
throughnameend
individual column:
namest
colname
if nonamest
implicit if neither
namest
orcolname
The implicit Memorandum places the entry
in the next available column.
There are various markup combinations which this Memorandum defines as “erroneous” and referred to as “errors” in some of the following attribute descriptions. It is left up to the implementation how to handle each of these situations:
any column referenced by name (either
colname
,namest
ornameend
) is not acolname
of acolspec
in thattgroup
;any of those names are multiply defined in different
colspec
s of thattgroup
;any portions of different
entry
s overlap each other;morerows vertical straddling extends beyond the rows appropriate to that
thead
ortbody
;too many
entry
s occur in anyrow
, exceeding the cols on thetgroup
;any
colname
s used innamest
andnameend
to define a span in anentry
refers to thenamest
column that is not to the left of thenameend
column;an
entry
specifies a start column viaentry
'snamest
orcolname
that is to the left of the column where theentry
would be placed by default.
It is recommended that an authoring or editing implementation or any implementation that verifies the compliance of the table markup to this Memorandum offer the option of producing a warning message when it encounters such markup. It is an error for an authoring or editing implementation to produce a table with such markup.
If the content of an entry
is too
deep for the available depth of a page, what information is presented and
how it is presented is left to be determined by the implementation.
3.7.2. Optional attributes
3.7.2.1. colname
— column name
Column name of entry
. Ignore if namest
is present. It is an error if colname
is not defined in a colspec
of the current tgroup
.
- Declared value
NMTOKEN
- Default
IMPLIED (column(s) determined by
namest
or implicitly the next.)
3.7.2.2. namest
— name of starting
column for this entry
Name of leftmost column of span. The value must be some colname
in a colspec
of the current tgroup
.
A namest
on an entry with no nameend
specification indicates the single column
so named, though colname
is usually used
for such a specification. If neither namest
nor colname
occur, the entry
goes in the next column in sequence to the right, skipping over any encroachment
from a prior row via entry morerows=N
. It
is an error if the namest
value is not
defined in a colspec
for the current tgroup
.
- Declared value
NMTOKEN
- Default
IMPLIED (implies this attribute has no effect on spanning)
3.7.2.3. nameend
— name of ending
column for this entry
Name of rightmost column of span. The value must be some colname
in a colspec
of the current tgroup
.
The column must be to the right of the column identified by namest
.
A nameend
attribute without a namest
is ignored.
- Declared value
NMTOKEN
- Default
IMPLIED (implies this attribute has no effect on spanning)
3.7.2.4. morerows
— number of additional
rows in a vertical span
There shall be at least that many more rows in the appropriate thead
or tbody
.
Any entries with morerows that would attempt to extend further downward is
an error. The rowsep is determined when the entry is processed, in the top
row if morerows is positive.
- Declared value
NUMBER
- Default
IMPLIED (interpret as “0”)
3.7.2.5. colsep
— column separators
(vertical ruling)
If other than zero, display the internal vertical column ruling at the
right of the entry
; if zero, do not display
it. Ignored for the last column of a row
,
where the frame setting applies. The colsep value is determined by the leftmost
column of a spanning entry, even though its effect is on the last column of
such spanning entry.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED, from the closest element in the inheritance path:
colspec
thentgroup
thentable
.
Note that if a tgroup
or table
element has no explicit specification for this
attribute but does have an associated style sheet that gives a specification
for this attribute, then this value shall be used as the value that is inherited
from this element.
3.7.2.6. rowsep
— row separators (horizontal
ruling)
If other than zero, display the internal horizontal row ruling below
the entry
; if zero, do not display it. Ignored
for the last row
of tgroup
where the table frame applies. Rowsep for the entry is determined in the topmost
row in which the entry occurs, even though its effect may be morerows below.
- Declared value
%yesorno; (NMTOKEN)
- Default
IMPLIED, from the closest element in the inheritance path:
row
thencolspec
thentgroup
thentable
.
Note that if a tgroup
or table
element has no explicit specification for this
attribute but does have an associated style sheet that gives a specification
for this attribute, then this value shall be used as the value that is inherited
from this element.
3.7.2.7. align
— horizontal alignment
of table entry content
Text horizontal position within the column or spanning columns. Applies to text that is #PCDATA or other inline elements not further contained in another element with its own formatting style, such as paragraph, list, or annotation though such elements could inherit their alignment from this value.
- Declared value
The enumerated values are:
Value Alignment left Flush left center Centered right Flush right justify Flush left and right char Align text to the leftmost occurrence of the value of the non-null attribute
char
value.- Default
IMPLIED (means use value from nearest applicable
colspec
of the nearest ancestraltgroup
. If none, then “left”.)
3.7.2.8. char
— alignment character
If character alignment is specified, the value of the char attribute
is the single alignment character on which the first to occur of this character
in the entry
is aligned. A value of ""
(the null string) means there is no alignment character. If there is no alignment
character or the alignment character does not occur in the entry
,
the entry
right aligns to the left of the
charoff position.
- Declared value
CDATA
- Default
IMPLIED, from
colspec
else there is no aligning character.
3.7.2.9. charoff
— horizontal offset
of alignment character
When character alignment is specified for this entry
,
horizontal character offset is the percent of the current column width to
the left of the (left edge of the) alignment character.
This value should be number, greater than 0 and less than or equal to 100.
- Declared value
NMTOKEN
- Default
IMPLIED, from
colspec
else "50" (i.e., 50%).
3.7.2.10. valign
— vertical alignment
Text vertical positioning within the entry
.
- Declared value
The enumerated values are:
Value Alignment top top middle approximately vertically centered bottom bottom - Default
IMPLIED from the closest ancestor with explicit specification of valign:
row
thenthead
ortbody
.
A. Glossary
- span
A spanning table cell is one that occupies more than one column. In this DTD, the only way a table cell (
entry
) can span is by specifying bothnamest
andnameend
attributes.Spanning and straddling are independent; a spanning cell can also straddle.
- straddle
A straddling table cell is one that occupies more than one row. In this DTD, the only way a table cell (
entry
) can straddle multiple rows is by specifying amorerows
attribute.Spanning and straddling are independent; a spanning cell can also straddle.
B. Acknowledgements
The following contributed to the development of this Memorandum:
Harvey Bingham
Carla Corkern (ISOGEN)
Tony Graham (Mulberry Technologies)
Paul Grosso (Arbortext)
Eduardo Gutentag (Sun Microsystems)
Ken Hollman (Crane Softwrights)
Eve Maler (Arbortext)
Norbert Mikula (DataChannel)
Nam Jin Son (ISOGEN)
Marcy Thompson (ISOGEN)
B. Tommie Usdin (Mulberry Technologies)
Norman Walsh, Chair (Arbortext)