Parameter syntax:
'insertColumnBefore'|'insertColumnAfter'| 'cutColumn'|'copyColumn'| 'pasteColumnBefore'|'pasteColumnAfter'| 'deleteColumn'| 'insertRowBefore'|'insertRowAfter'| 'cutRow'|'copyRow'| 'pasteRowBefore'|'pasteRowAfter'| 'deleteRow'| 'incrColumnSpan'|'decrColumnSpan'| 'incrRowSpan'|'decrRowSpan'
This command may be used to edit any table conforming to a model vaguely resembling the HTML table model (table contains rows, themselves possibly contained in row groups, etc).
Prerequisite in terms of selection | Parameter | Description |
---|---|---|
A cell or an element having a cell ancestor must be implicitly or explicitly selected. | insertColumnBefore | Insert a column before column containing specified cell. |
insertColumnAfter | Insert a column after column containing specified cell. | |
cutColumn | Cut to the clipboard the column containing specified cell. | |
copyColumn | Copy to the clipboard the column containing specified cell. | |
pasteColumnBefore | Paste copied or cut column before column containing specified cell. | |
pasteColumnAfter | Paste copied or cut column after column containing specified cell. | |
deleteColumn | Delete the column containing specified cell. | |
A row must be explicitly selected. OR a cell or an element having a cell ancestor must be implicitly or explicitly selected. | insertRowBefore | Insert a row before row containing specified cell. |
insertRowAfter | Insert a row before row containing specified cell. | |
cutRow | Cut to the clipboard the row containing specified cell. | |
copyRow | Copy to the clipboard the row containing specified cell. | |
pasteRowBefore | Paste copied or cut row before row containing specified cell. | |
pasteRowAfter | Paste copied or cut row after row containing specified cell. | |
deleteRow | Delete the row containing specified cell. | |
A cell or an element having a cell ancestor must be implicitly or explicitly selected. | incrColumnSpan | Increment the number of columns spanned by specified cell. |
decrColumnSpan | Decrement the number of columns spanned by specified cell. | |
incrRowSpan | Increment the number of rows spanned by specified cell. | |
decrRowSpan | Decrement the number of rows spanned by specified cell. |
Unlike the other commands contained in this reference, this command has no fixed name. It must be instantiated and given a name using a command
configuration element (see Section 2, “command” in property
configuration element. See example below:
DITA simpletable
example:
<command name="dita.simpleTableEdit"><class>com.xmlmind.xmledit.cmd.table.GenericTableEdit</class> </command> <property name="dita.simpleTableEdit.tableSpecification">
table=simpletable row=sthead strow cell=stentry </property>
This creates an instance of generic, parametrizable, table editor command | |
Because the table editor command is called Example 1: " Example 2: " In the above example, the fact that the |
The syntax of a table specification is:
spec -> table_spec row_group_spec? row_spec cell_spec row_span_spec? column_span_spec? table_spec -> table= element_name_list \n row_group_spec -> rowGroup= element_name_list \n row_spec -> row= element_name_list \n cell_spec -> cell= element_name_list \n row_span_spec -> rowSpan= attribute_name_list \n column_span_spec -> columnSpan= attribute_name_list \n element_name_list -> name {S name}* attribute_name_list -> name{+1}? {S name{+1}?}* name = non_qualified_name | {namespace_URI}local_part
Specifies the names of the elements which must be considered as being tables, that is, row group containers or, directly, row containers (like in HTML 3.2 tables).
Specifies the names of the elements which must be considered as being row groups, that is, row containers. May be omitted if not relevant.
Specifies the names of the elements which must be considered as being rows, that is, cell containers.
Specifies the names of the elements which must be considered as being cells.
Specifies the names of the attributes which are used to specify the number of rows spanned by a cell. May be omitted if not relevant.
Use +1
to specify that the attribute contains an additional number of rows rather than the actual number of rows spanned by a cell.
Specifies the names of the attributes which are used to specify the number of columns spanned by a cell. May be omitted if not relevant.
Use +1
to specify that the attribute contains an additional number of rows rather than the actual number of rows spanned by a cell.
Example 1: the specification of an HTML table would be:
table=table rowGroup=tbody thead tfoot row=tr cell=td th rowSpan=rowspan columnSpan=colspan
Example 2: the (partial) specification of a CALS table would be:
table=tgroup entrytbl rowGroup=tbody thead tfoot row=row cell=entry rowSpan=morerows+1
The fact that the columnSpan=
line is missing means that there is no attribute which could be used to specify the number of columns spanned by a cell.