Row spanning for simpletables
Posted: Wed Feb 19, 2014 6:55 pm
Hi, Radu.
The DITA <simpletable> content model does not provide any attribute like the CALS table @morerows attribute that enables authors to span cells across rows.
However, I would like to provide this capability in the oXygen author editor for specializations of <simpletable>. Am I right in thinking that I could just modify the DITASimpleTableDocumentTypeHelper class to do this?
The tricky part is that I want to make this row spanning capability on cells automatic for authors. Each specialization of <simpletable> that we have created includes multiple specializations of <stentry> that define different types of columns for the table -- for example: category, subcategory, size, criteria. Each row must start with a category element, but can be followed by any number of subcategory, size, and criteria elements, in any order. I want the DITA oXygen WYSIWYG editor to automatically insert empty cells and set spanning across those cells based on the number of the optional cell elements, and the order of the columns as the author has defined them in the header row for the table, using the categoryhd, subcategoryhd, sizehd, and criteriahd elements.
Here is an example of such a table:
I have already developed publishing stylesheets that can render this kind of table, calculating where a cell has to be spanned across rows and adding rows as necessary. (I will email you an example rendering of the table above.)
Do you think it is possible for me to add this kind of functionality to the oXygen Author editor?
Thanks,
Tim.
The DITA <simpletable> content model does not provide any attribute like the CALS table @morerows attribute that enables authors to span cells across rows.
However, I would like to provide this capability in the oXygen author editor for specializations of <simpletable>. Am I right in thinking that I could just modify the DITASimpleTableDocumentTypeHelper class to do this?
The tricky part is that I want to make this row spanning capability on cells automatic for authors. Each specialization of <simpletable> that we have created includes multiple specializations of <stentry> that define different types of columns for the table -- for example: category, subcategory, size, criteria. Each row must start with a category element, but can be followed by any number of subcategory, size, and criteria elements, in any order. I want the DITA oXygen WYSIWYG editor to automatically insert empty cells and set spanning across those cells based on the number of the optional cell elements, and the order of the columns as the author has defined them in the header row for the table, using the categoryhd, subcategoryhd, sizehd, and criteriahd elements.
Here is an example of such a table:
Code: Select all
<cs-tnm-table id="cs-tnm-table_xdb_124_rm" relcolwidth="1.52* 1.52* 3.0* 4.22* 1.26* 1.89* 1.0*">
<cs-tnm-head>
<cs-tnm-cathd>Tumor level…</cs-tnm-cathd>
<cs-tnm-subhd>Which includes…</cs-tnm-subhd>
<cs-tnm-sizehd>Is assigned when the size of the primary tumor is…</cs-tnm-sizehd>
<cs-tnm-crithd>And…</cs-tnm-crithd>
</cs-tnm-head>
<cs-tnm-categories>
<cs-tnm-category>T1</cs-tnm-category>
<cs-tnm-subcat>T1a</cs-tnm-subcat>
<cs-tnm-size><operator keyref="equalToOrLessThan"/>1cm</cs-tnm-size>
<cs-tnm-criteria>is limited to the thyroid.</cs-tnm-criteria>
<cs-tnm-subcat>T1b</cs-tnm-subcat>
<cs-tnm-size><operator keyref="greaterThan"/>1 cm but <operator keyref="equalToOrLessThan"/>2 cm in greatest dimension
</cs-tnm-size>
<cs-tnm-criteria>is limited to the thyroid.</cs-tnm-criteria>
</cs-tnm-categories>
<cs-tnm-categories>
<cs-tnm-category>T2</cs-tnm-category>
<cs-tnm-size>
<ul>
<li><operator keyref="greaterThan"/>2 cm, but</li>
<li><operator keyref="equalToOrLessThan"/>4 cm</li>
</ul>
</cs-tnm-size>
<cs-tnm-criteria>is limited to the thyroid. </cs-tnm-criteria>
</cs-tnm-categories>
<cs-tnm-categories>
<cs-tnm-category>T3</cs-tnm-category>
<cs-tnm-size><operator keyref="greaterThan"/>4 cm in greatest dimension</cs-tnm-size>
<cs-tnm-criteria>is limited to the thyroid.</cs-tnm-criteria>
<cs-tnm-size>any size</cs-tnm-size>
<cs-tnm-criteria>
<p>has minimal extrathyroid extension such as extension to <ul id="ul_nj4_sf4_rm">
<li>sternothyroid muscle, or</li>
<li>perithyroid soft tissues.</li>
</ul></p>
</cs-tnm-criteria>
</cs-tnm-categories>
<cs-tnm-categories>
<cs-tnm-category>T4a</cs-tnm-category>
<cs-tnm-size>any size</cs-tnm-size>
<cs-tnm-criteria>
<p>extends beyond the thyroid capsule to invade areas such as the<ul id="ul_sbj_xf4_rm">
<li>subcutaneous soft tissues</li>
<li>larynx</li>
<li>trachea</li>
<li>esophagus, or</li>
<li>recurrent laryngeal nerve.</li>
</ul></p>
</cs-tnm-criteria>
<cs-tnm-criteria>is intrathyroidal anaplastic carcinoma.</cs-tnm-criteria>
</cs-tnm-categories>
<cs-tnm-categories>
<cs-tnm-category>T4b</cs-tnm-category>
<cs-tnm-size>any size</cs-tnm-size>
<cs-tnm-criteria>is invading the prevertebral fascia.</cs-tnm-criteria>
<cs-tnm-criteria>is encasing the<ul id="ul_nzk_yg2_tm">
<li>carotid artery, or</li>
<li>mediastinal vessels.</li>
</ul></cs-tnm-criteria>
<cs-tnm-criteria>is an anaplastic carcinoma with gross extrathyroid extension.</cs-tnm-criteria>
</cs-tnm-categories>
</cs-tnm-table>
Do you think it is possible for me to add this kind of functionality to the oXygen Author editor?
Thanks,
Tim.