Document Types > Integrating Table Models > Integrating HTML Tables in a DTD
  
Integrating HTML Tables in a DTD
To include HTML tables in your documents, you must add the appropriate entity declarations to your DTD.
If you are using an SGML DTD, use the HTML table model.
To integrate the HTML table model in your DTD:
1. In Arbortext Architect, choose File > Open, and select the DTD to which you want to add the HTML table model.
2. Choose Edit > DTD to open the DTD Editor.
3. If you want to change the default values of the parameter entities used within the entity declarations in the HTML table model, you must add the entity declarations to the DTD before declaring the table model. Refer to Arbortext-path/entities/html-tbl.dtd for more information on the parameter entities in this table model.
4. Add the entity declaration for HTML table structures:
<!ENTITY % htmltbls PUBLIC "-//Arbortext//
DTD HTML Table Module (SGML) 20000418//EN">
5. Add a reference to this entity to incorporate the table model in your DTD:
%htmltbls
6. Add the TABLE element to existing content models in which you want to allow tables. For example, if you want to allow tables within paragraphs, you might create the following element declaration:
<!ELEMENT para - - ((%paracon)* | TABLE) >
* 
The TABLE element is specified by the parameter entity %Table.tagname and may be redefined.
7. Save your changes and exit the DTD Editor.
If you are using an XML DTD, use the XHTML table model.
To integrate the XHTML table model in your DTD:
1. In Arbortext Architect, choose File > Open, and select the DTD to which you want to add the XHTML table model.
2. Choose Edit > DTD to open the DTD Editor.
3. If you want to change the default values of the parameter entities used within the entity declarations in the XHTML table model, you must add the entity declarations to the DTD before declaring the table model. Refer to Arbortext-path/entities/xhtml-tbl.dtd for more information on the parameter entities in this table model.
4. Add the entity declaration for XHTML table structures:
<!ENTITY % xhtmltbls PUBLIC "-//Arbortext//
DTD HTML Table Module (XML) 20000418//EN">
5. Add a reference to this entity to incorporate the table model in your DTD:
%xhtmltbls
6. Add the table element to existing content models in which you want to allow tables. For example, if you want to allow tables within paragraphs, you might create the following element declaration:

<!ELEMENT para - - ((%paracon)* | table) >
* 
The table element is specified by the parameter entity %Table.tagname and may be redefined.
7. Save your changes and exit the DTD Editor.
When Arbortext Editor loads the document type, it will automatically detect the table model if you have defined the table, caption, td, th, and tr elements in the DTD. Also, these required elements and some other HTML table elements must have the following attributes if defined in your DTD:
HTML Table Element
Required Attributes
col
span
colgroup
span
table
border
tbody
(none)
td
colspan, rowspan
tfoot
(none)
th
colspan, rowspan
thead
(none)
tr
(none)
You can turn off automatic table detection in the .dcf file.