Home Forums General XMetaL Discussion Align Table next to each other Reply To: Align Table next to each other

Derek Read

Reply to: Align Table next to each other

For fear of getting off topic (given linjinwei's other posts, I strongly suspect the original question was meant to be asked in the context of the DITA DTDs) the DITA DTDs do support nested tables. I will also make the assumption that we're talking about CALS tables in DITA, which use

as the main element. What they do not support is the

element directly inside an element.

In order to insert a

within another

you need to place the nested (second level)

within a

or similar element (others include and



To get really technical about the DTDs:

…the definition for (within tblDecl.mod) is as follows:

…and tbl.entry.mdl is defined as:

…and paracon is defined as:

…and tblcell.cnt (within commonElements.mod) is defined as:

…and (because this entity expansion goes on for a lot longer) suffice it to say that each of the entities listed there can contain various other elements (after expansion), but not all of them allow

, and itself cannot contain


However, because humans are not normally meant to read and understand all of this stuff (hopefully that's why you are using XMetaL Author Enterprise rather than coding your XML in Notepad) I would recommend the following:
1) Trust that what is displayed in the Element List is correct and coming directly from the DTD in current use (including DITA versions, which may vary), and limited to those elements currently allowed in TagsOn or Normal view according to your current selection.
2) Within any element press Alt+F1 to be taken to the DITA Language Reference topic for that element. Each topic for each element includes a section called “Contains” which lists all the allowable child elements. If you see one listed there that the Insert menu does not list or that for whatever reason tries to “help” you with (by inserting something else or whatever) you can use the Element List to insert it. Ultimately, the Element List should give you more control (at the expense of you needing to know exactly what you are doing).

Now, having said all of this, I do not know to what extent the DITA OT supports nested tables for every possible output format.

Note 1: If a post has anything remotely to do with DITA or the DITA OT please post it in the correct board: “DITA and XMetaL Discussion”. That gives people the correct context to work within, provided you have not customized the DITA OT, etc (in which case, please also let people know that).

The board called “General XMetaL Discussion” is for postings about XMetaL Author whenever DITA is not involved (ie: for all other DTDs and Schema) or when functionality is not specific to DITA.

If you aren't sure then please at a minimum mention which DTD or Schema you are working with.

Note 2: If this question was really meant to be posted in “General XMetaL Discussion” there is no way to answer this without knowing which DTD or Schema is being used because that is ultimately what decides what is allowed, not XMetaL. XMetaL just reads the rules in the DTD or Schema and enforces them. Some implementations of the CALS or HTML table models allow nested tables but is very easy to write a DTD or Schema that does not allow this.