Page 1 of 1

Author mode - DocBook - clean up table attributes

Posted: Tue Sep 22, 2009 10:19 am
by honyk
Hello,

probably disputable from view of versioning/change tracking, but it would be nice to add some feature, which would clean up table attributes if something in table would changed - added, changed, deleted: row, column, cell or any of the values. I have in mind mainly two attributes - colnum and colname - it could be replaced with values in proper column order. It have to replace also all occurences in table where cells are splitted (namest, nameend). Maybe also column widths could be normalized (mixed 1*, 1.0* and * values to uniform one). Just idea.

Jan

Re: Author mode - DocBook - clean up table attributes

Posted: Tue Sep 22, 2009 11:40 am
by sorin_ristache
Hello,

What do you mean clean up and replace with values in proper column order? Please give a small example.

When a column separator is dragged with the mouse in Author mode the column width is adjusted to reflect the new width ratio. What do you mean normalize the column widths?


Regards,
Sorin

Re: Author mode - DocBook - clean up table attributes

Posted: Tue Sep 22, 2009 1:05 pm
by honyk
Hello,

there are many legacy tables in our documents, so there are mixed different styles according to editor used in current time. The following example is extrem:

Code: Select all

<colspec colname="col01" colnum="1" colwidth="1.00*"/>
<colspec colnum="3" colname="col03" colwidth="1*"/>
<colspec colwidth="*" colname="col1" colnum="2" />
If new column before the last one is added in Oxygen to such table, colspec is changed to:

Code: Select all

<colspec colname="col01" colnum="1" colwidth="1.00*"/>
<colspec colname="newCol3" colnum="3"/>
<colspec colnum="4" colname="col03" colwidth="1*"/>
<colspec colwidth="*" colname="col1" colnum="2"/>
My idea was to enable some option to cleanup this mess to unified style. It would affected only edited tables.

Re: Author mode - DocBook - clean up table attributes

Posted: Tue Sep 22, 2009 2:42 pm
by sorin_ristache
We will consider adding such an option or user action in a future version but I think a unified style is not possible in all cases. In your example what should the option do for the colwidth="*" attribute? What values should the option generate in the colwidth attribute in your example?


Thank you for the example,
Sorin

Re: Author mode - DocBook - clean up table attributes

Posted: Tue Sep 22, 2009 3:00 pm
by honyk
Colwidth * equals to 1*
Details can be found here:
http://www.sagehill.net/docbookxsl/ColumnWidths.html
http://www.docbook.org/tdg/en/html/colspec.html

Btw, it is interesting no colwidth is specified for newly added columns in Oxygen. If there is defined already any colwidth, I would suggest to specify at least 1*.