Unable to achieve table format

Post here questions and problems related to editing and publishing DITA content.
balajinrs
Posts: 23
Joined: Tue Nov 08, 2022 5:12 pm

Unable to achieve table format

Post by balajinrs »

I want to create a table as attached "Expected_table_format"
Expected_table_format.PNG
Expected_table_format.PNG (12.14 KiB) Viewed 335 times


but I am able to acheive only this "actual_table_format".
actual_table_format.PNG
actual_table_format.PNG (11.3 KiB) Viewed 335 times
created table as follows

<table frame="none" >
<tgroup cols="10">
<colspec colname="col1" rowheader="norowheader" colsep="0" rowsep="0"/>
<colspec colname="col2" rowheader="norowheader" colsep="0" rowsep="0"/>
<colspec colname="col3" colsep="1" rowsep="1"/>
<colspec colname="col4" />
<colspec colname="col5" />
<colspec colname="col6" />
<colspec colname="col7" />
<colspec colname="col8" />
<colspec colname="col9" />
<colspec colname="col10" colsep="1"/>
<tbody>
<row>

<entry namest="col1" nameend="col2"></entry>
<entry morerows="0" colsep="1" namest="col3" nameend="col10">
Well Explorer Nodes
</entry>
</row>
</tbody>
</tgroup>
</table>

Please advice how to achieve the expected format.
Radu
Posts: 8734
Joined: Fri Jul 09, 2004 5:18 pm

Re: Unable to achieve table format

Post by Radu »

Hi,
What you achieved looks close enough, maybe you can bold the text in the cells which are considered as header cells.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
balajinrs
Posts: 23
Joined: Tue Nov 08, 2022 5:12 pm

Re: Unable to achieve table format

Post by balajinrs »

Thank you for your fast reply. in actual you can see the lines are very thin and hardly visible. Also there are not closing lines at the starting and ending of each row. like
actual_table_format_no_border_lines_and_only_thin_lines.PNG
actual_table_format_no_border_lines_and_only_thin_lines.PNG (18.69 KiB) Viewed 324 times
Kindly help me to achieve that.
Radu
Posts: 8734
Joined: Fri Jul 09, 2004 5:18 pm

Re: Unable to achieve table format

Post by Radu »

Hi,
I'm afraid I do not have a clear idea about how to achieve what you want.
If you were to set "frame="all"" on the table, then that top left corner would also get drawn which you do not seem to want so this is probably you have set it to frame=none. Also the "rowsep" and "colsep" attributes control the separator after the cell and the separator to the right hand side of the cell.
The DITA Cals table model has its limitations...
Maybe initially you could try to create a similar table in plain HTML to see how the generated HTML would need to look like.
Then maybe some XSLT customizations would help you convert this DITA table to HTML in a specific way...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
balajinrs
Posts: 23
Joined: Tue Nov 08, 2022 5:12 pm

Re: Unable to achieve table format

Post by balajinrs »

Thank you for your reply Radu
Here I am generating CHM file. How to include the XSLT in oxygenxml , please let me know
Radu
Posts: 8734
Joined: Fri Jul 09, 2004 5:18 pm

Re: Unable to achieve table format

Post by Radu »

Hi,
The DITA Open Toolkit publishing engine bundled with Oxygen has support for plugins:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
https://www.oxygenxml.com/doc/versions/ ... lugin.html
https://www.dita-ot.org/dev/topics/custom-plugins.html

If in the plugin.xml descriptor file you specify that you want to add a custom XSLT stylesheet for this extension point:

Code: Select all

<feature extension="dita.xsl.xhtml" file="custom.xsl"/>
then the "custom.xsl" would start to be used also for DITA to CHM publishing and be able to override xsl:templates from the base stylesheets.

But as I suggested maybe you can start with a plain HTML document with a table, use a web browser to see how to style the table to achieve what you want. Maybe it's just a matter of doing some CSS customization instead of modifying the HTML content produced from the DITA table.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
balajinrs
Posts: 23
Joined: Tue Nov 08, 2022 5:12 pm

Re: Unable to achieve table format

Post by balajinrs »

Thank you for your reply Radu. It is really helpful to understand things. I tried to achieve the strike through explained in the video (https://youtu.be/SK9_FiJiKQs)

I am using the Select Scenarios option in OxygenXML to generated HTML file
Now I got the html output (attached sampletopic.html and test.html, plugin of status deleted
plugin_strikethrough.zip
(2.82 KiB) Downloaded 25 times
)

Result : Strike through is not happening
Last edited by balajinrs on Fri May 26, 2023 6:30 pm, edited 1 time in total.
Post Reply