General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Align Table next to each other
-
linjinwei November 27, 2008 at 12:48 am
Align Table next to each other
November 27, 2008 at 12:48 amParticipants 4Replies 5Last Activity 14 years, 2 months agoCan anybody tell me how do you align 2 tables next to each other?
I tried setting one align left and one align right, but always end up one above another. Like the example below…I just need them to be side by side. Thanks in advance
[left]
Table 1 [/left][right]
Table 2 [/right]
dcramer November 27, 2008 at 12:51 am
Reply to: Align Table next to each other
November 27, 2008 at 12:51 amHave you tried nesting them in another two column, one row table?
mag3737 November 27, 2008 at 1:12 am
Reply to: Align Table next to each other
November 27, 2008 at 1:12 amIf you're looking for showing tables side-by-side within the XMetaL editor, the only way will be to have nested tables such as what dcramer suggests. (Note that DITA doesn't support nested tables, so if you're in DITA you won't have that option.)
If you're talking about having the tables side-by-side in your output, this is an XSLT question (or in DITA, a DITA OT + XSLT question), which makes it a whole 'nother can of worms.
linjinwei November 27, 2008 at 4:01 am
Reply to: Align Table next to each other
November 27, 2008 at 4:01 amThanks for the reply. I believe nesting tables in table is the solution
LeoraBetesh March 5, 2009 at 12:27 pm
Reply to: Align Table next to each other
March 5, 2009 at 12:27 pmI am just curious, why do you say that DITA doesn't support nested tables? We have used nested tables in DITA 1.1
Derek Read March 5, 2009 at 10:26 pm
Reply to: Align Table next to each other
March 5, 2009 at 10:26 pmFor 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 or
).
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 directly.
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.
-
AuthorPosts
- You must be logged in to reply to this topic.