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. | |
sortRows | Sort all the rows of the table according to the string values of the cells of the “selected column”. (The “selected column” is the column containing specified cell.) Unless '[' 'dictionary'|'numeric'|'lexicographic' [ ';descending'|';ascending' ]? ']' a dialog box is displayed allowing to specify the following sort options:
Note that:
| |
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 4, “command” in XMLmind XML Editor - Configuration and Deployment). It must also be parametrized using a simple specification contained in a property
configuration element. See example below:
DITA simpletable
example:
<command name="dita.simpleTableEdit"> <class>com.xmlmind.xmleditapp.cmd.table.GenericTableEdit</class> </command> <property name="dita.simpleTableEdit.tableSpecification"> table=simpletable row=sthead:header strow cell=stentry </property>
This creates an instance of generic, parameterizable, 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_role_list \n row_spec -> row= element_name_role_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_role_list -> name_role {S name_role}* name_role -> name{role}? role -> :header | :footer | :body 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.
The name of an element may be optionally followed by :header
if the corresponding row group is a table header, :footer
if the corresponding row group is a table footer and :body
if the corresponding row group is a table body. By default, a row group is considered to be a table body.
Specifies the names of the elements which must be considered as being rows, that is, cell containers.
The name of an element may be optionally followed by :header
if the corresponding row is a table header, :footer
if the corresponding row is a table footer and :body
if the corresponding row is a normal row. By default, a row is considered to be a normal row.
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 XHTML table would be:
table={http://www.w3.org/1999/xhtml}table rowGroup={http...ml}tbody {http...ml}thead:header {http...ml}tfoot:footer row={http...ml}tr cell={http...ml}td {http...ml}th rowSpan=rowspan columnSpan=colspan
Notice how the XHTML namespace is specified before the local name of each element.
Example 2: a partial specification for CALS (DocBook 4; no namespace) tables would be:
table=tgroup entrytbl rowGroup=tbody thead:header tfoot:footer 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.